SmartQuant Discussion
http://www.smartquant.com/forums/

Missing Bars
http://www.smartquant.com/forums/viewtopic.php?f=86&t=14609
Page 1 of 1

Author:  haroldmaj [ Thu Aug 18, 2016 9:36 pm ]
Post subject:  Missing Bars

Hello, is anyone else having an issue with missing bars? I am using OHLC EOD bars imported from CSI, and when I import the data OQ gives me a range:

7/2/1980 00:00:000 - 7/3/1980 00:00:000
7/3/1980 00:00:000 - 7/4/1980 00:00:000
7/4/1980 00:00:000 - 7/5/1980 00:00:000

When backtesting, the chart reveals only 4 out of the 5 trading bars as a result. I've played around with changing the "Bar datetime" of the Import Wizard, manipulating my datasets, but could not fix the problem.

Author:  Dr. Anton Fokin [ Fri Aug 19, 2016 9:46 am ]
Post subject:  Re: Missing Bars

Hi,

what happens if you add Console.WriteLine(bar); in OnBar method of your stratgey? How many bars will you see?

Also, what do you see if you click on this bar series in the DataManager? Do you see all bars? Are they different from what you get in OnBar above?

Regards,
Anton

Author:  haroldmaj [ Fri Aug 19, 2016 5:48 pm ]
Post subject:  Re: Missing Bars

Hello, both Console.WriteLine(bar) and the dataseries in the Data Manager has an identical count.

However, DateTime1 seems to be skipping the first bar (i.e starts on 7/3/1980 and assumes values of 7/2/1980).

As such, all the bars in the chart has values of the previous bar, and so the 5th bar is missing.

Author:  Dr. Anton Fokin [ Fri Aug 19, 2016 7:05 pm ]
Post subject:  Re: Missing Bars

Why don't you set DateTime1 smaller than bar datetime?

Author:  haroldmaj [ Fri Aug 19, 2016 9:18 pm ]
Post subject:  Re: Missing Bars

Hi Anton, setting the DateTime1 smaller than the datetime of the data still presents the same problem. Moving the cursor over the empty bar shows the data specific to that bar, but it fails to draw it in the chart.

For example, since the 1980/07/01 data is shown as a range:

7/1/1980 16:00:00 - 7/2/1980 16:00:00, OQ recognizes that a bar for 7/2/1980 instead. Switching from "BeginTime to EndTime" does not solve the issue either.

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/