vdemydiuk / mtapi

MetaTrader API (terminal bridge)
http://mtapi4.net/
MIT License
524 stars 283 forks source link

Monitor Order Change #158

Open jneindonesia opened 5 years ago

jneindonesia commented 5 years ago

Hi,

I want to ask. Can I monitor order changes? (like modified Take Profit and Stop Loss) In sample I only see when order opened and closed.

Thanks.

KptKuck commented 5 years ago

For that you can use the TransActionEvent. See documentation on mql5.com https://github.com/vdemydiuk/mtapi/blob/master/MtApi5/Events/OnTradeTransactionEvent.cs https://www.mql5.com/en/docs/event_handlers/ontradetransaction

jneindonesia commented 5 years ago

Is that available on MT4/MQ4?

vdemydiuk commented 5 years ago

Unfortunately, MQL4 does not have order events like MQL5. I have implemented trade monitors in MtApi [MT4]: TimeframeTradeMonitor, TimerTradeMonitor. But they are looking for created and closed orders only. If you want to monitor of created orders you should create custom monitor that will check orders by timer.

KptKuck commented 5 years ago

Is that available on MT4/MQ4?

The author has already answered. However, I recommend that you do not spend time in old technology. MT5 is the future. greetings