Gamestudio Links
Zorro Links
Newest Posts
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (firecrest, AndrewAMD), 387 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 4 1 2 3 4
Hedging issue? #459442
05/19/16 23:26
05/19/16 23:26
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi jcl. I believe I have found a Hedging/upgrade issue. If not, I would appreciate the explanation! laugh

When I upgraded to Z12 1.44 there were 1 VO virtual and 1 real XAU/USD Short trades open, both for 4 units, and both were resumed by 1.44.

The next day, the real trade was Closed - all 4 units. But there was no mention of the virtual trade. At the time I assumed this was a reporting oversight.

A few days later, VO again went virtual Short 4 units, and a real Short of 4 units was entered.

Later, A2 went virtual Long 3 units, and a real Short of 1 unit was entered. Why?!

It seemed as though the original virtual VO Short is still sitting there as something Zorro wants to do, so when the A2 virtual Long arrives, it nets to the 1 real Short. On this suspicion I checked the Z12.htm and in fact, yes, the original virtual trade has not been closed and is still there.

I've noticed in looking back at the logs that sometimes when a real is closed there can be a lag of up to 8 bars before the virtual is closed. Could the close of the original virtual have somehow gotten lost due to the upgrade?

Please let me know what I should do about both the virtual trade that didn't close as well as the extra real Shorts it caused that are now active.

Thanks.

Re: Hedging issue? [Re: DdlV] #459473
05/23/16 07:30
05/23/16 07:30
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
You must not manually close any virtual trade. Only your strategy is supposed to do that when a stop is triggered or a close condition is fulfilled. I can not see from your post if something is wrong with your trades, but if you think so, please post them here.

Re: Hedging issue? [Re: jcl] #459478
05/23/16 12:22
05/23/16 12:22
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
I don't know how to externally manually close a virtual trade, so haven't done that.

In any case, to me the problem seems to be the opposite: that Z12 closed a real trade but did nothing on the virtual side.

Will send log via PM.

Thanks.

Re: Hedging issue? [Re: DdlV] #459481
05/23/16 16:32
05/23/16 16:32
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
For comparing real and virtual trades, look into the list of trades and check if the positions match. If something's wrong, please post the trade list so that I can see what the problem is.

Real and virtual trades can be different when a real trade is manually closed. In that case the trade is not immediately reopened. Instead the difference will stay until the virtual position closes. This allows you to manually close trades in case of an emergency. It's a feature, not a bug laugh.

Re: Hedging issue? [Re: jcl] #459485
05/23/16 19:58
05/23/16 19:58
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Yes, the real & virtual trades should match. However, in this case I don't believe they do - see below. Also, I've noticed in checking other asset examples that a number of bars can go by after a real close before the virtual trades are closed so the trades return to sync/match. All of this is without any manual closing - Z12 is the only thing closing trades.

In this case:

1) Start of Z12 1.44: VO:s 4; NET:S 4 - match.
2) Next the NET:S 4 was closed; but the virtual was not: VO:s 4; NET:S 0 - NO MATCH.
3) Next VO:s for 4 and NET:S for 4: VO:s 8; NET:S 4 - NO MATCH.
4) Next A2:l for 3 and NET:S for 1: VO:s 8, A2:l 3; NET:S 5 - MATCH.

Log PM'd that shows this. At 1st glance you might say the feature is working fine, because match has been restored. However, that assumes that in step 2 the virtual was not supposed to be closed by Z12 when it closed the real. This is what I don't understand: Why didn't Z12 close the virtual in step 2 when it closed the real?

If the virtual had been closed in step 2, step 3 would change to MATCH with 4 & 4, and step 4 would still be in match but with 4 shorts - 3 longs = 1 short and on the real side 3 Shorts being covered leaving 1 Short.

The feature you're describing is to keep the real trades in sync with the net of the virtual trades, and that's great. But the question here isn't that - it's whether the virtual trades that the feature depends on are correct.

Thanks.

Re: Hedging issue? [Re: DdlV] #459499
05/24/16 11:32
05/24/16 11:32
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Again: Zorro will NOT close a virtual trade when a real trade is closed. It is up to the script, by a stop loss or other criteria, to determine when a trade must be closed. Closing a real trade should have no effect on the behavior of a strategy.

Any position difference by externally closing trades, such as that NET:S trade in your step 2), will stay until it is levelled by the strategy. This is perfectly normal behavior as described in the manual, and is no reason to worry.

Re: Hedging issue? [Re: jcl] #459501
05/24/16 12:12
05/24/16 12:12
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Again: I did NOT close that NET:S trade in step 2. Zorro closed it!!! You can see this in the log I PM'd.

I have NOT closed nor opened ANY of these trades. They are ALL opened and closed by Zorro Z12.

So, the question still remains: When ZORRO Z12 closed the NET:S trade in step 2, why didn't ZORRO Z12 close the corresponding virtual VO:s trade?

If this is perfectly normal behavior, please help me understand why Zorro and/or Z12, with NO manual interference from me at all, desynchronizes virtual and real so that the total net trades do not match.

Thanks.

Re: Hedging issue? [Re: DdlV] #459504
05/24/16 12:17
05/24/16 12:17
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
I don't want to argue who closed your trade, but it was most likely not Zorro, since a strategy can not directly close a NET trade. There is no mechanism for this. Strategies close only their own trades. NET trades are closed either by a change of virtual positions, or externally by the broker platform. You can see this in the log. "Close" means externally closed, "Sell" or "Cover" means by changing virtual long or short positions. If you did not do it, then maybe the broker did it for some reason - you should see this in the closed trade list of the TS.

Re: Hedging issue? [Re: jcl] #459513
05/24/16 14:34
05/24/16 14:34
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
I don't want to argue either! But I do want to get to the bottom of what happened so I understand. laugh For which it is important to know who & why closed the trade. If you (Zorro laugh ) didn't and I didn't, that leaves FXCM. TS is no help - it and the reports just say it was closed - not by who or why. I have therefore emailed FXCM and will let you know their response.

Apologies for misunderstanding the "Close" message - I do now see the manual says that means closed by the broker. Although I suppose this could be as a result of a Stop set/updated by Zorro...

Thanks.

Re: Hedging issue? [Re: DdlV] #459514
05/24/16 14:40
05/24/16 14:40
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
The trade messages are listed on the "Trading" page. A stop is less likely: NET trades have indeed stops, but they are very distant and only supposed to be triggered by large price moves.

Page 1 of 4 1 2 3 4

Moderated by  Petra 

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

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

Powered by UBB.threads™ PHP Forum Software 7.7.1