Screener error in PI

I tried copying Big 3 Buy EA code from webpage to scanner. I see that any code if I write / copy gets converted to single line and throws error

I copied / wrote this code

ADX(14) > 20 AND
DIP(14) > 20 AND RSI(CLOSE, 14) > 40 AND
REF(MACDSignal(13, 26, 9, SIMPLE), 1) < REF(MACD(13, 26, 9, SIMPLE), 1)
AND MACDSignal(13, 26, 9, SIMPLE) < MACD(13, 26, 9, SIMPLE)

it appear as -

ADX(14) > 20 AND DIP(14) > 20 AND RSI(CLOSE, 14) > 40 AND REF(MACDSignal(13, 26, 9, SIMPLE), 1) < REF(MACD(13, 26, 9, SIMPLE), 1) AND MACDSignal(13, 26, 9, SIMPLE) < MACD(13, 26, 9, SIMPLE)

and throws error.

any idea how to fix this issue?

The above tradescript is correct and no errors, and its working fine, while you are copy - pasting the above code make sure you have given proper spaces in between the scripts

thanks! let me try again.

It doesn’t seem to be working for me :frowning:
even simple moving average crossover logic is not working. can you test it in your version of Pi please?

Seems that the logic / syntax work in back test area but not in screener area. I would like to screen all nifty stocks for buy (as a swing trader)

i’m trying to write following code, some issue - all codes are getting converted to single line as shown in screen capture. i need to this code as EoD screener.

any fix for this issue?

SET A = MACDSignal(13, 26, 9, SIMPLE)
SET B = MACD(13, 26, 9, SIMPLE)
CROSSOVER(DIP(14), DIN(14)) = TRUE AND
CROSSOVER(A, B) = TRUE

Please read this for more info on how to fix the error.

Newline characters will throw an error in Pi Scanner. So if you have initially used multiple lines it will still be there in the script even though you cant see it.

It should work if you write the script again (discard the old one) in a single line

I got it solved. When you try to direct copy paste it gives error. So what i did is brought everything in single line and it worked in scanner … Below is what I am using now.

ADX(14) > 20 AND DIP(14) > 20 AND RSI(CLOSE, 14) > 40 AND REF(MACDSignal(13, 26, 9, SIMPLE), 1) < REF(MACD(13, 26, 9, SIMPLE), 1) AND MACDSignal(13, 26, 9, SIMPLE) < MACD(13, 26, 9, SIMPLE)