The Ichimoku_v2 strategy is a trading strategy that utilizes the Ichimoku Cloud indicator to generate buy and sell signals. Here's a breakdown of what the strategy does:
Indicator Calculation:
The strategy calculates various components of the Ichimoku Cloud indicator, including the conversion line, base line, leading span A, leading span B, and cloud colors (green and red). These calculations are performed using the ichimoku function from the technical.indicators module.
Buy Signal Generation:
The strategy generates a buy signal when the following conditions are met:
The leading span A crosses above the leading span B.
The closing price is above both the leading span A and leading span B.
The cloud color is green. Additionally, a buy signal is generated when the conversion line crosses above the base line and the closing price is above both the leading span A and leading span B. Sell Signal Generation:
The strategy generates a sell signal when the following conditions are met:
The leading span B crosses above the leading span A. The closing price is below both the leading span A and leading span B. The cloud color is red. Additionally, a sell signal is generated when the conversion line crosses below the base line and the cloud color is red. The strategy aims to achieve a minimal return on investment (ROI) of 10% and has a stop loss of -1 (meaning there is no specific stop loss percentage defined). It operates on a ticker interval of 4 hours. Please note that the informative_pairs function and the trailing stop-loss features are not utilized in this strategy. Overall, the Ichimoku_v2 strategy leverages the Ichimoku Cloud indicator to identify potential buying and selling opportunities based on specific market conditions.