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

pietramarek since: 09 Feb 2023;

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

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

Thank you !

PanagiotisChar's avatar

PanagiotisChar since: 15 Sep 2022;

  23 Mar 2023, 09:02
Cofounder and Chief Technologist at Aieden Technologies

pietramarek since: 09 Feb 2023;

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