CryptoRox

HeikenAshi[1]

858
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

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?
//@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)