IvanLabrie

Pair trader

I figured I'd post this.
It's an indicator that plots the spread between two selectable instruments and also each individual instrument's line chart, with a colored fill to make it more clear visually when trading ratios.
In cointegrated pairs like audcad-0.50% , you can trade the range extremes, and buy the laggard/sell the leader when overbought/sold conditions are met + distance from the 66/253 EMAs, as outlined in my AUDCAD-0.50% post. (see related ideas)
Hope you find it useful!
Cheers,
Ivan.

🔒Want to dive deeper? Check out my paid services below🔒

ivanlabrie.substack.com/
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 a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
study("Pair trader", overlay=true)
Pair1 = security((input("FX_IDC:audusd")), input("D"), hl2)
Pair2 = security((input("FX_IDC:nzdusd")), input("D"), hl2)
PairA = plot(Pair1, color=yellow)
PairB = plot(Pair2, color=black)
fill(PairA, PairB, white, 80, "Spread")
Spread = Pair1 - Pair2
plotarrow(Spread, colorup=teal, colordown=orange, transp=80)