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: Bob Jagow who wrote (5295)7/9/1998 11:54:00 PM
From: TechTrader42  Read Replies (2) | Respond to of 11149
 
Thanks, Bob. I'm running into problems with the range scan. First, it needed a comma between the two integers in the "integer" line. But when that was fixed, I got an error saying uninitialized variable. I assumed it was MaxI and added: MaxI:=0. Now I'm not sure what I'm getting in the output. I get only one number, and it's too high to be the maximum range. Where did I go wrong (besides in reform school, I mean)? Here's what I using:

//Max(-1,-9,range) is

output = "tst.lst";
input="portfoli.lst";
integer i, maxI;
float MaxRng;
MaxRng := 0;
MaxI:=0;
for i = -9 to -1 do
if high(i) - low(i) > MaxRng then
MaxRng := high(i) - low(i);
MaxI := i;
endif;
next i;
println symbol, MaxI, MaxRng;