subtract minutes to iTime

 

Good morning, I wanted to do a consultation to see if anyone can help me. Can a simple subtraction when iTime obtained?,

Eg

I want to subtract 15 minutes to the value obtained with time_EURUSD_M15 = iTime (Symbol (), PERIOD_M15, i);
or I want to subtract 30 minutes to the value obtained with time_EURUSD_M30 = iTime (Symbol (), PERIOD_M30, i);

Is it possible?.
thanks
 
jugivi:

Is it possible?.


Yes, you should read the Documentation about date & time functions time and datetime type variables . . . datetime date and time functions
 
jugivi:

Good morning, I wanted to do a consultation to see if anyone can help me. Can a simple subtraction when iTime obtained?,

Eg

I want to subtract 15 minutes to the value obtained with time_EURUSD_M15 = iTime (Symbol (), PERIOD_M15, i);
or I want to subtract 30 minutes to the value obtained with time_EURUSD_M30 = iTime (Symbol (), PERIOD_M30, i);

Is it possible?.
thanks


Why do that ??? Do you think to be able that way to trade your missing opportunnities ....

counting time is with datetime every second is +1

So 15 minutes is a counting of 15 * 60

datetime time_EURUSD_M15 = iTime (Symbol (), PERIOD_M15, 0);
//substract 15 minutes
int minutes = 15;
datetime substract_time = time_EURUSD_M15- (minutes*60);

 
RaptorUK:

Yes, you should read the Documentation about date & time functions time and datetime type variables . . . datetime date and time functions

I have watched these two chapters, but I see no information about subtracting minutes ... Where I can find some examples?. thanks
 
jugivi:

I have watched these two chapters, but I see no information about subtracting minutes ... Where I can find some examples?. thanks
1 minute = 60 seconds . . . to subtract 1 minute just subtract 60 seconds instead . . . you don't need examples, just use your head, think a little.

deVries even gave you an example above.
Reason: