VWAP Trend looks at how much VWAP has moved over a lookback window
and labels the result +1 (rising), -1 (falling), or 0 (flat
within tolerance).
Logic
slope = (vwap[t] - vwap[t-lookback]) / vwap[t-lookback]
if slope > threshold: +1
if slope < -threshold: -1
otherwise: 0Params
lookback- how many bars to measure the slope over.threshold- flat band as a fraction (e.g.0.001= 0.1%).
Output
Single column named after your indicator (e.g. VWAP trend).
Usage
A simple, hard regime tag. Useful as a filter:
{ "type": "comparison", "indicator": "vwap_trend", "operator": "==", "value": 1 }Means "only enter when VWAP is rising."
Pitfalls
The flat band can swallow real moves on calm timeframes. Calibrate
threshold against historical slopes on the symbol you're trading.
