Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Broker Unconfirmed warning #431533
10/17/13 23:33
10/17/13 23:33
Joined: Jul 2013
Posts: 522
D
dusktrader Offline OP
User
dusktrader  Offline OP
User
D

Joined: Jul 2013
Posts: 522
Why did I get this warning? The trade was placed. Does this mean FXCM did not confirm it?

PS: this makes 3 positions currently on... so the display should read !\/ I think (is it tracking NZDUSD??)

PPS: I stopped and restarted the strategy and Zorro only continued the other 2 existing trades. So this trade was orphaned it seems.

Attached Files zorro-unconfirmed.png
Last edited by dusktrader; 10/18/13 01:55.
Re: Broker Unconfirmed warning [Re: dusktrader] #431537
10/18/13 07:05
10/18/13 07:05
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
Yes, correctly, it was not confirmed. You must manually check in the broker platform if the trade was opened or not. If it was, you must handle it manually or close it. Zorro can not handle that trade because the broker API did not send a trade ID.

Do not stop and restart the strategy. This is not only unnecessary, it can even reduce the performance in some cases.

Re: Broker Unconfirmed warning [Re: jcl] #431539
10/18/13 08:56
10/18/13 08:56
Joined: Aug 2013
Posts: 124
D
DMB Offline
Member
DMB  Offline
Member
D

Joined: Aug 2013
Posts: 124
JCL - It might be useful to have an email alert of this specific situation in a future release of Zorro.

Re: Broker Unconfirmed warning [Re: DMB] #431540
10/18/13 09:06
10/18/13 09:06
Joined: May 2013
Posts: 627
Bonn
Sundance Offline
User
Sundance  Offline
User

Joined: May 2013
Posts: 627
Bonn
+1.
Email notification is a big point. But I think we already have spoken about this option and it is on already on your list!?

Re: Broker Unconfirmed warning [Re: Sundance] #431542
10/18/13 09:44
10/18/13 09:44
Joined: Jul 2013
Posts: 522
D
dusktrader Offline OP
User
dusktrader  Offline OP
User
D

Joined: Jul 2013
Posts: 522
This is a strategy that I wrote, so do I have a capability to detect this situation from within my script? If so I could just add the email notify.

Can you make a way for the trade to be re-integrated into Zorro? For example, in your popup dialog, can it say something like:
"NZD/USD unconfirmed: enter trade ID, or press Cancel to manage manually"

I understand sometimes the broker doesn't respond in a timely fashion (hopefully not often!) but I hate to discard trades that Zorro thought were useful.

Re: Broker Unconfirmed warning [Re: dusktrader] #431544
10/18/13 10:22
10/18/13 10:22
Joined: Jul 2013
Posts: 522
D
dusktrader Offline OP
User
dusktrader  Offline OP
User
D

Joined: Jul 2013
Posts: 522
I just had this happen again on a different trade. Here is the trade log. I noticed (I think in both cases) that even though Zorro complained with the error dialog, it still did complete the action itself. Maybe the API is responding too slowly and Zorro is timing out waiting for the confirmation?
Quote:
[Fri 18.10. 02:00] 50009 +0 +10 !\
[Fri 18.10. 03:00] 50009 +0 +10 !\
[AUD/USD:CNTR:S4579] Short 1@0.9623 Risk 5 at 03:00

[Fri 18.10. 04:00] 50009 +0 +9 !\\
[Fri 18.10. 05:00] 50009 +0 +9 !/\
[Fri 18.10. 06:00] 50009 +0 +9 !\\
[EUR/USD:CNTR:L5802] Trail 1@1.3515 Stop 1.3533 at 06:35

[Fri 18.10. 07:00] 50009 +0 +9 !\\
[Fri 18.10. 08:00] 50009 +0 +8 !\\
[EUR/USD:CNTR:L5802] Trail 1@1.3515 Stop 1.3543 at 08:55

[Fri 18.10. 09:00] 50009 +0 +8 !\\
[EUR/USD:CNTR:L5802] Trail 1@1.3515 Stop 1.3546 at 09:58

[Fri 18.10. 10:00] 50009 +0 +4 !\\
[EUR/USD:CNTR:L5802] Trail 1@1.3515 Stop 1.3546 at 10:12
Broker: !Unconfirmed - check trade with AUD/USD
[AUD/USD:CNTR:S4579] Can't close 1@0.9671 at 10:17
[AUD/USD:CNTR:S4579] Closed 1@0.9673: -5.09 at 10:17[

Re: Broker Unconfirmed warning [Re: dusktrader] #431547
10/18/13 10:53
10/18/13 10:53
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
Zorro waits about 30 seconds for a response. If the API does not respond in 30 seconds, it is unlikely that it will ever respond. The normal response time is in the milliseconds range.

You can indeed send an email in that case. If you have a home page, you can use its server for that. Check the return value of the enter function - if it returns 0, the trade could not be opened and you can send an email as described under "HTTP functions".

From our experience, orphaned trades happen with FXCM with about one of 2000..4000 trades. That also depends on the Internet connection quality. It never happened so far with any MT4 broker, as MT4 uses a reliable confirmation protocol.

Re: Broker Unconfirmed warning [Re: jcl] #431549
10/18/13 11:00
10/18/13 11:00
Joined: Jul 2013
Posts: 522
D
dusktrader Offline OP
User
dusktrader  Offline OP
User
D

Joined: Jul 2013
Posts: 522
Do you have any explanation for why Zorro both complains of orphaned trade but also shows it as executing? I believe this happened in both cases so far and I will double-check on this if/when it happens again.

What I mean is... first the log says:
Broker: !Unconfirmed - check trade with AUD/USD
[AUD/USD:CNTR:S4579] Can't close 1@0.9671 at 10:17

but then it says:
[AUD/USD:CNTR:S4579] Closed 1@0.9673: -5.09 at 10:17[

so that seems to indicate that it did receive the confirmation

Re: Broker Unconfirmed warning [Re: dusktrader] #431551
10/18/13 11:05
10/18/13 11:05
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
No, that are two different trades.

Closing a trade is no problem for Zorro even if the broker server gives no confirmation. Zorro knows the trade ID and thus can find out if the trade is still open or not.

Re: Broker Unconfirmed warning [Re: jcl] #431556
10/18/13 12:40
10/18/13 12:40
Joined: Jul 2013
Posts: 522
D
dusktrader Offline OP
User
dusktrader  Offline OP
User
D

Joined: Jul 2013
Posts: 522
FYI on this strategy I currently have the NFA flag set. I'm still not 100% sure if that flag should be necessary on FXCM API account, but I think it is.

Page 1 of 2 1 2

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1