The BinHV45 strategy is a backtesting strategy that uses Bollinger Bands to identify buying opportunities in the market. Here's a breakdown of what the strategy does:
Calculates Bollinger Bands: The strategy calculates the Bollinger Bands using the stock price data. Bollinger Bands consist of a middle band (rolling_mean) and a lower band (lower_band) that are calculated based on a specified window size and number of standard deviations.
Populates indicators: The strategy populates additional indicators based on the calculated Bollinger Bands.
These indicators include:
'bbdelta': Absolute difference between the middle band and lower band.
'pricedelta': Absolute difference between the opening and closing prices. 'closedelta': Absolute difference between the current closing price and the previous closing price. 'tail': Absolute difference between the closing price and the lowest price within the period. Populates buy trend: The strategy identifies buy signals based on specific conditions:
The lower band in the previous period is greater than 0. 'bbdelta' is greater than the closing price multiplied by 0.008. 'closedelta' is greater than the closing price multiplied by 0.0175. 'tail' is less than 25% of 'bbdelta'. The current closing price is less than the previous lower band. The current closing price is less than or equal to the previous closing price. Populates sell trend: The strategy does not provide any specific sell signals. The strategy also includes other parameters such as the minimal return on investment (ROI) targets, stoploss, timeframe, and trailing stop settings. Overall, the BinHV45 strategy aims to identify potential buying opportunities based on Bollinger Bands and specific conditions related to the stock price and its relationship with the Bollinger Bands.