SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Thu Sep 21, 2017 4:32 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Tue May 19, 2015 3:00 pm 
Offline

Joined: Tue May 19, 2015 2:55 pm
Posts: 1
hello all ,can anyone give me an example that how do i change candle bar's color in OpenQuant2014 , thx!


Top
 Profile  
 
PostPosted: Thu May 21, 2015 4:03 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6768
OpenQuant 2014 FAQ

Note that you should get the latest install.

How to change chart attributes

You can change colors, styles and other attributes of objects that you draw on a chart using corresponding group parameters. Assume you create a group for a bar series to draw it on chart pad 0 using instrument symbol as a selector key (to switch between charts for different instruments). You can find this code in the SMACrossover demo strategy:

barsGroup = new Group("Bars");
barsGroup.Add("Pad", 0);
barsGroup.Add("SelectorKey", Instrument.Symbol);

Bar series will be drawn with default attributes. You will see a candle chart with white and black candles.



You can add

barsGroup.Add("CandleBlackColor", Color.Green);
barsGroup.Add("CandleWhiteColor", Color.Yellow);

to draw green and yellow candles instead



or change style to bar chart adding

barsGroup.Add("ChartStyle", "Bar");

Then you should see



You can use the following attributes for different drawing objects:

BarSeries

ChartStyle (Bar, Candle, Line)
Color
BarColor
CandleColor
CandleBorderColor
CandleWhiteColor
CandleBlackColor
Width

FillSeries

BuyColor
SellColor
TextEnabled

TickSeries

Color
Width

TimeSeries

Style (Line, Bar, Circle)
Color
Width


Top
 Profile  
 
PostPosted: Sun Jun 18, 2017 4:12 pm 
Offline

Joined: Tue Oct 13, 2009 12:19 pm
Posts: 190
Could you post an example for:
Quote:
TimeSeries
Style (Line, Bar, Circle)
Color
Width

Style Circle?

I cannot get it to work with CIRCLE
Group("PlacedOrder", "Style","Circle");

I did try it with ChartStyle, but on that object, I only see Bar,Candle,Line but no Circle.

Thx.
M


Top
 Profile  
 
PostPosted: Mon Jun 26, 2017 11:59 am 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 363
Hello Mike,
by default width=1, which too small for Style= Circle,
it will be visible starting from Width=2.
Try this:
Code:
         Group("SMA1", "Pad", 0);
         Group("SMA1", "Color", Color.Green);
         Group("SMA1", "Style", "Circle");
         Group("SMA1", "Width", 4);


Top
 Profile  
 
PostPosted: Mon Jun 26, 2017 3:54 pm 
Offline

Joined: Tue Oct 13, 2009 12:19 pm
Posts: 190
Maybe change the default to 3 or 4 right away in the next version.


Top
 Profile  
 
PostPosted: Thu Jun 29, 2017 11:44 am 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6768
Then Line would be too thick I guess?


Top
 Profile  
 
PostPosted: Thu Jun 29, 2017 3:12 pm 
Offline

Joined: Tue Oct 13, 2009 12:19 pm
Posts: 190
why not make it chart style dependent then?

That would be my suggestion.


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

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 3 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