Search code examples
mql4mql5forex

How to execute an OrderSend() function of MQL4 or MQL5 using cmd?


How to execute an OrderSend() function of MQL4 or MQL5 language using cmd script ?


Solution

  • How to execute an OrderSend() function of MQL4 or MQL5 language using a cmd script ?

    Doable.

    Both sides of your wished eco-system can get connected using ZeroMQ or signalling/messaging.

    The cmd shell will PUSH such instruction, next the MT4/MT5 Terminal will detect a message on a PULL-socket archetype an submit properly formatted OrderSend(...) instruction and handle the XTO-related error-state(s) and all the Order-Management related duties.

    The MQL4/5 side will best work using the Script-form of the MQL4/5 code-execution units, which will release your code from being a QUOTE-arrival event dependent.