The strategy, CombinedBinHAndClucV4, is a trading strategy that combines two different sub-strategies, BinHV45 and ClucMay72018, to determine when to buy and sell assets. In the populate_indicators method, the strategy calculates various indicators such as Bollinger Bands, moving averages, and volume averages. These indicators are used to generate trading signals.
The populate_buy_trend method defines the conditions for buying assets.
For the BinHV45 sub-strategy, it checks if the lower Bollinger Band is positive, the difference between the middle Bollinger Band and the lower Bollinger Band is greater than 0.8% of the closing price, the absolute difference between consecutive closing prices is greater than 1.75% of the current closing price, the difference between the closing price and the lowest price is less than 25% of the difference between the middle and lower Bollinger Bands, the closing price is lower than the previous lower Bollinger Band, the closing price is less than or equal to the previous closing price, and the volume is not zero.
For the ClucMay72018 sub-strategy, it checks if the closing price is below the exponential moving average (EMA), the closing price is less than 98.5% of the lower Bollinger Band, the volume is less than 20 times the previous volume average, and the volume is not zero. If any of these conditions are met, a "buy" signal is generated. The populate_sell_trend method defines the conditions for selling assets. It checks if the closing price is above the upper Bollinger Band, and the previous closing price, as well as the previous four high prices, are all above their respective upper Bollinger Bands. Additionally, the volume is checked to ensure it is not zero. If these conditions are met, a "sell" signal is generated. Overall, the CombinedBinHAndClucV4 strategy combines the buying conditions of the BinHV45 and ClucMay72018 sub-strategies to generate signals for buying and selling assets.