Reputation: 33
I try to write code on tradingview for making a determinate signal. But inside of my code, when i try to save the indicator, i receive the indentation error on the portion of the code that i have post here. The line of the error are the firsr (if). Error: end of line without line continuation
I have try to change in version4 but the result not change, i see always the same error
Some one can help me to solve?
if (ta.candleColor(0) == 1 and
high[1] > prevClose and
low[0] < prevClose and
currentOpen > prevClose)
sellSignal := true
Upvotes: 0
Views: 926
Reputation: 1362
First of all there is no such ta function in pine script as ta.candleColor(0), but for the solution let's assume you've written a custom one.
if candleColor(0) == 1 and
high[1] > prevClose and // indent +1 to continue conditional
low[0] < prevClose and // indent +1 to continue conditional
currentOpen > prevClose // indent +1 to continue conditional
sellSignal := true
You only have to increment your indentation by 1 if you want to use line breaks within conditionals or function calls.
Upvotes: 3