Ichimoku Backtester with TP, SL, and Cloud Confirmation
Overview
This is an Ichimoku backtesting strategy with take profit, stop loss and cloud confirmation. It aims to improve profitability by precisely capturing trends using the Ichimoku indicator.
Strategy Logic
The core of this strategy is constructing the Ichimoku components based on user input parameters - Tenkan-Sen, Kijun-Sen, Senkou Span A & B and Chikou Span. It identifies bullish (long) and bearish (short) signals when price crosses these equilibrium lines.
In addition, it implements stop loss and take profit based on entry price to manage risk & reward. There is also an option to wait for cloud confirmation, i.e. Senkou Span A > B for longs and Senkou Span A < B for shorts. This helps avoid false breakouts.
Advantages
The main advantages of this strategy are three-fold:
-
Ichimoku is good at identifying trends and momentum. The equilibrium lines provide solid support and resistance areas.
-
The stop loss and take profit features maximize reward while minimizing risk. This optimizes the risk-return profile.
-
Cloud confirmation filters out false signals, ensuring high-probability entries. This enhances profitability.
Risks
However, there are also a few key risks to consider:
-
Ichimoku is prone to whipsaws during range-bound markets with no clear trend. Lots of stops may be hit.
-
The cloud is a lagging indicator. By the time there is cloud confirmation, much of the move may have occurred already.
-
Optimizing stop loss and take profit levels is challenging and sensitive. Suboptimal parameters may result in more losses.
Enhancements
Some ways this strategy can be improved:
-
Combine Ichimoku with leading indicators like RSI for additional confirmation and early entry.
-
Adaptively adjust stop loss and take profit based on volatility instead of using fixed percentages.
-
Test optimal parameters across various assets and timeframes to identify best setups for strategy.
-
Incorporate machine learning to continually optimize parameters and strategy rules based on updated data.
Conclusion
This is a solid Ichimoku system with good trend capture and risk management features. With some enhancements, it can be an excellent addition to overall trading approach. It works well across forex, commodities and cryptocurrency markets.
/*backtest
start: 2022-11-17 00:00:00
end: 2023-11-23 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
strategy("Ichimoku Backtester with TP and SL", overlay=true,
currency = currency.USD, default_qty_type = strategy.percent_of_equity,
default_qty_value = 95)
//@version=4- 1

