The RSI_MFI strategy is a trading strategy that uses the Relative Strength Index (RSI), the Money Flow Index (MFI), and the Rate of Change (ROC) indicators to generate buy and sell signals. Here is a breakdown of the important parts of the strategy:
Parameters:
buy_rsi: An integer parameter ranging from 1 to 25, with a default value of 18. It is used to determine the RSI threshold for buying.
buy_mfi: An integer parameter ranging from 1 to 15, with a default value of 2.
It is used to determine the MFI threshold for buying.
sell_rsi: An integer parameter ranging from 75 to 99, with a default value of 91. It is used to determine the RSI threshold for selling. sell_mfi: An integer parameter ranging from 85 to 99, with a default value of 91. It is used to determine the MFI threshold for selling. ROI table:
The strategy has a predefined ROI (Return on Investment) table, which specifies the target profit percentages at different stages of the trade. Stoploss:
The strategy uses a fixed stoploss value of -0.99, which means that if the trade goes against the expected direction by more than 99%, it will be closed with a stoploss. Trailing stop:
The strategy does not employ a trailing stop. Timeframe:
The strategy is optimized for the 5-minute timeframe. Indicators:
The strategy calculates the RSI, MFI, and ROC indicators using the provided populate_indicators function. Buy signal:
The populate_buy_trend function generates a buy signal when the following conditions are met:
RSI is less than or equal to the buy_rsi parameter value. MFI is less than or equal to the buy_mfi parameter value. ROC is less than or equal to -1 (a guard condition). Volume is greater than 0. Sell signal:
The populate_sell_trend function generates a sell signal when the following conditions are met:
RSI is greater than or equal to the sell_rsi parameter value. MFI is greater than or equal to the sell_mfi parameter value. ROC is greater than or equal to 1 (a guard condition). Volume is greater than 0. Note: The strategy has some experimental settings and optional order type mapping, which are not described in detail here.