Hello,
Does anyone know what is the syntax to create more than 1 sorting criteria for a new created screener?
For e.g. first sorting by RSI and then by volume ? I tried using and but it doesn’t work.
Many Thanks,
Assaf
Hello Assaf, please share your code, it will be easier to help you. Thank you.
See below code, the relevant row is the last one where I am trying to filter by counter but I want to add a second sorting criteria like RSI/price, but can’t get it work. Thanks !
timeframe (daily)
price = (average[20](Volume) > 1000000 and close > 10) or (close >= 5 and close <=10 and average[20](Volume) >= 5000000)
timeframe (weekly)
myBullSignalST = CALL "Bull Signal ST"
opp = 0
IF (myBullSignalST[0] = 1) then
opp=1
counter= 1
else
IF (myBullSignalST[1] = 1) then
opp=1
counter= 2
else
IF (myBullSignalST[2] = 1) then
opp=1
counter= 3
else
IF (myBullSignalST[3] = 1) then
opp=1
counter= 4
endif
endif
endif
endif
SCREENER [opp and price](counter as "current")
I’m sorry but it is not possible to add a second sorting criteria. You can only add one like you did with your ‘counter’ variable.