The "brideofcluckie" strategy is a trading strategy that involves the following steps:
Indicators Population: The strategy first populates various indicators based on the input dataframe and metadata. It retrieves an informative dataframe using the specified pair and timeframe. Then, it applies informative indicators to the informative dataframe.
After that, it merges the informative dataframe with the original dataframe, adjusting the columns and filling missing values.
Heikin-Ashi Calculation: Heikin-Ashi candles are calculated based on the original dataframe.
The strategy creates four new columns representing Heikin-Ashi open, close, high, and low prices. Bollinger Bands Calculation: Bollinger Bands are computed using the typical price derived from the Heikin-Ashi candles. The strategy calculates the mid and lower bands using a window size of 40 and two standard deviations. It adds two new columns representing the lower and mid bands. Delta and Tail Calculations: The strategy calculates the absolute difference between the mid band and lower band (bbdelta), the absolute difference between consecutive Heikin-Ashi close prices (closedelta), and the absolute difference between the Heikin-Ashi close price and low price (tail). It adds three new columns for these calculations. Additional Columns: The strategy creates additional columns for convenience. It duplicates the lower band column and renames it as "bb_lowerband" and duplicates the mid band column and renames it as "bb_middleband." It also computes the 50-period exponential moving average (ema_slow) of the Heikin-Ashi close price and the 30-period rolling mean (volume_mean_slow) of the volume. Buy Trend Population: The strategy determines the buy signals based on certain conditions. It uses the parameters specified for buying. If the conditions for either the "BinHV45" or "ClucMay72018" strategy are satisfied, it sets the corresponding "buy" column to 1. Sell Trend Population: The strategy determines the sell signals based on certain conditions. It uses the parameters specified for selling. If the condition for selling, involving the comparison between the Heikin-Ashi close price multiplied by a parameter and the mid band, as well as the volume, is satisfied, it sets the "sell" column to 1. The strategy aims to generate buy and sell signals based on the calculated indicators and specific conditions, which can be used for backtesting purposes on a trading platform or website.