Market hours for symbols crossing over a day in Market Manager?
Author: systrading
Creation Date: 6/27/2011 3:29 AM
profile picture

systrading

#1
Hi guys
Sry if already covered somewhere else.
COMEX Gold futures trade from 6pm NYC to following day 5:15pm NYC. Have the intraday data reading in no prob but need to setup the open and close times correctly so that i can set the scale properly for daily indicators. Setting times in Market Manager on Open Time and Close time. Doesn't seem to like the idea of crossing over a day ??? If this has been done by someone else then can you help? Alternative is I guess to time-shift the data so that it fits neatly into a 12am to 11:59pm period.
Thanks in advance for any help - good community - always helpful.

profile picture

Eugene

#2
Hi Martin,

Yes, the MM doesn't seem to like the idea of crossing over a day. I'll let the developer know.
profile picture

Eugene

#3
The developer's response was that this is a known issue. It's either this way or there's a different problem. We'll need to think about it; for now, a note has been added to the MM online guide: MM known issues and limitations
profile picture

Cone

#4
WealthScript SetScale functions won't ever be influenced by the Market Manager. The market times primarily help data provider perform their function correctly.

For non-calendar Daily scaling, you've got a couple options:

1. Use an EOD provider that provides bars for the "regular" day hours. You can point directly to those DataSets with the GetExternalSymbol function.

2. If the above isn't an option, the following procedure should work:
a. Build your own daily bars in a List<>.
b. Create a daily-scaled DataSeries using SetScaleDaily.
c. Re-fill the DataSeries in "b" using the List<> values, ensuring that synchronization is correct and consistent.
d. Calculate daily indicators (if require)
e. Manually synchronize the result for the intraday chart. Synchronize() won't work because it will synch to the calendar days.

This would be a good function to have for the Community.Components, so please share when you finish!
profile picture

systrading

#5
Thnx guys - I will have a crack at Cones' suggestion and report back with a code snippet if I get it working. Thnx again.
profile picture

systrading

#6
Hi - here is my take on it. Didn't know how to use List<> objects for this as I don't know the innards of DataSeries etc..
A more pragmatic approach would be to generate the daily data outside of WL basis the correct exchange times as it is a bit
slow and clunky in WL but does the trick.
Let me know if this is useful. Thnx again for your help...

CODE:
Please log in to see this code.
profile picture

Eugene

#7
Update

The MM developer agreed to add support for the symbols which open/close times cross over a day.
profile picture

systrading

#8
Thanks sir - appreciate your help.
profile picture

systrading

#9
With apologies - small bug fix to my code...

second if statement shud read..

CODE:
Please log in to see this code.


Previous code resulted in the daily open bening shifted back along the daily DataSeries one spot.
I'm sure there are more elegant coders out there who cud make all this neater and more concise.
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).