The DIV_v1 strategy is a trading strategy designed for backtesting. It utilizes the Freqtrade framework and implements the IStrategy interface. Here is a brief description of what the strategy does:
The strategy uses the 5-minute timeframe for analyzing price data.
It sets a minimal return on investment (ROI) of 0.05 (5%).
A stop loss is set at -0.05 (-5%) to limit potential losses.
The strategy requires at least 200 startup candles before making any decisions. It processes only new candles, indicating that it focuses on real-time data. A trailing stop is enabled, which adjusts the stop loss level as the price moves in a favorable direction. The positive offset for the trailing stop is set to 0.001, and the offset at which trailing-only mode is activated is set to 0.02. The strategy generates two main plots: one for the OHLC (open, high, low, close) prices with markers representing divergence, and another for the RSI (Relative Strength Index) with markers representing divergence. The RSI indicator with a time period of 14 is calculated. The strategy identifies bullish divergence based on the RSI indicator and the OHLC prices. It marks points where the price makes higher lows while the RSI makes lower lows. The strategy generates a "buy" signal when bullish divergence is detected, the RSI is below 30, and the volume is greater than zero. The strategy does not specify any conditions for generating a "sell" signal, so it holds the position until further instructions. The strategy relies on various functions and libraries, such as Pandas, talib, and numpy, for data manipulation and technical analysis calculations.