OPEN-SOURCE SCRIPT
Sunmool's NY Lunch Model Backtesting

ICT NY Lunch Model Backtesting (12:00–13:00 NY) 🗽🍔
This research indicator tests an ICT narrative using the New York lunch window (12:00–13:00 America/New_York). It records that hour’s high/low and measures, during the post-lunch session (default 13:00–16:00), how often:
⬆️ If the afternoon trends up, the Lunch Low gets swept first.
⬇️ If the afternoon trends down, the Lunch High gets swept first.
It reports these as conditional probabilities, not trade signals. 📈
👀 What it shows
🟦 Lunch Range box (toggle): high/low from 12:00–13:00 NY
🔻🔺 Sweep signals (bar-anchored)
Low sweep: triangle below bar + optional “L”
High sweep: triangle above bar + optional “H”
🧱 Optional small box wrapping the swept candle
📊 Stats table (top-right)
P(L-swept | Up) — % of Up-days where Lunch Low was swept
P(H-swept | Down) — % of Down-days where Lunch High was swept
🔁 Contradictions + sample sizes (Up-days / Down-days)
🎯 Direction logic (Up/Down)
Anchor: 13:00 open (pmOpen) ⏰
Threshold: ATR × multiple or % from 13:00
Close ≥ pmOpen + threshold → Up-day
Close ≤ pmOpen − threshold → Down-day
Tiny moves under the threshold are ignored to reduce noise 🧹
⚙️ Inputs
🌐 Timezone: America/New_York (DST handled)
🍽️ Lunch window: 1200–1300
🕓 Post-lunch window: default 1300–1600 (try 17:00/20:00 for sensitivity)
📐 Trend threshold: ATR / Percent (with length/multiple or % level)
📅 Weekdays-only toggle (FX/Equities style)
👁️ Display toggles: Lunch box / sweep arrows / sweep text / sweep candle box / stats table
🔔 TF hint when chart TF > 15m
🧭 How to use
Use 5–15m charts for accurate lunch range capture.
Scroll ~1 year for meaningful samples.
Run sensitivity checks: vary ATR/% thresholds and the post-lunch end time.
For crypto, compare with vs without weekends. 🚀
🧠 Reading the results
High P(L-swept | Up) with a solid Up-day count ⇒ on up afternoons, lunch low is often swept.
High P(H-swept | Down) ⇒ on down afternoons, lunch high is often swept.
Lower Contradictions = cleaner tendency.
Remember: this is a probabilistic tendency, not a rule. 🎲
📝 Notes & limits
All markers (arrows, text, sweep boxes) are bar-anchored; the lunch range box is a research overlay you can toggle.
Real-time vs historical bar building can differ—interpret on bar close. 🔒
This research indicator tests an ICT narrative using the New York lunch window (12:00–13:00 America/New_York). It records that hour’s high/low and measures, during the post-lunch session (default 13:00–16:00), how often:
⬆️ If the afternoon trends up, the Lunch Low gets swept first.
⬇️ If the afternoon trends down, the Lunch High gets swept first.
It reports these as conditional probabilities, not trade signals. 📈
👀 What it shows
🟦 Lunch Range box (toggle): high/low from 12:00–13:00 NY
🔻🔺 Sweep signals (bar-anchored)
Low sweep: triangle below bar + optional “L”
High sweep: triangle above bar + optional “H”
🧱 Optional small box wrapping the swept candle
📊 Stats table (top-right)
P(L-swept | Up) — % of Up-days where Lunch Low was swept
P(H-swept | Down) — % of Down-days where Lunch High was swept
🔁 Contradictions + sample sizes (Up-days / Down-days)
🎯 Direction logic (Up/Down)
Anchor: 13:00 open (pmOpen) ⏰
Threshold: ATR × multiple or % from 13:00
Close ≥ pmOpen + threshold → Up-day
Close ≤ pmOpen − threshold → Down-day
Tiny moves under the threshold are ignored to reduce noise 🧹
⚙️ Inputs
🌐 Timezone: America/New_York (DST handled)
🍽️ Lunch window: 1200–1300
🕓 Post-lunch window: default 1300–1600 (try 17:00/20:00 for sensitivity)
📐 Trend threshold: ATR / Percent (with length/multiple or % level)
📅 Weekdays-only toggle (FX/Equities style)
👁️ Display toggles: Lunch box / sweep arrows / sweep text / sweep candle box / stats table
🔔 TF hint when chart TF > 15m
🧭 How to use
Use 5–15m charts for accurate lunch range capture.
Scroll ~1 year for meaningful samples.
Run sensitivity checks: vary ATR/% thresholds and the post-lunch end time.
For crypto, compare with vs without weekends. 🚀
🧠 Reading the results
High P(L-swept | Up) with a solid Up-day count ⇒ on up afternoons, lunch low is often swept.
High P(H-swept | Down) ⇒ on down afternoons, lunch high is often swept.
Lower Contradictions = cleaner tendency.
Remember: this is a probabilistic tendency, not a rule. 🎲
📝 Notes & limits
All markers (arrows, text, sweep boxes) are bar-anchored; the lunch range box is a research overlay you can toggle.
Real-time vs historical bar building can differ—interpret on bar close. 🔒
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menjadikannya sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Hormat untuk penulisnya! Meskipun anda dapat menggunakannya secara gratis, ingatlah bahwa penerbitan ulang kode tersebut tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menjadikannya sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Hormat untuk penulisnya! Meskipun anda dapat menggunakannya secara gratis, ingatlah bahwa penerbitan ulang kode tersebut tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.