How to get the open, close, high and low prices of a bar by an index?

Created at 26 Aug 2020, 10:36
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!
NA

narzantaria

Joined 26.08.2020

How to get the open, close, high and low prices of a bar by an index?
26 Aug 2020, 10:36


Good day!
I want to create a trading bot that is based on last bars data, and i need to get the open, close, high and low prices of a bar by an index.

In metatrader 4 there is a functions like:

double high1 = iHigh(NULL,0,1); //this is the high level of the first bar (index 1).

How to do the same in cTrader?

I need to process data of bars inside a tick.

Thanks!


@narzantaria
Replies

PanagiotisCharalampous
26 Aug 2020, 11:45

Hi narzantaria,

You can access all this information using the Bars property.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous