Hi, I think there is an error in ProrealTime ProScreener.
I wrote an easy Year To Date % performance code, but it is not working:
There is a radio button to toogle between lowest/highest values. The thing is it shows only the lowest values for NYSE, NASDAQ, EURONEXT, etc.. But if I want to show the highest values for these markets then shows nothing.
Please note that If I choose another market like France 40 then it does show both the highest and lowest values, It’s a bit weird.
This is the code. Kind Regards.
1
2
3
4
5
6
7
8
9
ifdate=20151231then// You can change this date to whatever you want and you'll get the same result. No highest values
Hi you can find attached 2 screenshots of a NYSE screening. In both cases (lowest and highest values) there are 3220 matches. But the list only is populated when lowest values are selected, if you select highest values the list shows nothing.
I found how to solve your problem. It seems that your d1 variable were set to 0 because there were no candle at this date. So ProScreener met a bug that It cannot divide something by 0 (zero divide error that many coders known 🙂 )
So here is the code that solve this issue. If the daily candle dont exist, then the previous candle is taken.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue