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
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?
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)