I'm trying to wrap this line, as it is too long to see all on one screen:
strategy.entry
    ("Long Continuation", 
    true, 1, when = FastMA < SlowMA and SlowMA > SlowMA[5] and ShortDiff < 
    ShortDiff[1]
    and close[1] < _PercentAbove and close[1] > _PercentBelow)
It works unwrapped, but when I wrap it, I get the error, "Add to Chart operation failed, reason: line 15: syntax error at input 'end of line without line continuation'
I realize I can shorten this with better code, but I'm just curious about line wrapping works in Pineenter code here
If you want to wrap lines, next line must begin with one or several (different from multiple of 4) spaces.
Your code seems to have 4 spaces, which causes the error.
The following code should compile.
strategy.entry("Long Continuation", 
 true, 1, 
  when = FastMA < SlowMA and SlowMA > SlowMA[5] and
   ShortDiff < ShortDiff[1] and close[1] < _PercentAbove and
     close[1] > _PercentBelow)
It has 0, 1, 2, 3, 5 spaces, respectively.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With