STAT-ARB PRO
Gold and the US Dollar Index are tied together, but short-term flows push them apart. STAT-ARB PRO [ZynAlgo] estimates where gold should trade given the dollar, signals when price stretches far away from that level, and exits as the gap closes. Built for XAUUSD against DXY, with M5 as the main timeframe and M15 as an alternative.
Key benefits
- A real statistical edge, not a single stretched candle - a rolling regression gives the price level the reference market implies; a BUY or SELL only prints when price sits at a statistical extreme versus that level.
- No tuning needed - the Auto preset selects validated settings for the chart timeframe (M5 and M15 each get their own). Switch to Manual any time.
- A complete trade plan on every signal - entry on the closed candle, a structural stop, and an exit when the gap returns to normal, with the result shown in R on the chart.
- See the edge for yourself - the dashboard shows trades, win rate, average win in R, profit factor and expectancy, and can split the history into two halves to check that a setting holds up.
How it works
The indicator regresses the chart symbol on a reference symbol (DXY by default) and turns the gap between price and the implied level into a z-score. Beyond the threshold it signals; when the z-score returns to zero the trade closes. Full walkthrough in the Manual.
What's included / Platforms
- TradingView indicator, Pine Script v6, invite-only access added to your TradingView username.
Best for
Intraday traders on gold who want rule-based mean-reversion entries, and pairs traders who already think in terms of one market versus another.
Get started
Browse the ZynAlgo marketplace
Disclaimer: an analysis tool, not financial advice or a profit guarantee. Losing streaks are part of any strategy, especially on M15 where winners are fewer but larger. The dashboard is a simulation on past chart data before costs - trade with your own plan and position sizing.
STAT-ARB PRO
What STAT-ARB PRO measures
STAT-ARB PRO [ZynAlgo] is a statistical arbitrage tool. It looks at two related markets - the symbol on your chart and a reference symbol - and asks one question on every closed candle: how far is price from the level the reference implies right now?
- A rolling linear regression of the chart symbol on the reference (last 100 candles, 50 on 5-minute and lower) gives the implied price level.
- The spread is price minus that level. Positive means rich versus the reference, negative means cheap.
- The spread z-score expresses the spread in standard deviations of its own recent behaviour (30 candles, 20 on 5-minute and lower). Zero means the spread is normal.
The default pair is OANDA:XAUUSD against TVC:DXY, with Inverse Correlation Mode on because gold and the dollar usually move in opposite directions.

The lower pane shows the spread z-score (white) and the reference z-score (orange), dashed threshold guides and a dotted zero line. On the price chart you get the signal markers, the trade boxes and the dashboard.
Preset: Auto or Manual
- Auto (by timeframe) - the default. It selects the regression length and z-score length for the chart timeframe, the Spread engine, a Deviation Threshold of 2.5, Touch entries and the exit at the mean. The stop is z 6 on 5-minute and lower and z 3.5 above. Nothing to tune.
- Manual - every input below is used as you set it. You can also switch the Signal Engine to Dual Z-Score, which compares the separate z-scores of the two markets instead of the regression spread.

Entry rules
A diamond prints below the candle for a BUY and above it for a SELL, only on a closed candle.
- BUY - the spread z-score closes below minus the threshold: price is far below the level the reference implies.
- SELL - the spread z-score closes above the threshold: price is far above it.
- Entry Trigger - Touch (default) signals on the first close beyond the threshold. Re-entry waits until the z-score crosses back inside the threshold, giving fewer but later entries.
- Coolbar - at least 15 candles between signals, and no new signal in the same direction until the spread has returned through zero.
- Optional filters - a rolling correlation filter (the two markets must still be related) and a UTC time window.
Hover any diamond to read the reason for that signal.
Stop, exit and targets
- Entry - the close of the signal candle.
- Stop - the price at which the spread would reach the SL Z-Score Level (Auto: 6 on M5, 3.5 on M15), never closer than the SL Min Buffer (0.75 standard deviations). R is the distance from entry to stop.
- Exit at the mean (default) - the trade closes on the first candle that closes with the spread z-score back at zero. The result label shows WIN or EXIT with the R achieved, or SL -1R.
- Fixed R:R (optional Exit Mode) - TP1, TP2 and TP3 as R-multiples, with the stop moved to breakeven after TP1.
- Max Bars In Trade - a trade still open after 100 candles closes at the candle close.

Dashboard
- Active position - direction, entry and stop of the open trade.
- Performance - Trades (wins / losses), Win Rate, Average RR of winning trades, Profit Factor and Expectancy (R) per trade.
- Stats Window - All, First half or Second half of the loaded history. Use it to check that a setting holds up on both halves before you rely on it.
- Position and size (Tiny to Huge) are adjustable.
How to read it: on M5 the wider stop lets most trades reach the mean, so wins are frequent and each is smaller than the 1R risk. On M15 wins are fewer but several times the risk, so expect runs of losses. Judge a setting by Profit Factor and Expectancy (R), not by win rate alone.
Alerts
- ZynAlgo BUY Signal and ZynAlgo SELL Signal send a JSON message with symbol, action, entry, stop, targets and timeframe for webhook automation.
- Alerts fire on the same closed candle as the chart marker - create them with "Once Per Bar Close".
Who this is built for

- Gold intraday traders on M5 (main) and M15 who want rule-based entries with a defined stop.
- Pairs and intermarket traders who want a statistical read of one market versus another. For other markets, choose a strongly related reference and set Inverse Correlation Mode to match.
The relationship between two markets can weaken for a while; signals are less reliable when it does. The value is in only acting at statistical extremes and letting the built-in stop define the risk of every trade.

Browse the ZynAlgo marketplace
Risk note: STAT-ARB PRO [ZynAlgo] is an analysis tool. It does not place trades, and the dashboard is a non-executed simulation on past chart data before spread and commission - not indicative of future results. No indicator removes market risk. Always trade with your own plan and position sizing.
No release notes have been published yet.



























