How to get close price

Created at 22 Sep 2013, 19:51
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!
HE

herophan

Joined 22.09.2013

How to get close price
22 Sep 2013, 19:51


While the chart is drawing a new bar, I want to get the close prices of the bar in front of newbar and of the bar in front of the bar in front of newbar.

Could you help me ?

Thanks,


@herophan
Replies

hichem
22 Sep 2013, 22:53

RE:

herophan said:

While the chart is drawing a new bar, I want to get the close prices of the bar in front of newbar and of the bar in front of the bar in front of newbar.

Could you help me ?

Thanks,

int index = MarketSeries.Close.Count - 2;

double price_bar_front_of_newbar = MarketSeries.Close[index];

double price_bar_front_of_front_of_newbar = MarketSeries.Close[index-1];

 


@hichem