I'm getting the error "line 16: Syntax error at input 'LongStop'"
I don't know what the error could be. I hope someone can help, thanks
//@version=4
strategy("Heiken Ashi Price Action", overlay=true)
plot(close)
//Set potential stop
LongStop = 0
ShortStop = 0
if low < low[1]
LongStop := low
else
LongStop := low[1]
if LongStop := low[1] and low[2] < low[1] // Line 16
LongStop := low[2]
if LongStop := low and low[2] < low
LongStop := low[2]
if high > high[1]
ShortStop := high
else
ShortStop := high[1]
if ShortStop := high[1] and high[2] > high[1]
ShortStop := high[2]
if ShortStop := high and high[2] > high
ShortStop := high[2]
I don't know what the error could be. I hope someone can help, thanks
//@version=4
strategy("Heiken Ashi Price Action", overlay=true)
plot(close)
//Set potential stop
LongStop = 0
ShortStop = 0
if low < low[1]
LongStop := low
else
LongStop := low[1]
if LongStop := low[1] and low[2] < low[1] // Line 16
LongStop := low[2]
if LongStop := low and low[2] < low
LongStop := low[2]
if high > high[1]
ShortStop := high
else
ShortStop := high[1]
if ShortStop := high[1] and high[2] > high[1]
ShortStop := high[2]
if ShortStop := high and high[2] > high
ShortStop := high[2]