i need your help please i need to force ea work base on time event not on tick event
how can i do that ??
for ex i want ea to open pending order at specific time ex: when server time = 14 hour and minute = 15 and seconds = 40 the ea will open pending order
i need just the code
anyone can help please
thanks in advance
hello mpowerjo,
please take a look at the event handling functions, specifically the ontimer event handler.
you can also do that using the ontick event handler, through the usage of the mqldatetime struct.
I need your help please I need to force EA work base on time event not on tick event
how can I do that ??
for ex I want EA to open pending order at specific time ex: when server time = 14 hour and Minute = 15 and seconds = 40 the EA will open pending order
I need just the code
anyone can help please
thanks in advance
use while(IsStopped()==false){ }
hello mpowerjo,
please take a look at the event handling functions, specifically the ontimer event handler.
you can also do that using the ontick event handler, through the usage of the mqldatetime struct.
Thank you Maclaren
The problem is I'm beginner in programming and I know the solution is the ontimer function but I don't Find useful tutorial that can help to understand this function
so if you can help to find tutorial or example to use this function I will be thankful for you
I writ my EA before and I use it for trading now my problem is I need to open my pending orders in small period of time about 2 seconds when I use ontick event handler the EA will wait the new tick from the market
if the price did not make the tick in me 2 seconds period the EA will not open the pending orders
I think the picture is clear now for what I want exactly
I will be thankful if you help me
use while(IsStopped()==false){ }
I use this method before and didn't be useful for me
thank very much sir
This is a very very discouraging advice. Malacarne's answer is much better.
Thank you Maclaren
The problem is I'm beginner in programming and I know the solution is the ontimer function but I don't Find useful tutorial that can help to understand this function
so if you can help to find tutorial or example to use this function I will be thankful for you
I writ my EA before and I use it for trading now my problem is I need to open my pending orders in small period of time about 2 seconds when I use ontick event handler the EA will wait the new tick from the market
if the price did not make the tick in me 2 seconds period the EA will not open the pending orders
I think the picture is clear now for what I want exactly
I will be thankful if you help me
- www.mql5.com
Use this code.
#property link "http://www.mql5.com"
#property version "1.00"
#property strict
int OnInit()
{
//--- create timer
EventSetTimer(1);
OnTimer();
//---
return(INIT_SUCCEEDED);
}
void OnTimer()
{
//---
Print("hello !") ;
}
//+------------------------------------------------------------------+
I use this method before and didn't be useful for me
thank very much sir
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I need your help please I need to force EA work base on time event not on tick event
how can I do that ??
for ex I want EA to open pending order at specific time ex: when server time = 14 hour and Minute = 15 and seconds = 40 the EA will open pending order
I need just the code
anyone can help please
thanks in advance