How to get Open Day Price, Hour, minutes and seconds time
Created at 17 Jul 2013, 14:30
How to get Open Day Price, Hour, minutes and seconds time
17 Jul 2013, 14:30
Hello,
I need the equivalent function of MT4
robot operates a period M1 !!!
//Openday price
double Dayline = iOpen (NULL, PERIOD_D1, 0);
//Closeday price
double DaylineClose = iClose (NULL, PERIOD_D1, 0);
//Create line
ObjectCreate ("Dayline" OBJ_HLINE, 0, Time [0], Dayline);
// high bars
iHigh (NULL, PERIOD_D1, 0);
Hours ()
Minutes ()
Seconds ()
Surely the answer is trivial, but I can not be traced in the documentation.
Thank you in advance and
Regards
breakermind
17 Jul 2013, 20:35
RE:
It is no longer valid.
/ / When M1 - first day bar open price
int minute = Server.Time.Minute;
int hour = Server.Time.Hour;
int backBars = hour * 60 + minute;
var lastIndex = MarketSeries.Open.Count;
double OpenPriceDay = MarketSeries.Open [lastIndex-backBars-1];
Regards and bye.
@breakermind