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

MQL4 OnTrade() Alternative – EA MetaTrader 4

MQL4 OnTrade() Alternative - expert for MetaTrader 4
Author: Coders’ Guru While discovering the MQL4 New build (610) capabilities I found a very useful even OnTrade() highlighted in MetaEditor. I clicked F1 to see its implementation but unfortunately it’s not supported yet in MQL4. That’s why I created my own Simulator. This code will raise events on these cases: OnOpen: When open a … Read more

Trade Transmitter via web and OnTrade Function to MQL4 – script MetaTrader 4

Trade Transmitter via web and OnTrade Function to MQL4 - script for MetaTrader 4
This EA has 3 Very Interesting Functions: 1. It can Detect Trades and its modifications in the account, made by other EAs or made manually. 2. Once trades are detected, it can transmit each Trade over the web to any Server or any webapplication API (May require modification by professional coder, depending on the API). … Read more