The "SMA1CTE2" strategy is a trading strategy that uses a combination of moving averages and other indicators to determine buy and sell signals for a given cryptocurrency pair. Here's a breakdown of what the strategy does:
Parameters:
base_nb_candles_buy: An integer parameter representing the number of candles used for calculating the buy signal. low_offset: A decimal parameter representing the offset value used in conjunction with the moving average for the buy signal.
base_nb_candles_sell: An integer parameter representing the number of candles used for calculating the sell signal.
high_offset: A decimal parameter representing the offset value used in conjunction with the moving average for the sell signal.
Indicators:
Exponential Moving Averages (EMA): Calculates the EMA values for two different time periods (50 and 200) and stores them in the dataframe. Relative Strength Index (RSI): Calculates the RSI values for a time period of 2 and stores them in the dataframe. Buy Signal:
If the EMA50 is above the EMA200. If the closing price is above the EMA200. If the closing price is below the moving average offset by the low_offset value. If the volume is greater than 0. Sell Signal:
If the closing price is above the moving average offset by the high_offset value. If the volume is greater than 0. Additional Features:
Stoploss: Sets a stop-loss percentage of -0.23. Minimal ROI (Return on Investment): Sets a minimal ROI of 10%. Trailing Stop: Disables trailing stop functionality. Use Sell Signal: Enables the use of sell signals. Ignore ROI if Buy Signal: Does not ignore the ROI calculation when a buy signal is present. Process Only New Candles: Processes only new candles instead of the entire historical data. Startup Candle Count: Sets the number of candles to consider at startup to 400. Trade Exit Confirmation:
Checks various conditions, including the previous candle's opening price, RSI values, and sell reason, to determine if a trade exit should be confirmed. Overall, the strategy aims to identify potential buying opportunities when the shorter-term moving average crosses above the longer-term moving average and certain price and volume conditions are met. It seeks to sell when the price exceeds a certain offset from a moving average and volume conditions are met.