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🔒

linktr.ee/ivanlabrie
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?
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)