SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : TA-Quotes Plus

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Gary Lyben who wrote (6579)9/17/1998 4:38:00 PM
From: Johan Van Houtven  Read Replies (1) of 11149
 
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
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext