OPEN-SOURCE SCRIPT

Ichimoku Cloud + ATR / Owl of Profit

Ichimoku Cloud + ATR Strategy

This strategy combines the Ichimoku Cloud and the Average True Range (ATR) to identify trade opportunities and set dynamic stop-loss levels based on market volatility.

Features:
Ichimoku Cloud Components:

Tenkan-Sen (Conversion Line): 9-period midpoint of the highest high and lowest low (default).
Kijun-Sen (Base Line): 26-period midpoint of the highest high and lowest low (default).
Senkou Span A: Average of Tenkan-Sen and Kijun-Sen, displaced 26 periods forward.
Senkou Span B: 52-period midpoint of the highest high and lowest low, displaced 26 periods forward.
Chikou Span: Current close, displaced 26 periods backward.
ATR (Average True Range):

Used to calculate stop-loss levels based on market volatility.
ATR multiplier is customizable (default: 1.5).
Entry and Exit Logic:
Long Condition:

Tenkan-Sen crosses above Kijun-Sen.
Price is above both Senkou Span A and B.
Chikou Span is above the current close.
Stop-Loss: Dynamic, set below the entry price by a multiple of ATR.
Short Condition:

Tenkan-Sen crosses below Kijun-Sen.
Price is below both Senkou Span A and B.
Chikou Span is below the current close.
Stop-Loss: Dynamic, set above the entry price by a multiple of ATR.
Exit Conditions:

For longs, exit when Tenkan-Sen crosses below Kijun-Sen or Chikou Span falls below the close.
For shorts, exit when Tenkan-Sen crosses above Kijun-Sen or Chikou Span rises above the close.
Visualization:
Ichimoku Cloud: Displays bullish (green) and bearish (red) zones with a dynamic fill.
Tenkan-Sen, Kijun-Sen, and Chikou Span: Plotted for clarity in identifying trends and momentum.
Buy and Sell Signals: Marked with green "Long" and red "Short" labels. Exit points are also highlighted.
This strategy provides a comprehensive framework for trading trends while managing risk with volatility-based stop-loss levels. Use it for backtesting and further adaptation to your trading preferences.

Visit my website for more tools and strategies: bybitindicators.com

Happy trading!

כתב ויתור