The EMA VWAP code pack
Everything behind my "82% pass rate" video: the backtester, every trade, and all 5,184 versions I tested.
Or get every code pack free with Backtest Lab, my channel membership, for $4.99 a month.
Watch the video firstThree trade logs are inside
His run reproduced to the dollar: $29,985 from 2023. Close every trade before 4:10 PM, like My Funded Futures does, and the same rules made −$2,428. The best of 5,184 versions made $16,231 from 2016 to 2026.
- Market
- MES, 3-minute, held overnight, 2023 to 2026
- Trades
- 396, 56.6% won
- Running total
- $29,985
What the test found



What you download
vwap_ema_backtester.pyThe backtester. One Python file, nothing to install. It runs the best version by default, every setting is an option, and it prints the My Funded Futures challenge results.
best-version/All 437 trades of the best version, 2016 to 2026.
his-rules/His published run reproduced, and the same rules with every trade closed before 4:10 PM.
all-5184-versions/Every version I tested, one row each, with its profit in three periods and its profit factor.
Every version I tested
114 of 5,184 made money in all three periods with at least 300 trades and a profit factor of 1.1 or more. These are the six with the best profit factor. The top one is the version in this pack.
| Market | Chart | Side | 2016–19 | 2020–22 | 2023–26 | PF |
|---|---|---|---|---|---|---|
| NQ | 5m, EMA 50 | long (in the pack) | $816 | $8,165 | $7,590 | 1.489 |
| NQ | 5m, EMA 50 | long | $605 | $8,218 | $7,505 | 1.483 |
| ES | 5m, EMA 50 | long | $2,957 | $2,602 | $3,376 | 1.316 |
| ES | 5m, EMA 50 | long | $3,136 | $2,406 | $3,387 | 1.312 |
| NQ | 5m, EMA 20 | long | $893 | $3,961 | $1,594 | 1.25 |
| NQ | 5m, EMA 20 | long | $899 | $4,140 | $1,292 | 1.248 |
Change a setting, run it again
Want his settings, a stop, or shorts too? Every one of the nine settings is an option on the command line. This is the real default from the top of the file.
BEST = dict(market="NQ", tf=5, ema=50,
filt=1.1, stop=None,
entries="both", side="long",
cutoff=16 * 60, tries=2)
# his settings, closed before 4:10 PM:
# python3 vwap_ema_backtester.py ES_1m.csv \
# --market ES --tf 3 --ema 11 --side bothBefore you buy
Price data isn't included. I tested on licensed 1-minute futures data I'm not allowed to share, so you need your own ES or NQ file. The top of the code says the format it reads.
It's a backtest, not a signal. The best version is one pick out of 5,184, has no stop, and could be luck. Run it on a sim before you put money on it.
This is my code, not his. The strategy is RoboQuant's template. The pack is my own Python version of its rules, written for the test.
Channel members get it free. If you're in Backtest Lab, the code is in the members' post. Something broken? Email eddypips@eddypipstrading.com.
Get the code for $7
Or get every code pack free with Backtest Lab for $4.99 a month.