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: Sean W. Smith who wrote (7616)11/5/1998 11:12:00 AM
From: pham  Read Replies (1) | Respond to of 11149
 
>> I don't see why. print the value of numdays and see if it changes.<<

Please take a look to see what I did wrong:

<SCAN EXPORTDATE=November 5, 1998 8:00:42 am>
<TITLE>Midas_R1</TITLE>
<DESCRIPTION>This Scan will calculate where today price is relative to Midas R1</DESCRIPTION>
<CODE>exchange = nyse, amex, nasdaq;
output = "Midas_R1.lst";
//input="Puts.lst";

Integer numdays,i,maxHi, minLo, minDate, maxDate;

daystoload = 100;
daysrequired =1;

numdays:=((DaysLoaded-1)*-1);
minLo := 99999999;
maxHi := 0;
maxDate := 0;
minDate := 0;
println "numdays=",numdays;
for i=numdays to 0 step 1 do
if close(i) >= maxHi then
maxHi := close(i);
maxDate := i;
endif;
next i;

PrintLn Symbol:-5,",","cl:0",",",close(0):6:3,",","Max",",",close(maxDate):6:3,",MaxDate,",Date(maxDate),",Numdays :",numdays;
//PrintLn "Min",",",close(MinDate),",MinDate,",Date(MinDate);

</CODE>
</SCAN>

numdays=-619
A ,cl:0,17.688,Max,21.062,MaxDate,06/19/1998,Numdays :-619
numdays=-2036
AA ,cl:0,79.312,Max,88.750,MaxDate,08/07/1997,Numdays :-2036
numdays=-1078
AA P ,cl:0,72.125,Max,80.000,MaxDate,11/24/1995,Numdays :-1078
numdays=-28
AAABB ,cl:0,10.750,Max,10.750,MaxDate,11/04/1998,Numdays :-28
numdays=-619
AAB ,cl:0,16.938,Max,21.062,MaxDate,06/05/1998,Numdays :-619
numdays=-1730
AABC ,cl:0, 7.250,Max,13.000,MaxDate,04/03/1998,Numdays :-1730
numdays=-1710
AAC ,cl:0, 4.312,Max,30.375,MaxDate,10/05/1995,Numdays :-1710