This is the alert script so you can automate this strategy using AutoView:
Make sure to use
crossing down value 0.9 once per bar (on condition) for this.
For the alert Message if you're using AutoView:
Long GBPUSD
c=order b=short
c=position b=short l=200 t=market
b=long q=0.01 l=200 t=market tp=60 sl=60
Short GBPUSD
c=order b=long
c=position b=long l=200 t=market
b=short q=0.01 l=200 t=market tp=60 sl=60
Make sure to use
crossing down value 0.9 once per bar (on condition) for this.
For the alert Message if you're using AutoView:
Long GBPUSD
c=order b=short
c=position b=short l=200 t=market
b=long q=0.01 l=200 t=market tp=60 sl=60
Short GBPUSD
c=order b=long
c=position b=long l=200 t=market
b=short q=0.01 l=200 t=market tp=60 sl=60
//@version=2 study("HeikenAshi[1]", title="Study", overlay=false) //Heiken Ashi Candles Factor = 3 Pd = 7 isHA = input(true, "HA Candles", bool) data = isHA ? heikenashi(tickerid) : tickerid res = input("180", "Resolution", resolution) o = security(data, res, open[1]) c = security(data, res, close[1]) h = security(data, res, low[1]) l = security(data, res, high[1]) long = c > o short = c < o last_long = long ? time : nz(last_long[1]) last_short = short ? time : nz(last_short[1]) long_signal = crossover(last_long, last_short) short_signal = crossover(last_short, last_long) plot(long_signal, "Long", color=green) plot(short_signal, "Short", color=red)