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 -- Ignore unavailable to you. Want to Upgrade?


To: Johan Van Houtven who wrote (5351)7/11/1998 4:11:00 PM
From: Bob Jagow  Read Replies (1) | Respond to of 11149
 
Johan, Help shows your problem -Bob
-------------------------------------
Max( StartDay , EndDay , Item )

Returns the maximum value of an item for a range of dates.
StartDay must be <= 0
EndDay must be <= StartDay
Item must be a valid item token.
Example:

output="myfile";

if ( Close(0) >max(-1,-250,cl) then
println symbol;
endif;

In this example, Max( -1,-250,cl ) returns the highest closing price for last 250 day period.



To: Johan Van Houtven who wrote (5351)7/11/1998 4:50:00 PM
From: Bob Jagow  Respond to of 11149
 
Sorry, Jan, I missed your point.

Max(0 -daysloaded +1, hi) works fine; the problem is indeed a parse-time bug like Brooke and I found for the recent slope scan.
(Where I had to add a positive # aa a kludge in post #5268
b:= .0001+(num/den); kludge.)

You can see this with
--------------------------------------
//JVH stock data Scan by JVH
output = "jvh-stocks-out.lst";
Float EMA17, EMA50, EMA200;
Integer NumDays;
DaysToLoad = 300;
daysRequired = 250; //always good idea to avoid bounds stop
NumDays:=-.5*(DaysLoaded-1);
Println DaysLoaded,",", NumDays, ",", Max(0, -1 + NumDays ,hi);
-------------------------------
where this -1 tricked the parser into accepting Numdays.

Bob