Obtain the opening and closing price of a day - page 2

 
whroeder1:

I've now added you to my do not help list, have a nice life.


Great! All I ever get from you is rude "I'm smarter than you" copypastas anyway. 

 

nicholi shen:

void OnStart()
{
   int day_shift = 1; // yesterday
   MqlRates rate[];
   CopyRates(Symbol(),PERIOD_D1,day_shift,1,rate);
   Print("Yesterday: O=",rate[0].open," C=",rate[0].close);
}



Only to say thanks @nicholi !

 

I saw this and was rather excited:

void OnStart()
{
   int day_shift = 1; // yesterday
   MqlRates rate[];
   CopyRates(Symbol(),PERIOD_D1,day_shift,1,rate);
   Print("Yesterday: O=",rate[0].open," C=",rate[0].close);
}

So this gives me the close, but the close I want is for the same day, so I assume it would like this:

int day_shift = 0;

So my purpose is this:

I want to execute this mlq script in the DAX, but I please want to know the close of the Nikkey-25 earlier the same day, I also please need the open of the open of the of the Nikkey-25 for earlier the same day.

So if someone can please help me out here, I would be most grateful.

Kind Regards

Reason: