logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
PTJim  
#1 Posted : Thursday, September 4, 2014 11:41:35 AM(UTC)
PTJim

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/10/2006(UTC)
Posts: 252

Thanks: 11 times
Was thanked: 9 time(s) in 6 post(s)
It's pretty frustrating to have only "Securities Rejected" stats in the Exploration Status box when coding/testing a new Exploration, or running a time-consuming Exploration that yields very few results.

I scan about 10,000 securities in my universe, and some of my runs go almost 15 minutes. When it's designed to return very few hits, the "Percent Rejected" will often stick at 100.0 when a couple of hits have occurred, due to rounding error. Two or three hits will show 100% rejection, for instance.

So, especially when coding and testing, it's very hard to see if the Exploration is working at all until it runs to completion, which can take many minutes.

Is there any way I can display the number of Accepted hits, rather than rejected? I submit that displaying Rejected is useless during a run, since the numbers move by so quickly I can't tell if there are any hits. Why in the world doesn't it display the number of hits discovered rather than rejected - who designed this? If you're counting rejects, you're counting hits, so why not display both stats, or the useful one, instead of the useless one?

I can do a hex-editor change to the compiled code if necessary - is there a buried toggle someplace to make this status window actually useful?

Am I the first person to ask for this in 13 generations of the product?
mstt  
#2 Posted : Thursday, September 4, 2014 3:27:23 PM(UTC)
mstt

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 PTJim

I don't believe there's a simple standard procedure to do what you want, but there is a procedure using an expert commentary window that I know can produce the desired result. This procedure uses the GlobalVar (GV) DLL to count whatever stats or values you want to monitor. The procedure also needs to batch a single security "reset" exploration prior to the main exploration. The role of this preliminary scan is to preset the GV counter(s), usually to zero, prior to running the target scan(s).

With the Explorer running one or more primary scans, all you'd need to do to read off the various totals is click the commentary window refresh button. The commentary window can display as much or as little information as you want. The Reset scan could be as simple as one line of code...

{ColA} {Reset GV}
ExtFml("GV.SetVar","COUNT1",0);

The new code required for your primary scan (4-5 lines of code) only needs to be created once. If there are other scans requiring the same procedure then you'd need to add a "COUNT2" line to the Reset scan and replicate the primary scan addition with a COUNT2 version of the accumulator in the second primary scan.

Setting up the Expert commentary is about the same complexity as the counting mechanism and I could easily put some working examples together if you're interested. My Trade Equity expert commentaries take a second or three to refresh while an exploration is still running, but then they usually have to update scores or, more likely, a hundred or more global variables.

Roy
PTJim  
#3 Posted : Thursday, September 4, 2014 5:42:41 PM(UTC)
PTJim

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/10/2006(UTC)
Posts: 252

Thanks: 11 times
Was thanked: 9 time(s) in 6 post(s)
Thanks, Roy - I'll have a go at it on my own and let you know if I need a life ring thrown out to me.

Having been a subscriber to your newsletter, I'm not surprised you have a solution!
mstt  
#4 Posted : Thursday, September 4, 2014 8:25:24 PM(UTC)
mstt

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 PTJim

I wasn't aware that you were a subscriber at some point as I don't recognize the PTJim moniker or connect it with an email address in my database. :-( For what it's worth it's 10 years this month since the first issue of MSTT was published, and a lot of water has gone under the bridge since then. However it's always nice to reconnect with past contacts!!!

I've set up the following sections of code for anyone who might want to use or adapt the procedure, and also to make sure that I wasn't misleading anyone. I've run all the code with my own explorations and proved that it does exactly what I said it would, though only using the Count1 accumulator. As usual I ran into trouble while trying to copy the code complete with font and spacings etc., so the expert might need tweaking to individual taste. Anyone who doesn't have Mark Pyle's GlobalVar DLL {GV.dll} can get it from the following link from my website - www.metastocktips.co.nz/gv.dll .

Roy

{Reset Counters Exploration}

{ColA}

{Reset Securities Count}
A:=ExtFml("GV.SetVar","Count1",0);
{ A:=ExtFml("GV.SetVar","Count2",0); }
{ A:=ExtFml("GV.SetVar","Count3",0); }
{ A:=ExtFml("GV.SetVar","Count4",0); }
{ A:=ExtFml("GV.SetVar","Count5",0); }


{Your Exploration(s)}

{Filter Section}
Filter:= "Your filter conditions" ;

{Securities Count}
Count:=LastValue(ExtFml("GV.GetVar","Count1"));
Filter:=LastValue(Filter = TRUE);
Count:=ExtFml("GV.SetVar","Count1",Count+Filter);
Filter;


{Expert Commentary Window}

Securities Count
Scan 1 - Filtered Securities \
WriteVal( LastValue(ExtFml("GV.GetVar","Count1")),7.0)
Scan 2 - Filtered Securities \
WriteVal( LastValue(ExtFml("GV.GetVar","Count2")),7.0)
Scan 3 - Filtered Securities \
WriteVal( LastValue(ExtFml("GV.GetVar","Count3")),7.0)
Scan 4 - Filtered Securities \
WriteVal( LastValue(ExtFml("GV.GetVar","Count4")),7.0)
Scan 5 - Filtered Securities \
WriteVal( LastValue(ExtFml("GV.GetVar","Count5")),7.0)

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.