Pepperstone's MT4 Demo account: OrderClose(), OrderClose() do not work properly
- You need to RTFM
OrderClose(OrderTicket(), OrderLots(), 0.0, 3.0) OrderClose( OrderClose(int ticket, double lots, double price, int slippage, color Color=CLR_NONE)
Bad price, function will always fail. - What are Function return values ? How do I use them ? - MQL4 forum
- I doubt it. POST your code.

Play videoPlease edit your post.
For large amounts of code, attach it.
Eg. lot size = 2.3
- If I use OrderClose(OrderTicket(), OrderLots(), 0.0, 3.0) so it lets my opened a part of trade related of current ticket left me still 2.3-2.0 = 0.3 lots opened.
- then, if I call the OrderClose() combined to the new Ticket (opportunely selected by OrderSelect(...)), it returns 0.0 even if this Ticket present 0.3 lots.
Someone suggests me any proposal solution?
Thank you in advance
Regards,
Daniele
I don't see how this code would close any part of a trade as price will not be 0.0
More likely that you are assigning the value of OrderLots to an integer variable and using that
Eg. lot size = 2.3
- If I use OrderClose(OrderTicket(), OrderLots(), 0.0, 3.0) so it lets my opened a part of trade related of current ticket left me still 2.3-2.0 = 0.3 lots opened.
- then, if I call the OrderClose() combined to the new Ticket (opportunely selected by OrderSelect(...)), it returns 0.0 even if this Ticket present 0.3 lots.
Someone suggests me any proposal solution?
Thank you in advance
Regards,
Daniele