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

Question with OpenQuant2014 chart
http://www.smartquant.com/forums/viewtopic.php?f=60&t=10950
Page 1 of 1

Author:  wugymcu [ Tue May 19, 2015 3:00 pm ]
Post subject:  Question with OpenQuant2014 chart

hello all ,can anyone give me an example that how do i change candle bar's color in OpenQuant2014 , thx!

Author:  Dr. Anton Fokin [ Thu May 21, 2015 4:03 pm ]
Post subject:  Re: Question with OpenQuant2014 chart

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

Author:  mikembb [ Sun Jun 18, 2017 4:12 pm ]
Post subject:  Re: Question with OpenQuant2014 chart

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

Author:  skuvv [ Mon Jun 26, 2017 11:59 am ]
Post subject:  Re: Question with OpenQuant2014 chart

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);

Author:  mikembb [ Mon Jun 26, 2017 3:54 pm ]
Post subject:  Re: Question with OpenQuant2014 chart

Maybe change the default to 3 or 4 right away in the next version.

Author:  Dr. Anton Fokin [ Thu Jun 29, 2017 11:44 am ]
Post subject:  Re: Question with OpenQuant2014 chart

Then Line would be too thick I guess?

Author:  mikembb [ Thu Jun 29, 2017 3:12 pm ]
Post subject:  Re: Question with OpenQuant2014 chart

why not make it chart style dependent then?

That would be my suggestion.

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