OPEN-SOURCE SCRIPT
Cập nhật NDX Monthly MA Env Signal Weekly Execution

NDX Monthly MA Env Signal Weekly Execution
A trend-following strategy on the Nasdaq-100 that uses monthly envelope bands for entry timing, executed on the weekly chart.
How It Works
The monthly envelope: A 10-month simple moving average of NDX monthly closes defines the centreline. Top and bottom bands sit at ±5% from the median.
Entry trigger: When the weekly close crosses above the monthly median (Launch), the strategy goes long. This captures the moment momentum shifts back into alignment with the monthly trend.
Exit trigger: A 3% buffer below the bottom band — when the monthly low crosses under bottom × 0.97, the strategy exits (Eject). This buffer avoids noise-exits on shallow dips that barely graze the band, while still catching genuine breakdowns (e.g. it cleanly sidestepped the April 2025 selloff).
All execution on the weekly timeframe — the strategy monitors monthly data but fires entries and exits as weekly crossovers, keeping it responsive without repainting.
Performance Snapshot
Metric Value
Trades 22 (21 closed + 1 open)
Win rate 76%
Profit factor 25.2
Net return +201%
Max drawdown −5.1%
Avg win / avg loss 7.9:1
Why It Works on NDX
The Nasdaq-100 has spent most of its history in a structural uptrend. This strategy stays long during the grind higher and only exits when price materially violates the lower envelope — filtering out routine pullbacks while preserving capital during genuine corrections. The 5% band width and 3% exit buffer were tuned specifically for NDX's monthly volatility profile.
Usage
Chart: Apply to NASDAQ:NDX on the 1M timeframe for the envelope visualisation. Entry/exit signals appear on all timeframes since they reference weekly data.
Alert integration: The 🚀 Launch and Eject order labels can be wired to TradingView alerts for notification-only execution.
Timeframe note: The strategy uses process_orders_on_close=true — all entries and exits fire on the weekly close, not intra-week.
Risk disclaimer: Past performance does not guarantee future results. This strategy is designed for the NDX's historical behaviour; regime changes (e.g. sustained bear markets) will underperform buy-and-hold. Not financial advice.
A trend-following strategy on the Nasdaq-100 that uses monthly envelope bands for entry timing, executed on the weekly chart.
How It Works
The monthly envelope: A 10-month simple moving average of NDX monthly closes defines the centreline. Top and bottom bands sit at ±5% from the median.
Entry trigger: When the weekly close crosses above the monthly median (Launch), the strategy goes long. This captures the moment momentum shifts back into alignment with the monthly trend.
Exit trigger: A 3% buffer below the bottom band — when the monthly low crosses under bottom × 0.97, the strategy exits (Eject). This buffer avoids noise-exits on shallow dips that barely graze the band, while still catching genuine breakdowns (e.g. it cleanly sidestepped the April 2025 selloff).
All execution on the weekly timeframe — the strategy monitors monthly data but fires entries and exits as weekly crossovers, keeping it responsive without repainting.
Performance Snapshot
Metric Value
Trades 22 (21 closed + 1 open)
Win rate 76%
Profit factor 25.2
Net return +201%
Max drawdown −5.1%
Avg win / avg loss 7.9:1
Why It Works on NDX
The Nasdaq-100 has spent most of its history in a structural uptrend. This strategy stays long during the grind higher and only exits when price materially violates the lower envelope — filtering out routine pullbacks while preserving capital during genuine corrections. The 5% band width and 3% exit buffer were tuned specifically for NDX's monthly volatility profile.
Usage
Chart: Apply to NASDAQ:NDX on the 1M timeframe for the envelope visualisation. Entry/exit signals appear on all timeframes since they reference weekly data.
Alert integration: The 🚀 Launch and Eject order labels can be wired to TradingView alerts for notification-only execution.
Timeframe note: The strategy uses process_orders_on_close=true — all entries and exits fire on the weekly close, not intra-week.
Risk disclaimer: Past performance does not guarantee future results. This strategy is designed for the NDX's historical behaviour; regime changes (e.g. sustained bear markets) will underperform buy-and-hold. Not financial advice.
Phát hành các Ghi chú
Update (June 2026): Added a weekly 200 EMA trend filter. The strategy now only enters long when NDX's weekly close is above the 200 EMA — keeping it out of trades during bear markets and downtrends. The core signal remains a monthly MA envelope crossover (weekly close vs monthly SMA(10)), now gated by the 200 EMA for higher-quality entries.Phát hành các Ghi chú
NDX Monthly MA Env Signal Weekly ExecutionA trend-following strategy on the Nasdaq-100 that uses monthly envelope bands for entry timing, executed on the weekly chart.
How It Works
The monthly envelope: A 10-month simple moving average of NDX monthly closes defines the centreline. Top and bottom bands sit at ±5% from the median.
Entry trigger: When the weekly close crosses above the monthly median (Launch), the strategy goes long. This captures the moment momentum shifts back into alignment with the monthly trend.
Exit trigger: A 3% buffer below the bottom band — when the monthly low crosses under bottom × 0.97, the strategy exits (Eject). This buffer avoids noise-exits on shallow dips that barely graze the band, while still catching genuine breakdowns (e.g. it cleanly sidestepped the April 2025 selloff).
All execution on the weekly timeframe — the strategy monitors monthly data but fires entries and exits as weekly crossovers, keeping it responsive without repainting.
Performance Snapshot
Metric Value
Trades 22 (21 closed + 1 open)
Win rate 76%
Profit factor 25.2
Net return +201%
Max drawdown −5.1%
Avg win / avg loss 7.9:1
Why It Works on NDX
The Nasdaq-100 has spent most of its history in a structural uptrend. This strategy stays long during the grind higher and only exits when price materially violates the lower envelope — filtering out routine pullbacks while preserving capital during genuine corrections. The 5% band width and 3% exit buffer were tuned specifically for NDX's monthly volatility profile.
Usage
Chart: Apply to NASDAQ:NDX on the 1M timeframe for the envelope visualisation. Entry/exit signals appear on all timeframes since they reference weekly data.
Alert integration: The 🚀 Launch and Eject order labels can be wired to TradingView alerts for notification-only execution.
Timeframe note: The strategy uses process_orders_on_close=true — all entries and exits fire on the weekly close, not intra-week.
Risk disclaimer: Past performance does not guarantee future results. This strategy is designed for the NDX's historical behaviour; regime changes (e.g. sustained bear markets) will underperform buy-and-hold. Not financial advice.
Jun 28
Release Notes
Update (June 2026): Added a weekly 200 EMA trend filter. The strategy now only enters long when NDX's weekly close is above the 200 EMA — keeping it out of trades during bear markets and downtrends. The core signal remains a monthly MA envelope crossover (weekly close vs monthly SMA(10)), now gated by the 200 EMA for higher-quality entries.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.