The BinHV45HyperOpted strategy is a trading strategy that uses Bollinger Bands and several other indicators to determine buy signals. Here is a description of what the strategy does:
The strategy calculates Bollinger Bands by taking the rolling mean and standard deviation of the stock price using a specified window size and number of standard deviations. The strategy populates additional indicators based on the Bollinger Bands and other price data, such as the difference between the mid and lower bands (bbdelta), the price difference between the open and close (pricedelta), the absolute difference between consecutive closing prices (closedelta), and the difference between the close and the low price (tail).
In the buy signal calculation, the strategy checks the following conditions:
The previous lower Bollinger Band is greater than 0.
The bbdelta is greater than a certain percentage of the closing price.
The closedelta is greater than a certain percentage of the closing price. The tail is less than a certain percentage of bbdelta. The current close price is lower than the previous lower Bollinger Band. The current close price is less than or equal to the previous close price. If all the conditions are met, a buy signal is generated. The sell signal is not implemented in this strategy, as indicated by the populate_sell_trend function. Therefore, the strategy does not generate any sell signals. The strategy also includes the following parameters:
buy_params: A dictionary containing the hyperparameters used in the buy signal calculation. minimal_roi: A dictionary specifying the desired return on investment at different time intervals. stoploss: The maximum loss percentage at which the strategy will sell a position. trailing_stop: A flag indicating whether to use a trailing stop or not. trailing_stop_positive: The percentage for a trailing stop when the position is in profit. trailing_stop_positive_offset: The offset for the trailing stop in profit. trailing_only_offset_is_reached: A flag indicating whether the trailing stop should only be activated when the offset is reached. The strategy is designed to be used with 1-minute timeframe data.