0
votes

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

1
Please show us how you try to wrap it.Baris Yakut
Sorry, I just updated the original post, showing exactly how it was wrapped to get the error messagesunspore

1 Answers

0
votes

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.