How to check TimeMinute(Time[0]) = 30 at TF-H4 ?

 

I run EA on TF-H4. If I want to check TimeMinute(Time[0]) = 30 . How To do ?

Thank you

 
sorasit46: If I want to check TimeMinute(Time[0]) = 30 . How To do ?
if(TimeMinute(Time[0]) == 30){
  Print("Bottom of the hour");
}
 

Run backtest on period H4.

All time display TimeMinute(Time[0])= 0 .

 
sorasit46:

If I want to check TimeMinute(Time[0]) = 30 . How To do ?


sorasit46:

Run backtest on period H4.

All time display TimeMinute(Time[0])= 0 .


excuse me, but TimeMinute(Time[x]) on H1, H4 or D1 (Etc.) TF can never be other than 0
 
qjol:


excuse me, but TimeMinute(Time[x]) on H1, H4 or D1 (Etc.) TF can never be other than 0

That's real.And that is my question .

When run backtest on TF-H4. How to check TimeMinute(Time[0]) = 30,31.... (Etc.) ?

Or the other way of question .When tick (not trig ) .How to check time minute of tick ?

 
sorasit46:

That's real.And that is my question .

When run backtest on TF-H4. How to check TimeMinute(Time[0]) = 30,31.... (Etc.) ?


i realy dont understand the question ?

please explain in details what you are trying to accomplish

 
qjol:

i realy dont understand the question ?

please explain in details what you are trying to accomplish


Among backtest on TF-H4.How to check time minute of tick ?

My EA write for work on TF-H4.

If I want to do some order.Such as delete pending every time minute = 31. How to do that ?

 

use TimeLocal or TF-M30 but you cannot use H4 TF for that

TimeLocal example

if (TimeMinute(TimeLocal()) == 30)
   {
   // do something
   }


TF-M30 example

if (TimeMinute(iTime(Symbol(), PERIOD_M30, 0)) == 30)
   {
   // do something
   }
 

sorasit46:

If I want to do some order.Such as delete pending every time minute = 31. How to do that ?


hopps, now that you've changed your mind from 30 to 31

you cannot use PERIOD_M30 either only PERIOD_M1 or TimeLocal  or TimeCurrent

 
qjol:

hopps, now that you've changed your mind from 30 to 31

you cannot use PERIOD_M30 either only PERIOD_M1 or TimeLocal  or TimeCurrent


Thank you very much.

I will trial with TimeLocal or TimeCurrent.

 
sorasit46: That's real.And that is my question .

When run backtest on TF-H4. How to check TimeMinute(Time[0]) = 30,31.... (Etc.) ?

  1. Then why didn't you ask that in the first place?
  2. You don't want to use Time[0] because it isn't changing for the entire H4.
  3. RTM Minute() See Alphabetic Index of MQL4 Functions (600+) - MQL4 forum
Reason: