The Obelisk_TradePro_Ichi_v1_1 strategy is an implementation of the Ichimoku Cloud trading strategy. Here's a breakdown of what the strategy does:
populate_indicators function:
Calculates the Ichimoku Cloud indicator using the input dataframe. Sets the displacement value to 30.
Computes various components of the Ichimoku Cloud, such as conversion line, base line, lagging span, and chikou span.
Adds the computed values to the dataframe.
Indicators added to the dataframe:
chikou_span: Represents the chikou span line. tenkan_sen: Represents the tenkan sen line. kijun_sen: Represents the kijun sen line. senkou_a: Represents the senkou span A line. senkou_b: Represents the senkou span B line. leading_senkou_span_a: Represents the leading senkou span A line. leading_senkou_span_b: Represents the leading senkou span B line. cloud_green: Represents the green cloud area (multiplied by 1). cloud_red: Represents the red cloud area (multiplied by -1). Additional computed columns:
future_green: Determines if the leading senkou span A is greater than the leading senkou span B and assigns a value of 2 if true. chikou_high: Compares the chikou span value with senkou span A and senkou span B and assigns a value of 1 if true (shifted by the displacement value). populate_buy_trend function:
Sets the 'buy' column to 1 when the 'go_long' value crosses above 0. populate_sell_trend function:
Sets the 'sell' column to 1 when the tenkan sen line crosses below the kijun sen line or when the close price crosses below the kijun sen line. The strategy utilizes the Ichimoku Cloud and other conditions to generate buy and sell signals for backtesting trading strategies.