The "TheRealPullbackV2" strategy is designed to buy during market dips and sell after the price recovers. It uses various technical indicators to identify potential buying and selling opportunities. Indicators used:
Bollinger Bands: Calculates the upper and lower bands based on the standard deviation of the closing prices.
The width of the bands is also calculated.
RSI (Relative Strength Index): Measures the strength and weakness of the price by comparing the magnitude of recent gains to recent losses.
PLUS_DI and MINUS_DI: Part of the Directional Movement System, these indicators measure the strength of upward and downward price movements. CCI (Commodity Channel Index): Identifies deviations from the average price, indicating overbought or oversold conditions. MFI (Money Flow Index): Combines price and volume data to measure the buying and selling pressure in a security. Chaikin Money Flow (CMF): Calculates the flow of money into or out of a security based on price and volume. RMI (Relative Momentum Index): A momentum oscillator that measures the velocity and magnitude of price movements. Stochastic RSI: Combines the Stochastic oscillator and RSI to identify overbought or oversold conditions. PVO (Percentage Volume Oscillator): Measures the difference between two exponential moving averages of volume. Buy and sell signals are generated based on the following conditions:
"is_dip": Checks if the RMI, CCI, stochastic fast %K, MFI, and CMF indicators meet certain criteria to identify a market dip. "is_break": Looks for a significant breakout by checking the width of the Bollinger Bands, the number of times the price crosses below the lower band, and the distance between the price and the lower band. "buy_signal": Combines the "is_dip" and "is_break" conditions to generate a buy signal. The strategy sets a minimal return on investment (ROI) target and a stop loss percentage. It operates on 5-minute timeframe data and processes only new candles. It also ignores the ROI target if a buy signal is present. The strategy requires at least 200 startup candles for indicator calculations. In the "populate_buy_trend" function, the strategy sets the "buy" column to 1 when a buy signal is present. In the "populate_sell_trend" function, the strategy sets the "sell" column to 1 when the price crosses below the Bollinger Bands' middle or upper band. Overall, the strategy aims to capitalize on market dips and subsequent recoveries, using a combination of technical indicators to identify favorable entry and exit points.