PROTECTED SOURCE SCRIPT
Updated Cognex Fibonacci Breakout Strategy

THE COMPLETE TRADE LOGIC (What We Want):
Step 1: Morning Session (9:30-10:30)
Track session high and low
Step 2: After 10:30 - Wait for Breakout
Bullish: Close above session high
Bearish: Close below session low
Step 3: Track Extreme After Breakout
Keep updating highest_after_breakout or lowest_after_breakout
This continuously updates as price makes new extremes
Step 4: Detect 28% Retracement (THE LOCK)
When price retraces to 28%, set last_extreme_for_retracement to the current extreme
This LOCKS the extreme for fibonacci calculations
fib_100 should use this locked value
Step 5: Place Limit Order EARLY (at 20% retracement)
When price retraces to 20%, place limit order at 28% entry
This is so the order is ready when price hits 28%
Step 6: Cancel & Recalculate if New Extreme
If price makes a NEW extreme AFTER the order is placed
Cancel the old order
Wait for new 20% retracement to place new order
Step 7: One Trade Per Day
Only ONE order placement attempt per day
Even if cancelled, don't try again
Step 1: Morning Session (9:30-10:30)
Track session high and low
Step 2: After 10:30 - Wait for Breakout
Bullish: Close above session high
Bearish: Close below session low
Step 3: Track Extreme After Breakout
Keep updating highest_after_breakout or lowest_after_breakout
This continuously updates as price makes new extremes
Step 4: Detect 28% Retracement (THE LOCK)
When price retraces to 28%, set last_extreme_for_retracement to the current extreme
This LOCKS the extreme for fibonacci calculations
fib_100 should use this locked value
Step 5: Place Limit Order EARLY (at 20% retracement)
When price retraces to 20%, place limit order at 28% entry
This is so the order is ready when price hits 28%
Step 6: Cancel & Recalculate if New Extreme
If price makes a NEW extreme AFTER the order is placed
Cancel the old order
Wait for new 20% retracement to place new order
Step 7: One Trade Per Day
Only ONE order placement attempt per day
Even if cancelled, don't try again
Release Notes
this oneProtected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
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.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
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.