Entry and Exit different LotAmount

Posted By: tradingest

Entry and Exit different LotAmount - 11/08/18 16:53

Hi guys,

using the code below to exit from trade I seen that the exit trade is not completed. Does not match the entry LotAmount
Code:
for(open_trades)
{
exitTrade(ThisTrade);
}


I'm entry with 0.29 lots and I'm exit with only 0.01 using the code above. Why? I used the MT4 bridge with 1.96 Zorro version.

Thanks
Posted By: jcl

Re: Entry and Exit different LotAmount - 11/09/18 09:17

There can be several reasons of not fully closing trades, like an NFA or FIFO issue or a closed market. You can normally see the reason in the MQ4 log. If not, please post the log.
Posted By: tradingest

Re: Entry and Exit different LotAmount - 11/09/18 18:23

Hi jcl,

thanks for the support.
As you see Zorro close only 0.01 and not the whole position opened.
Below the log MT4.

0 19:02:00.339 '1772219': order sell market 0.23 EURUSD sl: 1.73336 tp: 0.00000
0 19:02:00.443 '1772219': order was opened : #300738526 sell 0.23 EURUSD at 1.13336 sl: 1.73336 tp: 0.00000
0 19:02:00.491 '1772219': order sell market 0.31 EURAUD sl: 1.57389 tp: 0.00000
0 19:02:00.593 '1772219': order was opened : #300738527 sell 0.31 EURAUD at 1.56789 sl: 1.57389 tp: 0.00000
0 19:02:00.645 '1772219': order sell market 0.23 GBPUSD sl: 1.30369 tp: 0.00000
0 19:02:00.750 '1772219': order was opened : #300738528 sell 0.23 GBPUSD at 1.29769 sl: 1.30369 tp: 0.00000
0 19:07:19.511 '1772219': close order #300738526 sell 0.01 EURUSD at 1.13336 sl: 1.73336 tp: 0.00000 at price 0.00000
0 19:07:19.611 '1772219': order #300738526 sell 0.01 EURUSD at 1.13336 sl: 1.73336 tp: 0.00000 closed at price 1.13380
0 19:07:19.611 '1772219': remainder of order #300738526 was opened : #300740237 sell 0.22 EURUSD at 1.13336 sl: 1.73336 tp: 0.00000
0 19:07:19.707 '1772219': close order #300738527 sell 0.01 EURAUD at 1.56789 sl: 1.57389 tp: 0.00000 at price 0.00000
0 19:07:19.820 '1772219': order #300738527 sell 0.01 EURAUD at 1.56789 sl: 1.57389 tp: 0.00000 closed at price 1.56815
0 19:07:19.820 '1772219': remainder of order #300738527 was opened : #300740238 sell 0.30 EURAUD at 1.56789 sl: 1.57389 tp: 0.00000
0 19:07:19.896 '1772219': close order #300738528 sell 0.01 GBPUSD at 1.29769 sl: 1.30369 tp: 0.00000 at price 0.00000
0 19:07:20.061 '1772219': order #300738528 sell 0.01 GBPUSD at 1.29769 sl: 1.30369 tp: 0.00000 closed at price 1.29824
0 19:07:20.061 '1772219': remainder of order #300738528 was opened : #300740239 sell 0.22 GBPUSD at 1.29769 sl: 1.30369 tp: 0.00000
Posted By: tradingest

Re: Entry and Exit different LotAmount - 11/09/18 18:37

I noticed that within MT4 the opened size it's different respect the message shown in Zorro.
The link to see this difference.
Why?
Posted By: tradingest

Re: Entry and Exit different LotAmount - 11/10/18 00:56

with the same code with some broker MT4 close whole position with other no. Why?

thanks for the support
Posted By: jcl

Re: Entry and Exit different LotAmount - 11/10/18 08:01

That's the journal log. The MQ4 log is under MQL4/Logs. But anyway, can you contact Support? They'll request some files and will walk you through a specific test for finding the problem.
Posted By: tradingest

Re: Entry and Exit different LotAmount - 11/10/18 11:03

Hi jcl,

thanks for help me, for me is very important to understand this.
Below the log recover in the path MQL4/Logs like your indication

0 19:02:00.339 Zorro EURUSD,Daily: Open EURUSD 0.23@1.1334 stop 1.7334 slp 10 magic 42380 factor 10
2 19:02:00.443 Zorro EURUSD,Daily: open #300738526 sell 0.23 EURUSD at 1.13336 sl: 1.73336 ok
0 19:02:00.491 Zorro EURUSD,Daily: Open EURAUD 0.31@1.5679 stop 1.5739 slp 10 magic 42380 factor 10
2 19:02:00.593 Zorro EURUSD,Daily: open #300738527 sell 0.31 EURAUD at 1.56789 sl: 1.57389 ok
0 19:02:00.645 Zorro EURUSD,Daily: Open GBPUSD 0.23@1.2977 stop 1.3037 slp 10 magic 42380 factor 10
2 19:02:00.750 Zorro EURUSD,Daily: open #300738528 sell 0.23 GBPUSD at 1.29769 sl: 1.30369 ok
0 19:07:19.511 Zorro EURUSD,Daily: Close [EURUSD:S8526] 0.01@1.13380
2 19:07:19.611 Zorro EURUSD,Daily: close #300738526 sell 0.01 EURUSD at 1.13336 sl: 1.73336 at price 1.13380
0 19:07:19.611 Zorro EURUSD,Daily: Remaining [EURUSD:S237] 0.22@1.1338
0 19:07:19.707 Zorro EURUSD,Daily: Close [EURAUD:S8527] 0.01@1.56810
2 19:07:19.820 Zorro EURUSD,Daily: close #300738527 sell 0.01 EURAUD at 1.56789 sl: 1.57389 at price 1.56815
0 19:07:19.820 Zorro EURUSD,Daily: Remaining [EURAUD:S238] 0.3@1.5681
0 19:07:19.896 Zorro EURUSD,Daily: Close [GBPUSD:S8528] 0.01@1.29820
2 19:07:20.061 Zorro EURUSD,Daily: close #300738528 sell 0.01 GBPUSD at 1.29769 sl: 1.30369 at price 1.29824
0 19:07:20.061 Zorro EURUSD,Daily: Remaining [GBPUSD:S239] 0.22@1.2982

What does means uninit reason 9?

Thanks for the support. Without to close whole position I can't go live
Posted By: tradingest

Re: Entry and Exit different LotAmount - 11/10/18 11:04

if you need of other information ask me
© 2024 lite-C Forums