ENUM_DEAL_REASON
Identifier | Description |
---|---|
DEAL_REASON_CLIENT | The deal was executed as a result of activation of an order placed from a desktop terminal |
DEAL_REASON_MOBILE | The deal was executed as a result of activation of an order placed from a mobile application |
DEAL_REASON_WEB | The deal was executed as a result of activation of an order placed from the web platform |
DEAL_REASON_EXPERT | The deal was executed as a result of activation of an order placed from an MQL5 program, i.e. an Expert Advisor or a script |
DEAL_REASON_SL | The deal was executed as a result of Stop Loss activation |
DEAL_REASON_TP | The deal was executed as a result of Take Profit activation |
DEAL_REASON_SO | The deal was executed as a result of the Stop Out event |
DEAL_REASON_ROLLOVER | The deal was executed due to a rollover |
DEAL_REASON_VMARGIN | The deal was executed after charging the variation margin |
DEAL_REASON_SPLIT | The deal was executed after the split (price reduction) of an instrument, which had an open position during split announcement |
DEAL_REASON_CORPORATE_ACTION | The deal was executed as a result of a corporate action: merging or renaming a security, transferring a client to another account, etc. |
Possibly in your case DEAL_REASON_EXPERT is detected. Anyway my suggestion is printing the DEAL_REASON of the deal sent by the python code(by handling onTradeTransaction event) and print it in the terminal for investigation.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
HI all, a general question on the python API and more specifically propfirms.
I was wondering if the brokerside is able to see that a Python API is being used to place trades - I'm currently in the process of passing propfirms which do not allow the use of EA's/ require their mql5 source code to be sent. I prefer not to share my proprietary work and would instead be interested to see what sort of metadata the python API leaves behind on the brokerside
Thanks