Help with a few lines of code

 

Hi, Coding Pros...

I am a MQL4 newbie/amateur and would like to ask for some help with a few lines. I would like to know how to make the code do this (I got the rest of codes ready, but got stuck with the selections):

Select only a certain period (such as a certain month at quarter end, so ignoring other months)

Then from that month end, look back N months (I think I've got this too, what I really need is to sort out the above selection query)

Thanks

Alex

 
Alexatmql4:

Hi, Coding Pros...

I am a MQL4 newbie/amateur and would like to ask for some help with a few lines. I would like to know how to make the code do this (I got the rest of codes ready, but got stuck with the selections):

Select only a certain period (such as a certain month at quarter end, so ignoring other months)

Then from that month end, look back N months (I think I've got this too, what I really need is to sort out the above selection query)

Use iBarShift() with your date to find the bar number you want to look back from and then the date N months before that again with iBarShift() to get the bar number to want to look back to . . . you then have the 2 bar numbers you need to look between.
Reason: