Hello
it works , the issue is elsewhere probably , in the feed of the date on t1 likely
faustf:
Hi i build a function for remove one day or add one day but when i use it return me always epoch linux time , whats wrong ?
You can do it in 1 line of code btw and drop the whole +/- logic bc integers can have negative values, yes?
#define AddDayMacro(x,y) x += y * 86400; // x - time y - number of days
Or if you don't like macros
datetime AddDayFunction(datetime datadipartenza, int giorni) { return datadipartenza += giorni * 86400; }
thanks so much
Don't hard code numbers.
Find bar of the same time one day ago - MQL4 programming forum #1 & #6 (2017)
datetime when= …; datetime tomorrow = when + PeriodSeconds(PERIOD_D1);

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi i build a function for remove one day or add one day but when i use it return me always epoch linux time , whats wrong ?