Open price of 5 minutes, 15 minutes and 30 minutes Bar

Created at 22 Mar 2023, 15:12
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!
PI

pietramarek

Joined 09.02.2023

Open price of 5 minutes, 15 minutes and 30 minutes Bar
22 Mar 2023, 15:12


Hi how to get 5 minutes, 15 minutes and 30 minutes Bars Open price? What os the best way ?

Thank you !

 


@pietramarek
Replies

pietramarek
23 Mar 2023, 10:17

RE:

PanagiotisChar said:

Hi there,

You can use Bars.OpenPrices

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 

Hi I used also this code and I think It's work fine : 

     Bars bars15 = MarketData.GetBars(TimeFrame.Minute15);
            int currentBarIndex15 = bars15.Count - 1;
            Bar currentBar15 = bars15[currentBarIndex15];
            double openPrice15 = currentBar15.Open;
            Print("15min " + openPrice15);


@pietramarek