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: Rashid Garuba who wrote (7961)12/3/1998 2:04:00 PM
From: Bob Jagow  Read Replies (1) of 11149
 
My usual goof, Rashid.
Max(0,-1,cl) looks at two days; I correctly adjusted start in the if statement, but
----
start := -130;
if daysloaded < 130 then
start := 1 -daysloaded;
endif;
----
will die with your syntax error if a stock has only 130 days;
Best way to deal with it is
---
issuetype common;
output = "myrange.lst";
float maxpr, minpr, max2min;
integer start, startmax;
daysrequired = 1;
startmax := -130; // set what you want here ****
start := 1 -daysloaded;
if start < startmax then
start:= startmax;
endif;

max2min := 2.50;
maxpr:=max(0,start,cl);
minpr:=min(0,start,cl);
if maxpr > max2min*minpr then
println symbol,",",maxpr/minpr:6:2,",",date(0),",",daysloaded,",",start;
endif;
-------------------
Bob
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext