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)
|
Jim
The problem is that an exploration can only report one value per column. It's a time-slice if you like. It can take a sample of whatever you want on any given bar, but it can only report one value per column. It's up to you to think of ways to extract what you want given the "one value per column" restriction.
If you want to catalog up to six events then the best you can probably do is use one column each for the 1st, 2nd, 3rd, 4th, 5th and 6th events. I've set up the following exploration to report the "PS Fractal Entry" in reverse order. That is, the date for the most recent event appears on column F, the second most recent event in Column E and so on. If column F doesn't report the event then no other column will either and that security is filtered out.
The exploration will run a little faster if you define the event in each column rather than call it as an indicator. You MUST define the event as a leading edge so that it's only true for one bar rather than several bars. If you don't then you'll essentially be capturing the same event several times (on successive bars while the event remains true).
MetaStock can only sum up to about 6 digits (preferably whole numbers) before it introduces "single digit precision" errors. Thus, adding Day, Month and Year to give 8 accurate digits is rather tricky. Errors may still occur with the method I've used but they should be few and far between.
I ran this exploration on 500 bars of the ASX 300 and it appears to work OK. There are other ways that you can capture the timing of events but each method has it's limitations.
Col A: Event:=Fml("PS Fractal Entry");
ValueWhen(6,Event,Month()*100) +
ValueWhen(6,Event,DayOfMonth()) +
ValueWhen(6,Event,If(Year()=2005,.05,.04));
Col B: Event:=Fml("PS Fractal Entry");
ValueWhen(5,Event,Month()*100) +
ValueWhen(5,Event,DayOfMonth()) +
ValueWhen(5,Event,If(Year()=2005,.05,.04));
Col C: Event:=Fml("PS Fractal Entry");
ValueWhen(4,Event,Month()*100) +
ValueWhen(4,Event,DayOfMonth()) +
ValueWhen(4,Event,If(Year()=2005,.05,.04));
Col D: Event:=Fml("PS Fractal Entry");
ValueWhen(3,Event,Month()*100) +
ValueWhen(3,Event,DayOfMonth()) +
ValueWhen(3,Event,If(Year()=2005,.05,.04));
Col E: Event:=Fml("PS Fractal Entry");
ValueWhen(2,Event,Month()*100) +
ValueWhen(2,Event,DayOfMonth()) +
ValueWhen(2,Event,If(Year()=2005,.05,.04));
Col F: Event:=Fml("PS Fractal Entry");
ValueWhen(1,Event,Month()*100) +
ValueWhen(1,Event,DayOfMonth()) +
ValueWhen(1,Event,If(Year()=2005,.05,.04));
Filter colF>0
Filter enabled Yes
Periodicity Daily
Records required 500
Hope this helps
Roy
MetaStock Tips & Tools
|