The SmaRsiStrategy_plot is a backtesting strategy that combines the Simple Moving Average (SMA) and Relative Strength Index (RSI) indicators to generate buy and sell signals for trading. Here is a breakdown of the strategy:
Timeframe: The strategy operates on daily candlestick data. Startup Candle Count: The strategy requires 25 previous candles before generating valid signals.
Minimal ROI and Stop Loss: The strategy has a minimal ROI (take profit) of 0.99 and a stop loss of -0.10, which means the trade will be closed if the price drops by 10%.
Trailing Stop: The trailing stop feature is disabled.
Use Sell Signal: The strategy uses a sell signal to determine when to sell. Sell Profit Only: The strategy does not restrict selling only to achieve profit. Sell Profit Offset: There is no offset applied to the sell profit. Ignore ROI If Buy Signal: The strategy does not ignore the ROI if a buy signal is present. Indicators used:
RSI: The strategy calculates the RSI indicator. Hline: A horizontal line is drawn at the value of 50 on the RSI plot. SMA21 and SMA50: The strategy calculates the Simple Moving Average with a time period of 21 and 50, respectively. Buy Condition:
The strategy generates a buy signal when the RSI is above 50 and the close price crosses above the SMA21. Sell Condition:
The strategy generates a sell signal when the RSI is below 50 and the close price crosses below the SMA21. Plotting:
The strategy plots the SMA21 and SMA50 lines, filling the area between SMA21 and SMA50 with a color to indicate a support band. It also plots the RSI indicator with a red color and a horizontal line at 50 with a gray color and opacity of 0.5. This strategy can be used to backtest trading ideas and evaluate their performance based on historical data.