Download MetaTrader 5

MT5 expert advisor - how close all opened positions by EA

To add comments, please log in or register
zemo
80
zemo  

Hi,

I need a function  (close_all_orders)   that close all opened positions by the EA.

The idea is to close all opened positions by EA after the end of day 

void OnTick()
{

if(Hour()==16 && Min()==55)
 close_all_opened();

else ExtExpert.OnTick(); 

} 

To add comments, please log in or register