Hi everyone,
can someone explain me the purpose of this DEAL_ENTRY property: DEAL_ENTRY_STATE? The documentation gives no information about it, only the fact, that it exists.
What situations will involve using this?
Thanks,
Benji
Defines if the transaction is inbound or outbound market.
If the open position is BUY, a trade can be IN (lot increases by a BUY order) or may be OUT (lot is decremented or the position is closed, according to the value of the volume specified in the pre-order execution trade: SELL order).
If the position is SELL, IN implies SELL order, OUT implies BUY order.
//------------------------------------- SALIDA DEL MERCADO ------------------------------ bool esTransSalida(ulong ticket) { //salida o cierre de una posición bool resp= (HistoryDealGetInteger(ticket,DEAL_ENTRY)==DEAL_ENTRY_OUT); return(resp); } //------------------------------------- ENTRADA AL MERCADO ------------------------------ bool esTransEntrada(ulong ticket) { bool resp= (HistoryDealGetInteger(ticket,DEAL_ENTRY)==DEAL_ENTRY_IN); return(resp); }
Defines if the transaction is inbound or outbound market.
If the open position is BUY, a trade can be IN (lot increases by a BUY order) or may be OUT (lot is decremented or the position is closed, according to the value of the volume specified in the pre-order execution trade: SELL order).
If the position is SELL, IN implies SELL order, OUT implies BUY order.
There is a related unanswered question (with a suggestion) - https://www.mql5.com/en/forum/6036. I think may be MQ shed some light on this?
Forum on trading, automated trading systems and testing trading strategies
corresponding relation between DEAL_TYPE and DEAL_ENTRY
kwang1, 2012.01.29 17:04
Please advise if it's correct in following corresponding relation:
DEAL_TYPE | DEAL_ENTRY | |
---|---|---|
1 | DEAL_TYPE_BUY/DEAL_TYPE_SELL | DEAL_ENTRY_IN/DEAL_ENTRY_OUT/DEAL_ENTRY_INOUT |
2 | DEAL_TYPE_BALANCE/DEAL_TYPE_CREDIT/DEAL_TYPE_CHARGE/DEAL_TYPE_CORRECTION | DEAL_ENTRY_STATE |
There is a related unanswered question (with a suggestion) - https://www.mql5.com/en/forum/6036. I think may be MQ shed some light on this?
Thanks marketeer!
Thanks marketeer!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- 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 everyone,
can someone explain me the purpose of this DEAL_ENTRY property: DEAL_ENTRY_STATE? The documentation gives no information about it, only the fact, that it exists.
What situations will involve using this?
Thanks,
Benji