I would like to return the following variables :
1. The first bar open price of the last recorded Monday (Hour Bar).
2. The last bar close price of the last recorded Wednesday (Hour Bar).
Anybody know how to do this ? Ive tried getting the variables as they pass with :
//-------------------------------------------------------
if (currentday == 1 && currenttime == 0)
{
MondayOpenPrice = iOpen(Symbol(),PERIOD_H1,0);
}
//--------------------------------------------------------
The problem with the above is I cant always keep my metatrader running the whole week to keep these variables.
So I will need the EA to look back in history for the first recorded open price on a monday etc...
Thank you so much for your time.
1. The first bar open price of the last recorded Monday (Hour Bar).
2. The last bar close price of the last recorded Wednesday (Hour Bar).
Anybody know how to do this ? Ive tried getting the variables as they pass with :
//-------------------------------------------------------
if (currentday == 1 && currenttime == 0)
{
MondayOpenPrice = iOpen(Symbol(),PERIOD_H1,0);
}
//--------------------------------------------------------
The problem with the above is I cant always keep my metatrader running the whole week to keep these variables.
So I will need the EA to look back in history for the first recorded open price on a monday etc...
Thank you so much for your time.