The "IchiV1_Fixed" strategy is a trading strategy that uses the Ichimoku cloud indicator and various moving averages to generate buy and sell signals. Here is a breakdown of how the strategy works:
Indicator Population:
The strategy starts by populating various indicators based on the input data. It uses the Heikin-Ashi technique to calculate modified open, high, and low prices.
Moving averages (EMAs) are calculated for different time periods on both the closing and opening prices.
A fan magnitude indicator is calculated by dividing the 1-hour closing EMA by the 8-hour closing EMA.
The Ichimoku cloud indicator is calculated using the modified prices, with parameters for conversion line period, base line periods, lagging span, and displacement. Additional indicators such as chikou span, tenkan sen, kijun sen, senkou spans, leading senkou spans, and cloud colors are also calculated. Average True Range (ATR) is calculated using the dataframe. Buy Trend Population:
The strategy determines buy conditions based on specified parameters. The conditions are set based on the buy trend levels (ranging from 1 to 8) and buy minimum fan magnitude gain. For each buy trend level, the strategy checks if the closing price of a specific time frame is above the corresponding senkou span of the Ichimoku cloud. It also checks if the closing price is higher than the opening price for each time frame. The fan magnitude gain is checked to be above the specified minimum value, and the fan magnitude itself should be greater than 1. Additional conditions involving the fan magnitude shift value are checked as well. Sell Trend Population:
The strategy determines sell conditions based on specified parameters. The condition checks if the 5-minute closing price crosses below a specified sell trend indicator. Output:
If the buy conditions are met, a "buy" signal is generated for the corresponding data points in the dataframe. If the sell conditions are met, a "sell" signal is generated for the corresponding data points in the dataframe. Overall, the strategy combines the use of Ichimoku cloud, moving averages, and other indicators to identify potential buy and sell opportunities in the market.