I write several script to scan past 60 days that condition occur.
If occur then show the symbol.
But it seems go wrong.
Please help to correct , thank you.
One method I do to verify Boolean logic is to put the script into a Watchlist, duplicate the script in columns and set each Boolean parameter to be returned. This helps me rationalize where I might have made a mistake.
I ran your script and it does work for me. If you’re having an issue with the CLOSE() > 20 not seeming to work, try forcing the Time to “Day”:
CLOSE(Day(PERIODAMOUNT=1)) > 20
It could be that at the time of the signal the price was above 20, but has since moved below. Do you have an example? If you put the script in a Show Bar to display the F1 signal on a chart does it display when > 20?