MQL4 Implementation of onTrade Event Handler – EA MetaTrader 4

MQL4 Implementation of onTrade Event Handler - expert for 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

HashMap implementation – library MetaTrader 4

HashMap implementation - library for MetaTrader 4
Description: This is a HashMap implementation. This allows something like arrays but with string indexes. It maps strings to Objects. The Objects must be a subclass of the HashValue class provided. The Hash by default will ‘adopt’ the value objects. In which case it will free the memory when they are no longer in the … Read more