The Obelisk_Ichimoku_Slow_v1_1 strategy is a backtesting strategy that uses the Ichimoku indicator to generate buy and sell signals. Here's a breakdown of what the strategy does:
populate_indicators function:
This function is responsible for populating the indicators on the input dataframe. If the strategy's timeframe matches the informative timeframe:
The indicators are calculated directly on the input dataframe.
If the timeframes don't match:
If there is no informative dataframe available, the function returns the original dataframe.
Otherwise, the indicators are calculated on the informative dataframe.
The informative dataframe is then merged with the input dataframe, aligning the data based on the timeframes. Certain columns are skipped to avoid duplicate columns with suffixes. The resulting merged dataframe is returned. populate_buy_trend function:
This function populates the buy signals on the dataframe. Rows where the 'go_long' column is greater than 0 are marked as a buy with a value of 1. populate_sell_trend function:
This function populates the sell signals on the dataframe. Rows where the 'go_long' column is equal to 0 are marked as a sell with a value of 1. Overall, the strategy calculates indicators, generates buy and sell signals based on the 'go_long' column, and returns the modified dataframe with buy and sell flags.