Before you start
Four quick things. Tick them as you go.
Written by Dan Freeman · last checked
The PFX SLM and PFX HTF strategies ship with a kitchen-sink template: one optimisation that searches the settings that matter, on your instrument, your dates and your costs. This guide takes you from the download to a result you can trust, or to the honest answer that there isn't one. No results are shown until a strategy has an out-of-sample test, and when they are, the optimised numbers sit next to the out-of-sample ones so you can see the difference.
That is the search working, not an edge. Every step after step 5 is about one question: does the result survive data it never saw? Most will not, and knowing that before you risk money is the point.
Four quick things. Tick them as you go.
One zip, one import, one folder copied.
PFX_SLM_NT8 (or PFX_HTF_NT8) → Remove, then restart NinjaTrader. The strategy download already contains the indicator.PFX_SLM_Strategy_NT8.zip (or the HTF one). Restart when it asks.Documents\NinjaTrader 8. Say Yes to merge folders.Documents\NinjaTrader 8The import fails and mentions duplicates or existing files. The indicator download is still installed. Remove it (point 2) and import again.
No templates in the Strategy Analyzer later. The folder must end up as Documents\NinjaTrader 8\templates\Strategy\PFXSLMStrategy. Copy the whole templates folder, not the files inside it.
One template sets the whole optimisation up.
Every setting is a single number. The template did not load. Re-copy the templates folder (step 1) and restart NinjaTrader.
Costs change which settings win, not just the totals.
The most important step in this guide.
| In-sample | Out-of-sample | |
|---|---|---|
| What it is for | Searching for settings | Checking them, once |
| How much | About two thirds | About one third, the newest |
| May you change settings because of it? | Yes | Never |
Then let the PC work.
Look at the top 20 rows, not just the first one.
| Check | Keep a row only if |
|---|---|
| Trades | 100 or more in the in-sample window. Fewer is a coin toss. |
| Neighbours | Rows with similar settings also do well. A lone spike is noise; a plateau is worth testing. |
| Edges | The setting is not at the very end of its range. If it is, widen that one range and run again. |
| Drawdown | You could sit through it with real money, at the size you would really trade. |
| Simple | When two rows are close, prefer the one with fewer filters switched on. |
Pick three to five rows that pass and write each row's settings down.
Once per row. No second tries.
Weeks, not days.
Through NinjaTrader, on your account. The PFX Perps Bridge inside it stays Off unless you trade BTC or ETH on MyFundedPerps and have followed its own guide.
Entry on a confirmation close, same-bar ties counted as stops, New York session hours, the trade log off and the PFX Perps Bridge Off are pinned on purpose.
| Setting | Range searched |
|---|---|
Swing length (bars) for structure SwingLen | 2 to 12, step 2 |
Require a change of character RequireChoch | On / Off |
How far back a gap may be (bars) FvgBack | 10 to 70, step 20 |
Smallest gap (x ATR) FvgMinAtr | 0.3 to 1.5, step 0.2 |
Largest gap (x ATR, 0 = no limit) FvgMaxAtr | 0 to 3, step 0.5 |
Entry depth into the gap (%) RetracePct | 30 to 90, step 10 |
Trade only with the EMA bias UseBiasGate | On / Off |
Bias EMA length BiasGateEma | 20 to 200, step 30 |
Target (x risk) TpRunR | 0.5 to 2, step 0.3 |
Smallest stop allowed (ticks) MinRTicks | MGC 0 to 60 step 20, MNQ 0 to 120 step 40 ($0 to $60 a contract) |
Structure filter UseStructFilter | On / Off |
Move the stop to break-even RunBE | On / Off |
Time exit TimeExit | On / Off |
Session start hour (New York) SessionStart | 0 to 20, step 4 |
Session end hour (New York, start = end means all day) SessionEnd | 0 to 20, step 4 |
| Setting | Range searched |
|---|---|
Swing length (bars) for structure SwingLen | 2 to 12, step 2 |
Smallest higher-timeframe gap (x HTF ATR) HtfMinAtr | 0.35 to 2.75, step 0.3 |
Largest higher-timeframe gap (x chart ATR, 0 = no limit) HtfMaxAtr | 0 to 3, step 0.5 |
Setups armed per gap MaxHtfSignals | 1 to 3, step 1 |
Entry depth into the gap (%) HtfRetracePct | 30 to 90, step 10 |
Trade only with the EMA bias UseBiasGate | On / Off |
Bias EMA length BiasGateEma | 20 to 200, step 30 |
Target (x risk) TpRunR | 0.5 to 2, step 0.3 |
Smallest stop allowed (ticks) MinRTicks | MGC 0 to 60 step 20, MNQ 0 to 120 step 40 ($0 to $60 a contract) |
Structure filter UseStructFilter | On / Off |
Move the stop to break-even RunBE | On / Off |
Time exit TimeExit | On / Off |
Session start hour (New York) SessionStart | 0 to 20, step 4 |
Session end hour (New York, start = end means all day) SessionEnd | 0 to 20, step 4 |
Whatever the answer was, it came from your data and your costs.
Risk warning: Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing one's financial security or lifestyle. Only risk capital should be used for trading, and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results.
NinjaTrader is a registered trademark of NinjaTrader Group, LLC; PrecisionFX is not affiliated with or endorsed by NinjaTrader.