Download MetaTrader 5

OnTrade() operates in mql4?

To add comments, please log in or register
Jose Miguel Soriano
5036
Jose Miguel Soriano  

OnTrade() operates in mql4?

Accustomed to mql5, I see that does not work in mql4... It's like that? 

Alain Verleyen
Moderator
33504
Alain Verleyen  
No, OnTrade() doesn't work with MT4.
Jose Miguel Soriano
5036
Jose Miguel Soriano  
Alain Verleyen:
No, OnTrade() doesn't work with MT4.

Merci beaucoup, Alain

Demande: Aucune peut pas passer les données d'un indicateur à l'autre? 

Alain Verleyen
Moderator
33504
Alain Verleyen  
GlobalVariables of the terminal, file, custom events...
JD4
1100
JD4  
Does the documentation exist to help people to have a workaround in MQL4 to make it work as the OnTrade() function would?
Alain Verleyen
Moderator
33504
Alain Verleyen  
JD4:
Does the documentation exist to help people to have a workaround in MQL4 to make it work as the OnTrade() function would?
The workaround is to check trades history. There is no necessity for OnTrade event with mql4 as the language is fully synchronized with the trade server.
Erick Queiroz de Faria
112
Erick Queiroz de Faria  

how i solution it

int totalOrders = OrdersTotal();

void OnTick(){

//void OnTradeGambiarra(){

if(totalOrders != OrdersTotal()){

//+-----------

//Ur CODE HERE

totalOrders = OrdersTotal();

}

//}

}


To add comments, please log in or register