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: Debra Orlow who wrote (8918)3/11/1999 12:55:00 PM
From: John Schott  Read Replies (1) | Respond to of 11149
 
Since your scans are based on -1 to -20 days (0 to -40 days for volume), then a scan based on -2 to -21 and -1 to -41 would be the equivalent to the scan you ran "yesterday".

So if you rewrote your scan to cover

"Todays Scan" NOT "Yesterdays"

you'd always get what you want (and of course, it wouldn't prevent a hit on something two days ago.

Since you have three tests (break up, break down and volume criteria, all you have to do is make each of the the first two tests as a double of "todays scan" NOT "yesterdays" and adjust the volume scan in one of two ways:

* Adjust the days by one, if you don't mind a slight inaccuracy
* Incorporate a "todays scan" NOT "yesterdays" volume test into each of the first two lines instead of presently where it is a third criteria.

Hope that gives you an idea.



To: Debra Orlow who wrote (8918)3/11/1999 1:18:00 PM
From: Sean W. Smith  Read Replies (1) | Respond to of 11149
 
Here ya go....

output = "brkout310.lst";
input = "vol250.lst";
//ProcessMS = "e:\breakout\brkout310",MSdata;

integer numDaysToExclude; // Number of days to back to exclude
integer triggeredPrior; // Boolean Flag
integer i; // Index Variable

numDaysToExclude := 1;
triggeredPrior := 0;

numDaysToExclude := numDaysToExclude * -1;

for i = numDaysToExclude to -1 step 1 do
if ( close(i) > max(i-1,i-20,hi) or
close(i) < min(i-1,i-20,lo) ) and
( Vol(i) > (AvgVol(i,i-40)*1.4) ) then
triggeredPrior := 1;
endif;
next i;

if ( close(0) > max(-1,-20,hi) or
close(0) < min(-1,-20,lo) ) and
( Vol(0) > (AvgVol(0,-40)*1.4) and
(triggeredPrior = 0) ) then
println symbol , "," , Description;
endif;

The trick is to use a loop to back test and set a flag if a match occurs. Then when scanning the final day check to see that the flag has not been set.

change numDaystoExclude to exlcude more matches as you go back in time.

Sean