2 registered members (AndrewAMD, juanex),
1,247
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Hedge
[Re: MatPed]
#466880
07/05/17 17:14
07/05/17 17:14
|
Joined: Jun 2013
Posts: 1,609
DdlV
Serious User
|
Serious User
Joined: Jun 2013
Posts: 1,609
|
Hi MatPed, My 2 cents/pesos/shillings/lire/whatever : When using Virtual Hedging it's the "Boss". The virtual trade will always be opened. That's how Virtual Hedging works. A real trade isn't attempted unless Virtual Hedging decides it's needed. If you're talking the Z systems, I started a similar thread re. Hedge=5 and Margin=0. The result there was that Virtual Hedging takes precedence and real positions will be adjusted to match as time goes by, even if it means opening a new real trade even though Margin=0. So, if a real trade can't be entered, Virtual Hedging will still know that it's needed and attempt to fix it (on the real side) at a future bar. If you're talking your own strategy, presumably via receiving the error message from the real side, or by a for(open_trades) loop, you can determine if virtual & real are out of sync, and then decide what to do. One of the choices would be to manually close virtual trade(s) as needed. But jcl will have to comment if there are any gotchas in manually closing virtual trades outside of Virtual Hedging's processes... Regards.
|
|
|
Re: Hedge
[Re: jcl]
#466903
07/06/17 19:42
07/06/17 19:42
|
Joined: Feb 2015
Posts: 652 Milano, Italy
MatPed
OP
User
|
OP
User
Joined: Feb 2015
Posts: 652
Milano, Italy
|
If a real trade was rejected or was externally closed, Zorro will attempt to open it again at the next trade with that asset.
I guess you mean ...at the next bar... yes, and this is great If you want to close the virtual trade instead, let your script compare LotsPool and LotsPhantom, and cancel the virtual trade accordingly. I do not think that this has an effect on the accuracy of the equity. yes it will affect the equity: you will have a +1 number of trades with a small loss or profit. The virtual trade will be always open regardless the real asset availability. This is why a was asking a previous check. If you have any hint on this it will be great. just immagine a psudo-code like: tradeIsGood = enterLong(); If (tradeIsGood ) enterVirtual(tradeIsGood); In this case any wrong virtual opening will be avoided. I understand this will limit the Hedge = 5 setting. This is the reason because I was asking for something that will simplify "is the asset available" topic. Thank you in advance
|
|
|
Re: Hedge
[Re: jcl]
#466909
07/07/17 09:06
07/07/17 09:06
|
Joined: Feb 2015
Posts: 652 Milano, Italy
MatPed
OP
User
|
OP
User
Joined: Feb 2015
Posts: 652
Milano, Italy
|
I did not get it. If I exit an open trade (exitLong) right after having opened it a loss is generated anyway: the spread.
Am I wrong?
Last edited by MatPed; 07/07/17 21:28.
|
|
|
|