A predefined MQL4/MQL5 event function that is called each time a new market tick (price quote) is received for the symbol attached to the EA. Almost all trading logic in an Expert Advisor runs inside OnTick()
. For example, an EA might check its entry conditions every time OnTick()
is invoked and send an order if conditions are met.