The ClucHAnix_5m1 strategy is a trading strategy that involves the following steps:
Populating Indicators:
Calculating Heikin-Ashi candles (open, close, high, low). Calculating Bollinger Bands with a window size of 40 and 2 standard deviations. Calculating the absolute difference between the Bollinger Bands' middle line and lower line.
Calculating the absolute difference between consecutive Heikin-Ashi candle close prices.
Calculating the absolute difference between the Heikin-Ashi candle close price and low price.
Calculating exponential moving averages (EMA) for the Heikin-Ashi candle close price with time periods of 3 and 50. Calculating the rolling mean of volume with a window size of 30. Calculating the Rate of Change Ratio (ROCR) for the Heikin-Ashi candle close price with a time period of 28. Calculating the Relative Strength Index (RSI) for the data. Calculating the Fisher Transform indicator based on RSI. Retrieving additional informative data with a timeframe of 1 hour and merging it with the original dataframe. Calculating percentage change, average percentage change, and normalized percentage change. Populating Buy Trend:
Identifying buy signals based on certain conditions:
Rate of Change Ratio (ROCR) for the 1-hour timeframe is greater than a specified value. Lower Bollinger Band value is greater than 0. Absolute difference between Bollinger Bands' middle line and Heikin-Ashi candle close price is greater than a certain percentage of the close price. Absolute difference between consecutive Heikin-Ashi candle close prices is greater than a certain percentage of the close price. Absolute difference between Heikin-Ashi candle close price and low price is less than a certain percentage of the Bollinger Bands' lower line. Heikin-Ashi candle close price is less than the previous lower line value. Heikin-Ashi candle close price is less than or equal to the previous close price. Heikin-Ashi candle close price is lower than the EMA slow line. Heikin-Ashi candle close price is lower than a specified percentage of the Bollinger Bands' lower line. Marking the corresponding rows in the dataframe with a "buy" signal. Populating Sell Trend:
Identifying sell signals based on certain conditions:
Fisher Transform indicator value is greater than a specified threshold. Heikin-Ashi candle high price is less than or equal to the previous high price. Previous high price is less than or equal to the high price before it. Heikin-Ashi candle close price is less than or equal to the previous close price. EMA fast line is greater than the Heikin-Ashi candle close price. Heikin-Ashi candle close price multiplied by a specified value is greater than the Bollinger Bands' middle line. Volume is greater than 0. Marking the corresponding rows in the dataframe with a "sell" signal. The ClucHAnix_5mTB1 strategy is an extension of ClucHAnix_5m1, and it adds the following functionality:
Populating indicators using the parent strategy's method. Implementing a trailing buy feature that dynamically adjusts the trailing buy order based on the current price and predefined offset values. Confirming trade entry based on certain conditions. Handling the trailing buy order process by monitoring the