Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Edgar_Herrera, VoroneTZ, Akow), 973 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Margin=0 vs. Virtual Hedging Bug? #465572
05/04/17 01:53
05/04/17 01:53
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 updated to 1.54 over this past weekend. The manual said trades could not be resumed, so per the manual I have 1.50 still running Z12 with Margin=0 to close out the old trades.

Per the VPS vendor, I also updated Windows which required stopping 1.50 for the reboot.

1.50 had 2 virtual long, 1 virtual short, and 2 real long USD/JPY trades that were resumed when I restarted it.

One of the virtual longs was stopped, causing both the real longs to be closed. This left 1 virtual long and 1 virtual short of exactly the same size, netting to no real trade.

Now the virtual short has been stopped, leaving the virtual long. In response, Zorro has entered a real long, despite Margin=0!

Shouldn't the logic be to see that Margin=0 and instead close the virtual long?

Thanks.

Re: Margin=0 vs. Virtual Hedging Bug? [Re: DdlV] #465599
05/05/17 13:46
05/05/17 13:46
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
No, since you have still open a long trade, and the real trades must always reflect the virtual trades. Wait until the last trade terminates.

Re: Margin=0 vs. Virtual Hedging Bug? [Re: jcl] #465600
05/05/17 14:31
05/05/17 14:31
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Well...

Synchronizing real and virtual can happen either way.

What you're describing presupposes the choice of giving priority to Virtual Hedging over Margin=0.

I'm suggesting the priority should be the reverse. If I set Margin=0, I don't want any new margin (virtual or real) used, period. Which is easily accomplished by simply closing the virtual.

Thanks.

Re: Margin=0 vs. Virtual Hedging Bug? [Re: DdlV] #465602
05/05/17 16:34
05/05/17 16:34
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
http://manual.zorro-project.com/lots.htm

There is no "priority". Margin = 0 just means that no new trades are opened. Already open trades stay open and and real and virtual trades stay in sync, which means real trades can still be opened when virtual trades are closed.

If you want to really close trades, you use the Panic slider, not the Margin slider. But you must be aware that this would reduce the profit.

Re: Margin=0 vs. Virtual Hedging Bug? [Re: jcl] #465648
05/08/17 01:43
05/08/17 01:43
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Well... Let's look at this from different way(s) then...

"Margin = 0 just means that no new trades are opened" is not a correct statement - I had Margin=0 and a new trade was opened.

In the manual link above it is stated "For investing a certain amount of your account balance, use Margin". This explicitly says that Margin is relative to the account balance - i.e., Real $$$ => Real trades. It also states the same as you said: "If Margin is 0 or negative, no trades are opened". Together with the above statement that Margin is relative to account balance, Margin=0 means no (new) Real trades are entered.

Re. the last paragraph, I don't want to close trades via Panic - I simply want to do what the manual says to do for an upgrade when trades can't be resumed - set Margin=0 and let the existing trades be played out by the old version without entering new trades and without using additional margin in the account. Any new trades and new margin should come solely from the new version.

Is that clearer?

Thanks.

Re: Margin=0 vs. Virtual Hedging Bug? [Re: DdlV] #465674
05/09/17 11:12
05/09/17 11:12
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Not really - you seem not to understand that Margin only sets the trade volume, but does not interfere with virtual hedging. But I think we can leave it at that. Just be assured that all is fine, or at least it behaves as it should, and you can wait for the last remaining trade to close. This will then also close the last pool trade.

Re: Margin=0 vs. Virtual Hedging Bug? [Re: jcl] #465692
05/09/17 21:04
05/09/17 21:04
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 agree it's time to move on since we seem to be talking past each other. laugh

To wrap up:

I agree that Virtual Hedging seems to be correctly keeping Real Trades in sync with Virtual trades.

I also agree that Margin is not interfering with Virtual Hedging. (To me, this is the same as my earlier statement that VH has priority over Margin.)

I understand that Margin sets the trade volume.

The question is: Which trade volume? Real or Virtual? Per the above presidence, Virtual only. Which allows VH to open new Real trades as needed, even when Margin=0.

My suggestion is that it should be different. Margin should be respected at the Real level as well as Virtual. If Margin=0, the user doesn't want new trades opened, period.

Thanks.

