Download MetaTrader 5

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

To add comments, please log in or register
sorasit
359
sorasit  

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

Thank you

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

Run backtest on period H4.

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

qjol
3243
qjol  
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
sorasit
359
sorasit  
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 ?

qjol
3243
qjol  
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

sorasit
359
sorasit  
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 ?

qjol
3243
qjol  

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
   }
qjol
3243
qjol  

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

sorasit
359
sorasit  
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.

whroeder1
14778
whroeder1  
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
12
To add comments, please log in or register