"Ten points above the 20 EMA" is a big stretch in a quiet month and noise in a fast one, and it means something else again on NQ. The Distance node measures how far one value sits from another in a unit you choose: points, ticks, percent, ATRs or standard deviations. Choose a unit that scales with the market and the same rule keeps meaning the same thing, on ES in 2018 or NQ today.
- Takes
- A value, and a reference to measure it from
- Gives
- The signed distance, positive when the value is above
- Reach for it
- A threshold like “more than 2 ATRs below VWAP” or “within 8 ticks of the level”
How it works
Wire the thing that moves into Value and the level into Reference. The output is the value minus the reference, converted to your unit, so it's positive above the reference and negative below. Compare it with a Constant in the same unit.
| Unit | The distance is | Good for |
|---|---|---|
| Points | Value − reference | One market where volatility stays put |
| Ticks | Points ÷ the tick size (0.25 on ES and NQ, 0.01 on stocks) | Rules about order placement |
| % | 100 × (value − reference) ÷ reference | Stocks at very different prices |
| ATR | Points ÷ the ATR over the period you set | Thresholds that should scale with volatility |
| Std dev | How unusual the gap is next to its own recent history | Stretches judged against what's normal lately |
Points are the trap. A threshold in points quietly assumes the market's typical move never changes, and it does: across years, across regimes, and between instruments. NQ covers far more points in a day than ES, so a 10-point rule written on ES barely registers there. Measured in ATRs, the threshold breathes with the market, which is usually what you meant in the first place.
Points, ticks, percent and ATR are plain arithmetic, so they work on live price and update on every trade. That's also why a Crossover or a modifier can't read them: those want a value that settles once per bar. When you want the moment, cross the underlying values instead.
Example: buy a stretch below VWAP
Say you trade ES 5m and want to buy sharp selloffs away from the day's VWAP, but only real ones. Ten points below VWAP is a different event on a calm day than on a wild one, so measure in ATRs.
Add a Distance node with the unit set to ATR and the period at 14. Wire Current Price into Value and the VWAP into Reference. Then a Comparison: the distance Less Than a Constant of −2. That's true while price is more than two ATRs below VWAP. AND it with your reversal trigger into a long Entry.
Point the same strategy at NQ and the rule still says two ATRs below VWAP, no translation needed. Whether the edge survives the move is for the backtest to tell you, but at least the question is the same one.
Settings
Use something else when
When it doesn't behave
Price below the level reads positive
Value and Reference are swapped. The distance is value minus reference, so the moving thing goes into Value and the level into Reference.
The builder refuses my Std dev distance
One of the inputs is live price, or something that isn't a bar value, like a Math node. Standard deviations need two values from completed bars. Use points, ticks, percent or ATR for live price.
A Crossover won't read my Distance
In points, ticks, percent or ATR the distance is worked out on every trade, and a Crossover needs a value that settles at the bar. Wire the values themselves into the Crossover, or compare the distance with a Comparison, which reads it on every trade.
Going further
The period is sweepable, and so is the Constant you compare against. The unit isn't, because switching from points to ATRs changes the question rather than tuning it.
A Distance in ATRs makes a good guard against chasing. Give a trend entry one more condition, price no more than half an ATR above its 20 EMA, and it buys near the average instead of after the move has already run.