OPEN-SOURCE SCRIPT
First CoSD Directional Strategy

This strategy is optimized for EURUSD on the 4-hour timeframe.
This strategy captures directional momentum by trading the first confirmed Change of State of Delivery (CoSD) — a structural break above the most recent swing high (bullish) or below the most recent swing low (bearish). Once a CoSD is detected, the strategy enters in that direction and holds the position until an opposing CoSD occurs.
Key features:
✅ Directional bias lock: Only one trade per directional shift. No re-entries until reversal.
✅ Swing-based stop loss: SL is anchored to the most recent structural level — swing low for longs, swing high for shorts.
✅ 2:1 reward-to-risk targeting: TP is calculated as twice the distance between entry and SL.
✅ Clean displacement logic: No indicators, no noise — just price structure and delivery.
This strategy is ideal for traders who want to align with market structure and displacement without overtrading. It’s built for clarity, discipline, and directional conviction.
This strategy captures directional momentum by trading the first confirmed Change of State of Delivery (CoSD) — a structural break above the most recent swing high (bullish) or below the most recent swing low (bearish). Once a CoSD is detected, the strategy enters in that direction and holds the position until an opposing CoSD occurs.
Key features:
✅ Directional bias lock: Only one trade per directional shift. No re-entries until reversal.
✅ Swing-based stop loss: SL is anchored to the most recent structural level — swing low for longs, swing high for shorts.
✅ 2:1 reward-to-risk targeting: TP is calculated as twice the distance between entry and SL.
✅ Clean displacement logic: No indicators, no noise — just price structure and delivery.
This strategy is ideal for traders who want to align with market structure and displacement without overtrading. It’s built for clarity, discipline, and directional conviction.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.