Is it possible to write a scan for an all-time high in QPv2?
I thought this was relatively simple:
//All-time high scan input = "stocks-in.lst"; output = "all-time-high.lst";
Integer NumDays; Float MxHi;
DaysToLoad=2200;
if close(0) > 0 then NumDays:=((DaysLoaded-1)*-1); MxHi := Max(0,-255,hi); Println Symbol, ", ", NumDays, ", ", MxHi; endif;
If you replace the constant '-255' by the variable 'NumDays', in order to scan for a high over all loaded days like this
MxHi := Max(0,-255,hi); // original
MxHi := Max(0,NumDays,hi); // with -255 replaced by NumDays
the scan stops working. I.e. there is no output at all.
Anyone know why? Is this a parsing bug again?
Regards,
Johan |