Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi Robert
Try loading these explorations. Set the first one to run on an index or an up-to-date security (only one is required). Run the second exploration across your test data.
The first exploration sets up the date of the current bar so that the second exploration can determine whether to include a security in the advancing and total securities count. It also initializes the two variables used as counters.
The second exploration checks each column used for valid volume (an active security), whether the close is greater than the close 41 periods ago, and whether the date is current. If all conditions are met the accumulators in columns A and B count advancing and active securities. Column C works out the percentage of advances - 100*advances/total (I hope).
Run the explorations as a pair so that the correct date is loaded and the GV accumulators are set to zero.
Hope this helps. I tried to send you the relevant MSTT issue but apparently I do not have your correct address.
Regards
Roy
Exploration notes {Advancing Issues Clear & Setup - RP}
{© 2004-2005 Roy Larsen}
Reset global variables and set up current date of
preferred index before running the scan.
Requires Mark Pyle's GlobalVar dll (GV.dll).
Col A: {Col A: Day} {Clear & Setup}
ExtFml("GV.Clear");
A:= ExtFml("GV.SetVar","#UP",0);
A:= ExtFml("GV.SetVar","#TOT",0);
ExtFml("GV.SetVar","ScanDay",LastValue(DayOfMonth()));
Col B: {Col B: Month}
ExtFml("GV.SetVar","ScanMonth",LastValue(Month()));
Col C: {Col C: Year}
ExtFml("GV.SetVar","ScanYear",LastValue(Year()));
Filter enabled No
Periodicity Weekly
Records required 50
Exploration notes {Advancing Issues Report - RP}
{© 2004-2005 Roy Larsen}
This exploration accumulates the number of both
advancing and acive securities. Set "Load Records"
to 50. Higher values might exclude some more recently
listed issues. Once the exploration is completed the last
value in each column gives the appropriate total.
Out-of-order securities might result in the highest value
appearing in the body of the report rather than at the
end of it.
Requires Mark Pyle's GlobalVar dll (GV.dll).
Col A: {Col A: # Rises} {Advancing Issues}
A:=LastValue(ExtFml("GV.GetVar","#UP"));
D:=ExtFml("GV.GetVar","ScanDay");
M:=ExtFml("GV.GetVar","ScanMonth");
Y:=ExtFml("GV.GetVar","ScanYear");
B:=D=DayOfMonth() AND M=Month() AND Y=Year()
AND C>Ref(C,-41) AND V>0 AND Ref(V,-1)>0;
D:=If(B,A+1,A);
ExtFml("GV.SetVar","#UP",LastValue(D));
Col B: {Col B: # Active Securities} {Total Issues}
A:=LastValue(ExtFml("GV.GetVar","#TOT"));
D:=ExtFml("GV.GetVar","ScanDay");
M:=ExtFml("GV.GetVar","ScanMonth");
Y:=ExtFml("GV.GetVar","ScanYear");
B:=D=DayOfMonth() AND M=Month() AND Y=Year()
AND V>0 AND Ref(V,-1)>0;
D:=If(B,A+1,A);
ExtFml("GV.SetVar","#TOT",LastValue(D));
Col C: {Col C: # Same} {Unchanged Issues}
A:=LastValue(ExtFml("GV.GetVar","#UP"));
B:=LastValue(ExtFml("GV.GetVar","#TOT"));
Int(100*A/B);
Filter:{Filter} {discards issues if date not current}
D:=ExtFml("GV.GetVar","ScanDay");
M:=ExtFml("GV.GetVar","ScanMonth");
Y:=ExtFml("GV.GetVar","ScanYear");
D=DayOfMonth() AND M=Month() AND Y=Year()
AND V>0 AND Ref(V,-1)>0;
Filter enabled Yes
Periodicity Weekly
Records required 50
|