How get close price first candle of London trading session
How get close price first candle of London trading session
23 Apr 2020, 13:33
Hi All,
I apologize, I'm not so strong in programming.
I'm trying to get close price first candle of London trading session.
cBot has to open Execute Market Order regards to close price first candle of London trading session according to selected time frame.
Could somebody help with example how it can be done?
Thanks in advance.
Replies
anton.kovalchuk
23 Apr 2020, 14:54
RE:
PanagiotisCharalampous said:
Hi Anton,
Assuming you are referring to h1 bars and you are using GMT time, here is an example
var bars = MarketData.GetBars(TimeFrame.Hour, Symbol.Name); for (int i = 0; i < 24; i++) { if (bars.OpenTimes.Last(i).Hour == 8) Print(bars.ClosePrices.Last(i)); }
Best Regards,
Panagiotis
This is exactly what I need
Thank you a lot PanagiotisCharalampous
@anton.kovalchuk
PanagiotisCharalampous
23 Apr 2020, 13:49
Hi Anton,
Assuming you are referring to h1 bars and you are using GMT time, here is an example
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous