Simulating Trade Events in MQL4 Without OnTrade Support
Summary
The post introduces a custom simulator intended to provide trade-event notifications in MQL4, where the author says the built-in OnTrade event was not yet supported in the referenced build. The proposed event categories cover opening an instant order, modifying an order, closure by stop loss, closure by take profit, and other closures. The intended use is to let a strategy respond to changes in order state through separate event-like callbacks.
The document does not include the simulator code, implementation details, or test evidence; it only describes its purpose and the events it is meant to raise. It therefore cannot establish how the simulator detects order changes, handles pending orders, or distinguishes stop and target exits reliably. Readers are invited to test it, but no results or limitations beyond the stated lack of native support are supplied.
Key ideas
- The author proposes a custom substitute for the unavailable MQL4 OnTrade event.
- The simulator is intended to report order opening and modification events.
- It distinguishes stop-loss, take-profit, and other order closures.
- The post provides no implementation or test results to evaluate the approach.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.