OPEN-SOURCE SCRIPT

FX Dispersion

This script calculates the dispersion of a basket of 5 FX pairs and then calculates the z-score the z-score is then made into a composite using the 30 and 60 ema of the z-score to smooth any noise. It must be used on one of the FX pairs in the basket [eur, gbp, aus, yen, gold] and on the 1-minute timeframe as it has been hardcoded for 1 min use below.

Interpretation - Dispersion is a component of volatility - the dispersion of the underlying basket increases above 0.5 and decreases below 0.5.

Although increased dispersion is beneficial to momentum and trend-following strategies on the monthly and weekly timeframes. Observe this on the 1-minute timeframe and how dispersion crossing above/ below 0.5 it can signal reversion or momentum for the next period.
CyclesdispersionmomentumstrategyregimeregimerfilterreversionstatisticstrendVolatility

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer