SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Mon Jul 06, 2020 5:46 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Missing Bars
PostPosted: Thu Aug 18, 2016 9:36 pm 
Offline

Joined: Thu Jun 09, 2016 8:25 pm
Posts: 15
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.


Top
 Profile  
 
 Post subject: Re: Missing Bars
PostPosted: Fri Aug 19, 2016 9:46 am 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
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


Top
 Profile  
 
 Post subject: Re: Missing Bars
PostPosted: Fri Aug 19, 2016 5:48 pm 
Offline

Joined: Thu Jun 09, 2016 8:25 pm
Posts: 15
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.


Top
 Profile  
 
 Post subject: Re: Missing Bars
PostPosted: Fri Aug 19, 2016 7:05 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
Why don't you set DateTime1 smaller than bar datetime?


Top
 Profile  
 
 Post subject: Re: Missing Bars
PostPosted: Fri Aug 19, 2016 9:18 pm 
Offline

Joined: Thu Jun 09, 2016 8:25 pm
Posts: 15
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group