Incorrect time in Strategy Monitor
Author: ichechet
Creation Date: 11/3/2016 6:33 PM
profile picture

ichechet

#1
Greetings!

I set all the symbols from dataset in Market Manager as MMA market (Pic1). When I start the strategy from Strategy Monitor it shows last run in my local time as 19:13 (Pic2). The problem is that my local time is 23:13 (+4 hours from time specified). If I set the box for Use this Market by default for symbols not specified in other markets (Pic3) then I get the correct times after strategy run (Pic4).

It's a kind of problem.
profile picture

ichechet

#2
In the first case I've got wrong next run time (Pic2). It's the last run time, not the next day session open time.
profile picture

Eugene

#3
Hi Igor,

1. I assume that this is your custom built data provider and your time zone is GMT+5. Does this happen with one of the stock providers like Google, for example?

2. How is your GetMarketInfo defined?
profile picture

ichechet

#4
Hi Eugene!

Try to make this case simple. I take the Yahoo data provider and set the Market Manager as shown on Pic1 and Pic2.

Then I see the settings for strategy in SM (Pic3). It's not correct.

1. I have GMT+05 timezone, that's right.
2. Market Close is not correct. It shows GMT+05 timezone, but I see in the MarketManagerMarkets.xml
<MarketInfo>
<Name>US Equities</Name>
<Description>NYSE, Nasdaq and Amex equities</Description>
<OpenTimeNative>2007-09-19T09:30:00</OpenTimeNative>
<CloseTimeNative>2007-09-19T16:00:00</CloseTimeNative>
...
<TimeZoneName>Eastern Standard Time</TimeZoneName>
</MarketInfo>
profile picture

Eugene

#5
QUOTE:
2. Market Close is not correct. It shows GMT+05 timezone, but I see in the MarketManagerMarkets.xml

That's because the Yahoo provider is configured to always return the CurrentTimeZone in GetMarketInfo regardless of what you see in the MarketManagerMarkets.xml. Since Y! is a global provider of EOD data trading on most any continent in the world, it's impossible to determine the symbol's actual time zone.

How does your GetMarketInfo look like?

QUOTE:
When I start the strategy from Strategy Monitor it shows last run in my local time as 19:13 (Pic2).

Is "Show Local Times" enabled?
profile picture

ichechet

#6
Yes, I set "Show Local Times".

Probably, I found the reason. You're right. It's in the GetMarketInfo. If I use the single symbol for strategy in SM it's OK. All the times are correct.

But if I use the dataset for strategy in SM, WLD has the first call GetMarketInfo with empty Symbol. This Symbol is not in any markets, so the MarketInfo returned is not correct.

What I've done: Add in GetMarketInfo check for empty Symbol. It it's true I set the default MarketInfo for this provider. It works.

But I'd like to know about empty Symbol on GetMarketInfo. Is it by design?
profile picture

Eugene

#7
You hit the nail on the head. In my limited testing, there seems to be a call to GetMarketInfo with empty symbol being passed in MSB mode. From experience, passing on an empty DataSet instance is specific to the Strategy Monitor. Likewise you may have noticed that the same thing takes place in PopulateSymbols (where you'd want to skip processing that empty instance; see Google provider's open source code in the Wiki).
profile picture

ichechet

#8
Thank you!

I already implemented the code in PopulateSymbols and UpdateProvider.

I made the code for the empty symbol for provider in GetMarketInfo.I tested it on current trading session. It works OK.
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).