garthg26
@t_garthg26
What symbols does the trader recommend buying?
Purchase History
پیام های تریدر
Filter
Signal Type
garthg26

import pandas as pd import numpy as np import yfinance as yf # You can use other APIs for real-time data # Define the cryptocurrency (e.g., Bitcoin) and time frame crypto_symbol = "BTC-USD" start_date = "2022-01-01" end_date = "2023-01-01" # Fetch historical data crypto_data = yf.download(crypto_symbol, start=start_date, end=end_date) # Calculate moving averages short_window = 50 long_window = 200 crypto_data ['SMA50'] = crypto_data ['Close'].rolling(window=short_window).mean() crypto_data ['SMA200'] = crypto_data ['Close'].rolling(window=long_window).mean() # Create signals crypto_data ['Signal'] = 0 crypto_data ['Signal'] [short_window:] = np.where( crypto_data ['SMA50'] [short_window:] > crypto_data ['SMA200'] [short_window:], 1, 0 ) # Generate buy/sell signals crypto_data ['Buy_Signal'] = np.where( crypto_data ['Signal'] > crypto_data ['Signal'].shift(1), 1, 0 ) crypto_data ['Sell_Signal'] = np.where( crypto_data ['Signal'] < crypto_data ['Signal'].shift(1), -1, 0 ) # Print the DataFrame with buy and sell signals print(crypto_data [ ['Close', 'SMA50', 'SMA200', 'Signal', 'Buy_Signal', 'Sell_Signal']])
Disclaimer
Any content and materials included in Sahmeto's website and official communication channels are a compilation of personal opinions and analyses and are not binding. They do not constitute any recommendation for buying, selling, entering or exiting the stock market and cryptocurrency market. Also, all news and analyses included in the website and channels are merely republished information from official and unofficial domestic and foreign sources, and it is obvious that users of the said content are responsible for following up and ensuring the authenticity and accuracy of the materials. Therefore, while disclaiming responsibility, it is declared that the responsibility for any decision-making, action, and potential profit and loss in the capital market and cryptocurrency market lies with the trader.