MQL4 Implementation of onTrade Event Handler – EA MetaTrader 4
The code keeps track of orders’ tickets in an CArrayInt. Monitoring the changes to the list of tickets in onTimer it triggers these event handlers: //+——————————————————————+ //| Event handler when stop loss is hit | //+——————————————————————+ void onStopLoss(ulong ticket); //+——————————————————————+ //| Event handler when take profit is hit | //+——————————————————————+ void onTakeProfit(ulong ticket); //+——————————————————————+ //| Event handler … Read more