OPEN-SOURCE SCRIPT
NQ HMA Midday Strategy

The Story Behind This Strategy
This strategy didn't come from a quick backtest or a weekend project. It's the result of months of systematic research across multiple strategy families (DVD, Zscore, HMA) on both NQ and ES futures.
My Research Process:
I started with six strategy families and ran extensive backtests spanning from 2019 through April 2025, followed by recent validation from 2025 through April 2026. My goal wasn't to maximize historical PnL - it was to identify robust strategies with better drawdown behavior, stronger profit factors, and more stable portfolio-level risk/reward.
After evaluating hundreds of parameter combinations and multiple objective functions, I narrowed down to two core NQ candidates. This HMA Midday strategy emerged as one of them because it showed:
Strong recent performance (2025-2026: $16,865 profit, 1.53 profit factor)
Reasonable drawdown characteristics ($8,940 max drawdown)
Clean portfolio behavior when combined with other strategies
Better risk-adjusted returns than the baseline HMA version
What This Strategy Actually Does:
It's a momentum-based system using Hull Moving Averages, EMAs, and Rate of Change to identify trade setups during specific time windows (11:00-15:45 ET trading, 10:30-13:00 ET entries). I added the one-trade-per-day limit after observing that multiple daily entries often degraded risk-adjusted returns.
The Honest Truth:
This is still a research strategy, not a live-trading system
I have a Python version with walk-forward optimization that I use to tune parameters when market regimes change
Parameters should be re-optimized periodically - they're not set-and-forget
The strategy works best as part of a portfolio, not in isolation
Past performance (2019-2026) doesn't guarantee future results
Why I'm Publishing It:
To share the methodology and code structure with the community. The approach - combining trend indicators with momentum filters, time windows, and ATR-based risk management - is worth studying even if you don't trade this exact configuration.
Developer: QuantByBoji
Status: Research candidate, not live-trading recommendation
This strategy didn't come from a quick backtest or a weekend project. It's the result of months of systematic research across multiple strategy families (DVD, Zscore, HMA) on both NQ and ES futures.
My Research Process:
I started with six strategy families and ran extensive backtests spanning from 2019 through April 2025, followed by recent validation from 2025 through April 2026. My goal wasn't to maximize historical PnL - it was to identify robust strategies with better drawdown behavior, stronger profit factors, and more stable portfolio-level risk/reward.
After evaluating hundreds of parameter combinations and multiple objective functions, I narrowed down to two core NQ candidates. This HMA Midday strategy emerged as one of them because it showed:
Strong recent performance (2025-2026: $16,865 profit, 1.53 profit factor)
Reasonable drawdown characteristics ($8,940 max drawdown)
Clean portfolio behavior when combined with other strategies
Better risk-adjusted returns than the baseline HMA version
What This Strategy Actually Does:
It's a momentum-based system using Hull Moving Averages, EMAs, and Rate of Change to identify trade setups during specific time windows (11:00-15:45 ET trading, 10:30-13:00 ET entries). I added the one-trade-per-day limit after observing that multiple daily entries often degraded risk-adjusted returns.
The Honest Truth:
This is still a research strategy, not a live-trading system
I have a Python version with walk-forward optimization that I use to tune parameters when market regimes change
Parameters should be re-optimized periodically - they're not set-and-forget
The strategy works best as part of a portfolio, not in isolation
Past performance (2019-2026) doesn't guarantee future results
Why I'm Publishing It:
To share the methodology and code structure with the community. The approach - combining trend indicators with momentum filters, time windows, and ATR-based risk management - is worth studying even if you don't trade this exact configuration.
Developer: QuantByBoji
Status: Research candidate, not live-trading recommendation
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.