Re: Margin=0 vs. Virtual Hedging Bug? [Re: DdlV] #465705
05/10/17 09:53
05/10/17 09:53
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
We can not use Margin for pool trades. The net position must be used for pool trades, otherwise virtual hedging would not work. When you want no more pool trades, just close the virtual trades with the panic slider when the net sum is zero. This is then at the cost of giving up potential profit.

Re: Margin=0 vs. Virtual Hedging Bug? [Re: jcl] #465711
05/10/17 12:12
05/10/17 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
Thanks jcl.

A few other wrap-up thoughts:

I haven't thought it completely through yet, but conceptually there's no reason why Margin couldn't be applied and Virtual trades (possibly partially) closed rather than opening new Real trades.

In the limit case of Margin=0, this is certainly possible - closing the Virtual rather than opening a new Real.

The Panic slider won't work as it would close other trades as well, not just the one in question.

"giving up potential profit" - for the record, the Real trade that was opened in this situation has closed for a (small) loss...

Thanks.

Re: Margin=0 vs. Virtual Hedging Bug? [Re: DdlV] #465713
05/10/17 13:36
05/10/17 13:36
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Ok, my last attempt to explain the matter:

When you let a system terminate, you set Margin to 0, but continue already open trades. The purpose of continuing them is not giving up potential profit that would otherwise be made by the system. This means of course that pool trades still can open and close all the time, in order to match the virtual positions. If you just look into your log and compare the virtual and real positions, you'll probably see that exactly that happens.

If you do not want this, you must close the virtual trades. It is as simple as that. Preventing the opening of pool trades, but keeping virtual trades open, makes no sense.

Re: Margin=0 vs. Virtual Hedging Bug? [Re: jcl] #465762
05/11/17 11:24
05/11/17 11:24
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks jcl. I believe I understand all. I also believe the crux of our misunderstanding is your last sentence: "Preventing the opening of pool trades, but keeping virtual trades open ...". This is NOT what I suggested. I suggested rather than open new Real trades to instead close Virtual trades. This would also keep everything in sync.

If Virtual Hedging is not being used, then at the time one wishes to let a system terminate all (Real) trades are in place and all margin has already been committed at the broker. Margin=0 prevents any new (Real) trades and margin commitment.

My suggestion is it should be the same at the Real level even when using Virtual Hedging.

Might closing the Virtual trades rather than opening new Real ones give up some potential profit? Possibly. But perhaps not if the system has been running a while and might be at or near to expiring. It might actually prevent potential losses. Plus, this potential profit would need to be balanced against the additional margin used by new Real trades, the effect of that on the new version's execution against the same account, the (old) version continuing to run longer than it otherwise would have, & whatever else.

Please note also that closing the virtual trades is not really an option since the only way to do that is nuclear - Panic and close them all. There is no granular way to close only the ones that might have this problem.

The choice is of course yours. If you choose to leave the system as is, please at least add to the documentation something about this interaction to the effect that when Virtual Hedging is being used new Real trades can still be opened even when Margin=0.

Thanks.

Re: Margin=0 vs. Virtual Hedging Bug? [Re: DdlV] #465768
05/11/17 16:12
05/11/17 16:12
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
No, it would not keep it in sync, as you can see with your own trades. Imagine that real trade you're complaining about had not opened. Then you had a difference of virtual and real positions with all its evil consequences.

Re: Margin=0 vs. Virtual Hedging Bug? [Re: jcl] #465790
05/12/17 12:57
05/12/17 12:57
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Please don't forget part 2 of the suggestion!

Part 1 is, as you noted above, to not open the Real trade.

Part 2 is to instead respect Margin=0 and close the Virtual trade!

There is thereby no Virtual/Real difference, and therefore none of those evil consequences.

Thanks. Have a great weekend!

Re: Margin=0 vs. Virtual Hedging Bug? [Re: DdlV] #465939
05/18/17 08:51
05/18/17 08:51
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Closing not all, but only some virtual trades would work for matching the positions. But I am not really convinced of that solution.

Re: Margin=0 vs. Virtual Hedging Bug? [Re: jcl] #466072
05/24/17 03:10
05/24/17 03:10
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Well, the solution should follow the intent...

If the intent is Margin=0 takes a back seat to Virtual Hedging and VH can open Real trades and use Real margin even when Margin=0, then the solution would seem to be to update the Manual to include that intent and possible result.

If the intent is Margin=0 means no new Real trades, period, then the Manual seems OK as it is and the solution would be to change how Zorro works.

Thanks.

Page 1 of 2 1 2

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