MQL4 - automated forex trading   /  

Forum

How to add a day at a datetime variable ?

Back to topics list To post a new topic, please log in or register

avatar
29
tintin92 2006.09.22 14:03 
Hello,

How to add a day at a datetime variable ?

My code :
 
   datetime dtDateTest   = D'2004.01.01 00:00';
   datetime dtDateTestPlusOne;
 
   dtDateTestPlusOne =  dtDateTest + ??????? ;

Thanks,

Tintin92

Creation of an Automated Trading System

Creation of an Automated Trading System

You must admit that it sounds alluringly - you become a fortunate possessor of a program that can develop for you a profitable automated trading system (ATC) within a few minutes. All you need is to enter desirable inputs and press Enter. And - here you are, take your ATC tested and having positive expected payoff. Where thousands of people spend thousands of hours on developing that very unique ATC, which will "wine and dine", these statements soundб to put it mildly, very hollow. On the one hand, this really looks a little larger than life... However, to my mind, this problem can be solved.


avatar
155
richplank 2006.09.22 15:59 
tintin92 wrote:
Hello,

How to add a day at a datetime variable ?

My code :
 
   datetime dtDateTest   = D'2004.01.01 00:00';
   datetime dtDateTestPlusOne;
 
   dtDateTestPlusOne =  dtDateTest + ??????? ;

Thanks,

Tintin92

The datetime variable keeps seconds since 1970-01-01, so adding 86400 (24*60*60) would move it a day.

avatar
29
tintin92 2006.09.22 18:03 
The datetime variable keeps seconds since 1970-01-01, so adding 86400 (24*60*60) would move it a day.

Thanks, it works.

Tintin92


Back to topics list  

To add comments, please log in or register