Gamestudio Links
Zorro Links
Newest Posts
Using ":L" & ":S" causes 2 possible bug(s) or is it bad coding?
by AndrewAMD
01/23/19 22:01
Help with Data import to T1
by OptimusPrime
01/23/19 19:44
How to ensamble multiple algos with advise calls?
by laz
01/23/19 18:53
Correlation -1.#IND00
by AndrewAMD
01/21/19 17:37
Basic thread safety question
by Superku
01/20/19 18:15
Blog Post: Get Historical Data from Darwinex REST API w/ Zorro
by AndrewAMD
01/19/19 22:19
Reseting a static variable - the next day
by OptimusPrime
01/19/19 19:48
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
12 registered (OptimusPrime, AndrewAMD, jacek, Dalla, kvm, Quad, Iglarion, ibne, misiek, 3 invisible), 491 Guests and 7 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
jthbln, laz, ramonne, SibJac, Evael
18157 Registered Users
Topic Options
Rate This Topic
#474834 - 11/08/18 17:53 Entry and Exit different LotAmount
tradingest Offline
Member

Registered: 02/27/18
Posts: 224
Loc: Italy
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

Top
#474846 - 11/09/18 10:17 Re: Entry and Exit different LotAmount [Re: tradingest]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26694
Loc: Frankfurt
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.

Top
#474860 - 11/09/18 19:23 Re: Entry and Exit different LotAmount [Re: jcl]
tradingest Offline
Member

Registered: 02/27/18
Posts: 224
Loc: Italy
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

Top
#474861 - 11/09/18 19:37 Re: Entry and Exit different LotAmount [Re: tradingest]
tradingest Offline
Member

Registered: 02/27/18
Posts: 224
Loc: Italy
I noticed that within MT4 the opened size it's different respect the message shown in Zorro.
The link to see this difference.
Why?

Top
#474865 - 11/10/18 01:56 Re: Entry and Exit different LotAmount [Re: tradingest]
tradingest Offline
Member

Registered: 02/27/18
Posts: 224
Loc: Italy
with the same code with some broker MT4 close whole position with other no. Why?

thanks for the support

Top
#474870 - 11/10/18 09:01 Re: Entry and Exit different LotAmount [Re: tradingest]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26694
Loc: Frankfurt
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.

Top
#474875 - 11/10/18 12:03 Re: Entry and Exit different LotAmount [Re: jcl]
tradingest Offline
Member

Registered: 02/27/18
Posts: 224
Loc: Italy
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

Top
#474876 - 11/10/18 12:04 Re: Entry and Exit different LotAmount [Re: tradingest]
tradingest Offline
Member

Registered: 02/27/18
Posts: 224
Loc: Italy
if you need of other information ask me

Top



Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de