View Full Version : OnMarketData & Market Replay problem
cls71
02-10-2010, 02:33 AM
Hello, I have a problem with the OnMarketData method & MarketReplay.
1. I connect to the Market Replay. Session 09/02/2010.
2. Open a chart for for FESX 03-10 with range 6
3. At the begining the chart is empty. All Ok.
4. Load an indicator to process the OnMarketData event. (Zi7Borrar02.cs ; only Prints to Output window).
http://i409.photobucket.com/albums/pp175/cls71/marketreplay.png
5. Minimize the chart window.
6. Play the Market Replay.
7. The OnMarketData method is not executed (the OnStartUp either). You can check it by Output window.
(If restore the chart window, the OnMarketData takes a long time to start executing)
(I think this problem only happens if the chart has not bars at the begining).
Saludos
Edit: beta8
NinjaTrader_Bertrand
02-10-2010, 08:15 AM
cls71, we'll check and get back to you, thanks.
NinjaTrader_Bertrand
02-10-2010, 08:55 AM
cls71, can't reproduce so far here, is called as the first ticks come in for the 9th on my FESX 03-10 replay chart. Is this happening for you on other chart types / symbols as well? I did not see an issue whether chart was minized or not...
Also: do you see any errors thrown to the log tab as this happens on your end?
Thanks
cls71
02-10-2010, 10:43 AM
Hello Bertrand,
This problem happens with any instrument but it is obligatory that the chart is empty (no bars).
This is an example with ES 03-10.
First, connect to market replay at 09/02/2010 (only 1 day. Obviously can be any other date).
Second, open a chart with range 6. The chart window must be empty (no bars).
http://i409.photobucket.com/albums/pp175/cls71/problem_01.png
Third, open the output window and load the indicator (Zi7Borrar02.cs).
http://i409.photobucket.com/albums/pp175/cls71/problem_02.png
Fourth, minimize the chart window.
Fifth, start the market replay. The output window is empty, so neither OnStartUp method nor OnMarketData method are executed while the chart is minimized or hidden.
http://i409.photobucket.com/albums/pp175/cls71/problem_03.png
I hope this clarifies the problem.
(No errors in the log tab).
When restore the window, the chart is displayed correctly.
http://i409.photobucket.com/albums/pp175/cls71/problem_04.png
Thanks
NinjaTrader_Bertrand
02-10-2010, 11:00 AM
Thanks for the detailed follow up, rechecking shortly on my end cls71.
cls71
02-10-2010, 11:50 PM
Hello,
the problem persists in beta9.
S2
NinjaTrader_Bertrand
02-11-2010, 08:46 AM
cls71, thanks - here's the reason why - you don't see it displayed / printed for an empty chart as the indicator waits for 20 bars to pass (the unstable period).
cls71
02-11-2010, 09:49 AM
Thanks Bertrand, but that's not the reason. (You can set BarsRequired = 0 in the Initialize method and the result is the same)
Moreover, if you do not maximize the chart and waiting until the recorded session ends, the OnMarketData method has not been run never before (or 20 bars or 1000, never mind).
Please, try it.
Thanks
NinjaTrader_Bertrand
02-11-2010, 12:08 PM
I tried it here with BarsRequired hardcoded to 0.
With chart open, or closed down first OMD print at about 9 seconds for FDAX replay data of Feb 10th.
Of course bars back set to 0, so no history shown on the chart.
Could you please try the same setup on your end as well?
Thanks
cls71
02-11-2010, 01:26 PM
I tried it here with BarsRequired hardcoded to 0.
With chart open, or closed down first OMD print at about 9 seconds for FDAX replay data of Feb 10th.
Of course bars back set to 0, so no history shown on the chart.
Could you please try the same setup on your end as well?
Thanks
Hello Bertrand,
I tried with FDAX 03-10 (session 09-feb-2010). Is the same result.
Thanks
http://i409.photobucket.com/albums/pp175/cls71/dax.png
NinjaTrader_Bertrand
02-11-2010, 02:12 PM
cls71, retried again here and was finally able to see what you spotted, thanks for the persistence in following up, we look into it.
NinjaTrader_Bertrand
03-30-2010, 11:03 AM
cls71, have you had a chance to retest this on latest b12? I could not reproduce this and works as expected for me, printing even if chart is minimized after unstable period of 20 bars is satisfied.
Thanks
cls71
03-31-2010, 08:44 AM
Thanks Bertrand,
It works perfectly now (in beta11).
Regards
NinjaTrader_Bertrand
03-31-2010, 08:49 AM
Great, we appreciate your feedback.