SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Sun Sep 15, 2019 9:37 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Jul 01, 2015 11:27 pm 
Offline

Joined: Wed Mar 17, 2010 4:55 pm
Posts: 19
Dear Support

We observe the following strange behavior:

We cannot plot with only quotes data added to a strategy. If we add however bars (e.g. by compressing the quotes to bars) then we see plots.

Below there is a simple test code. If we only have quotes data, ts1 is not plotted. If we add the bar data, then the ts1 is plotted.
What do we wrong? Or is this an inherent limitation that plotting only works if bar data is attached to the strategy?

Many thanks for your help.

Daniel

Code:
using System;
using System.Drawing;
 
using OpenQuant.API;
using OpenQuant.API.Indicators;
 
public class MyStrategy : Strategy
{
            TimeSeries ts1;
           
            public override void OnStrategyStart()
            {
                        ts1 = new TimeSeries();
                        ts1.Color = Color.Red;
                        Draw(ts1,2);
            }
 
            public override void OnQuote(Quote quote)
            {
                        ts1.Add(quote.DateTime,quote.Bid);
            }
}


Attachments:
adding-bar-data.PNG
adding-bar-data.PNG [ 4.22 KiB | Viewed 2686 times ]
Top
 Profile  
 
PostPosted: Wed Jul 01, 2015 11:36 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6816
Hi Daniel,

you don't do anythign wrong. The bar chart needs to have one (main) bar series, which defines division of X axis. This way you can have a gapeless chart - X axis is not a continuous time axis but rather a bar number axis.

OQ2014 has two charts - one is the same as OQ3.x bar chart (gapeless) and the other has continuous time axis so that you don't need to have a main bar series (but you have holes between trading sessions).

Regards,
Anton


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

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 4 guests


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