GetExternalSymbol and Strategy Monitor bugs - or is it just me?
Author: Sammy_G
Creation Date: 8/2/2010 10:34 AM
profile picture

Sammy_G

#1
WLPro 5.6.
========================

Cone/Eugene,
Can you check this out.

1. Create a new script with this simple code
CODE:
Please log in to see this code.

Give it some name, compile and save it.
Click on Monitor so it goes to Strategy Monitor (SM). Right-click it and choose Run the strategy now. It will run w/o errors. Leave it in SM.

2. Now make just one change to the script
CODE:
Please log in to see this code.

[Make sure to use the name of the dataset where you have this symbol.]
Compile and save the script. Now go to SM and Run the strategy again. It will run w/o errors.
Now, click on Remove Strategy to remove it from SM.

3. Go back to the script and click on Monitor so it goes to SM again. In the SM, Run the strategy from the right click menu. This time, you will see an error: Error(4): Object reference not set to an instance of an object.
--------------------
/*[I am not interested in discussing the error at this point.]*/


If you are able to duplicate this, this raises the possibility of 2 bugs:
a) When you specify a dataset name in GetExternalSymbol, it causes the SM to throw the error above.
b) It would appear that SM retains the old version of the strategy, and the only way to "refresh" the code is to delete the strategy from SM and then add it afresh.

profile picture

Eugene

#2
The GetExternalSymbol overload where you specify a DataSet name is buggy in 5.6.
QUOTE:
b) It would appear that SM retains the old version of the strategy, and the only way to "refresh" the code is to delete the strategy from SM and then add it afresh.

Yes, exactly as documented in the User Guide's section on Strategy Monitor.
profile picture

Eugene

#3
QUOTE:
3. Go back to the script and click on Monitor so it goes to SM again. In the SM, Run the strategy from the right click menu. This time, you will see an error: Error(4): Object reference not set to an instance of an object.

I'm unable to reproduce this error. Please elaborate on which data provider is used for a) the external symbol and b) to run the Strategy on in the SM.
profile picture

Sammy_G

#4
Fidelity is the data provider for both.
I was running it on the symbol QQQQ.
profile picture

Sammy_G

#5
I can reproduce this SM error any time; don't know why you are unable to do so (you did test it in WLPro, did you not?).
*/

Here's another oddity. If I run the strategy with GetExternalSymbol dataset overload, the error is *only* in the SM; the strategy itself compiles OK & runs fine within its own window. Why this discrepant behavior?
profile picture

Eugene

#6
No luck in WLD/P using Y!/F data. Nonetheless, check that you haven't renamed the DataSet after adding a Strategy to the SM - in 5.6, it's a surefire way to get the "Object reference..." error (fixed in the upcoming version).
profile picture

Sammy_G

#7
LOL. No, Eugene, I did not change the dataset name. FWIW, I am using Windows 7 Ultimate 64-bit, don't know if that has anything to do with it.
*/

Let me wrap up this thread by pointing out some more oddities, confined entirely to the SM:
1) Say I have a symbol - an index symbol - that comes from a provider other than Fidelity. While I can d/l the symbol from Fido, I have chosen not to, so it only exists in that provider's dataset. Again using code similar to one above, if I specify the dataset, then in SM I get the object not set... error. If I don't specify the dataset to avoid the error, what happens? SM doesn't throw that error b/c it secretly goes online and downloads the data from Fidelity; I have verified this by the symbol's .WL mysteriously appearing in my data folder bearing the date and time when I ran the script in SM! And I don't even have "Update Data on Demand" selected.

2) If I put in a futures symbol instead, whose data is there in a non-Fid dataset, this is what happens: if I specify a dataset, SM will throw the same error, and if I don't, then also it throws the error b/c it can't d/l the data from Fid (Fid doen't provide data for futures symbols).

So here's my summary of the situation. The scripts compile & run just fine by themselves, its when they get placed in the SM that these oddities start happening:
- if I specify a dataset, SM gives the error
- if I don't specify the dataset, I will get the error if it can't d/l the symbol from Fidelity; its as if it refuses to look in non-Fid. datasets or (and I speculate here) it has some sort of internal limit on # of symbols it can store (with Fid. dataset symbols getting priority).
*/

I pass this info to you to do as you please; if you can't duplicate these things, then I guess you can't fix them either.
profile picture

Cone

#8
I was able to duplicate the GetExternalSymbol DataSet overload bug, and updated another bug with this information because it appears related.

QUOTE:
I will get the error if it can't d/l the symbol from Fidelity
I don't know what you mean here. If the symbol comes from a different Provider, then the Fidelity provider has nothing to do with it. An error could indicator that the provider doesn't support the Strategy Mon. Which provider is it?
profile picture

Sammy_G

#9
The provider for that futures symbol is Reuters (in Metastock format).
profile picture

Cone

#10
The MetaStock Provider doesn't support on-demand data, so it can't update in the Strategy Monitor. I've never thought to try MetaStock with the Strategy Monitor, so I'll take a look to see if there some message it can throw up to make this more obvious.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).