Two candlestick series in the same chart window

Created at 31 Oct 2014, 18:44
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
felipetto's avatar

felipetto

Joined 17.04.2014

Two candlestick series in the same chart window
31 Oct 2014, 18:44


I need to plot a candlestick chart indicator in same window of currency pair using candlestick in both cases. Can I do this?
One candles series is the selected currency and the second candle series is the indicator.


@felipetto
Replies

Spotware
03 Nov 2014, 09:43

You can draw candles using ChartObjects.DrawLine method. Draw thin line from high to low and thick line from open to close.


@Spotware

trend_meanreversion
18 Mar 2016, 12:33

RE:

Spotware said:

You can draw candles using ChartObjects.DrawLine method. Draw thin line from high to low and thick line from open to close.

 

Is it possible to draw ChartObjects.DrawLine ( basically creating my own OHLC ) in a bot instead of indicator ? Nothing is getting created on charts despite of me able to print the data correctly in cBot . It seems i can't use chartObjects in a cbot , is it correct ?

 


@trend_meanreversion

Spotware
24 Mar 2016, 14:14

Dear Trader,

It's possible to draw a line in a cBot, but not when you use backtesting. ChartObjects is disabled in backtesting.

Please have a look at the following code snippet:

protected override void OnStart()
{
    var index = Source.Count;
    var price = Symbol.Bid + Symbol.PipSize;
    ChartObjects.DrawLine("line", index - 1000, price, index, price, Colors.Blue, 2, LineStyle.Solid);
}

 


@Spotware