You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
It is not true. I checked in my EA this code:
Comment(StringFormat("%i | %i", filling, ORDER_FILLING_IOC));
And the result is: 2 | 1, so ORDER_FILLING_IOC mean 1.
I think it's an error in MT5 or in documentation. I found this: https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#symbol_filling_mode
where is written that value of SYMBOL_FILLING_FOK is 1 and value of SYMBOL_FILLING_IOC is 2. This is wrong.
So what ? You are mixing SYMBOL_FILLING_IOC and ORDER_FILLING_IOC.
I think so Alain, may I ask you the difference and how to handle that. It might sounds basic but I am really struggling since quite some time on that.
Regards,
G
To be honest, I am completely lost, what I have coded above is working fine but in order to close an order, I tought a simple trade.PositionClose(ticket, 1000); would work and no.
I think so Alain, may I ask you the difference and how to handle that. It might sounds basic but I am really struggling since quite some time on that.
Regards,
G
As explained in post 1, I am using ORDER_FILLING_IOC to open trades, now when I want to close a trade as I am using the CTrade class, I thought I could simply use trade.PositionClose(ticket, 1000) to close the trade but it is not working.
As explained in post 1, I am using ORDER_FILLING_IOC to open trades, now when I want to close a trade as I am using the CTrade class, I thought I could simply use trade.PositionClose(ticket, 1000) to close the trade but it is not working.
Sorry I was confused by Zbigniew messages.
To close a position on netting mode you just have to use code like :
{
//TODO error checking
}
Sorry I was confused by Zbigniew messages.
To close a position on netting mode you just have to use code like :
{
//TODO error checking
}
Thanks Alain, I was so focused on closing the order with Ticket while closing with Symbol is working fine ;-)
I can move on to the next step now, the hedging mode.
Thanks Alain, I was so focused on closing the order with Ticket while closing with Symbol is working fine ;-)
I can move on to the next step now, the hedging mode.
why~~~~~
why~~~~~