Strategy Monitor: Updating external symbol
Author: kazuna
Creation Date: 2/19/2013 6:38 PM
profile picture

kazuna

#1
I'm experimenting EOD strategies in Strategy Monitor and got a question regarding Daily data update.

Suppose I schedule a strategy to run at 16:30 EST, when it gets run, the symbol associated with the strategy gets updated as stated in "Employment Notes" - "Update Method 1".

So far I experimented, this is the case only with the symbol associated with the strategy but not the symbol accessed via GetExternalSymbol() and SetContext().

If I want the external symbol updated before EOD strategy to run, I would:

1. schedule an empty strategy little earlier (say 16:25 EST) and associate with each external symbol.

2. associate the DataSet with the EOD strategy where the strategy code ignores all symbols other than the one to run so that all the symbols are updated at once.

Does this make sense?
Any other solution you would recommend?
profile picture

kazuna

#2
QUOTE:
2. associate the DataSet with the EOD strategy where the strategy code ignores all symbols other than the one to run so that all the symbols are updated at once.

So far I tested this method and scheduling EOD strategy 5 minutes after the market close (16:05 EST), it seems working fine.
profile picture

Eugene

#3
QUOTE:
but not the symbol accessed via GetExternalSymbol() and SetContext().

That's right: the list of symbols to update only includes the current DataSet; it won't step down to analyze your code for potential data items.

QUOTE:
Any other solution you would recommend?

Well, why not do it programmatically - using this API hack?

CODE:
Please log in to see this code.


P.S. The asynchronous Task here is for illustration purposes only. In real Strategy, you wouldn't want a Task without a Wait() because it executes asynchronously and control falls right through to your GetExternalSymbol-dependent code whereas the external symbol may not have been updated yet.
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).