The EMA VWAP code pack

Everything behind my "82% pass rate" video: the backtester, every trade, and all 5,184 versions I tested.

Buy it for $7One payment. The download opens as soon as you pay.

Or get every code pack free with Backtest Lab, my channel membership, for $4.99 a month.

Thumbnail of my video testing the EMA VWAP strategyWatch the video first

Three 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
$29,985$020232025
Running total after every trade, 3 micros, his commission and slippage taken out.

What the test found

My Funded Futures 50K: 82% counting closed trades only, 50% with open losses counted, none passed with every trade closed before 4:10 PM
The 82% only holds if you ignore open losses and the 4:10 PM close.
The best version: NQ, 5-minute, EMA 50, longs only, +$16,231 from 2016 to 2026
The best of 5,184: about $16,000 on 3 micros over almost 11 years.
The 9 settings tested in every combination, 5,184 versions
Nine settings, every combination.

What you download

  • vwap_ema_backtester.py

    The 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.

MarketChartSide2016–192020–222023–26PF
NQ5m, EMA 50long (in the pack)$816$8,165$7,5901.489
NQ5m, EMA 50long$605$8,218$7,5051.483
ES5m, EMA 50long$2,957$2,602$3,3761.316
ES5m, EMA 50long$3,136$2,406$3,3871.312
NQ5m, EMA 20long$893$3,961$1,5941.25
NQ5m, EMA 20long$899$4,140$1,2921.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 both

Before 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.