Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
6 registered members (EternallyCurious, AndrewAMD, ricky_k, 7th_zorro, 2 invisible), 478 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
StopFactor isn't working with GER30 on fxcm #444819
08/19/14 15:05
08/19/14 15:05
Joined: Apr 2014
Posts: 18
molloy Offline OP
Newbie
molloy  Offline OP
Newbie

Joined: Apr 2014
Posts: 18
Hi,

On friday, when the 'war broke out' and the dax went down more than 2% within minutes, my zorro instance was a little bit slow closing some of the trades. (it had to stop 6 trades at the same time so this is not a problem) The problem is that:

- StopFactor wasn't set, the default value is 1.5 according to the docs. Some of the trades were closed at -100PIP by zorro, although the stop of every trade was 22PIP. FXCM failed to stop any trade.

- I have set StopFactor to 1.0, stop is 22. I see trades on the fxcm app like this:

open: 9332 stop: 7465
open: 9335 stop: 7467
open: 9263 stop: 7408
open: 9246 stop: 7396

(Edit: These trades have trailing stops. But the first 2 aren't trailed. edit2: sorry this is not true, these trades have no trail stop)

Seems like an IQ test question: what is the rule? laugh

Thanks for helping in advance!

Last edited by molloy; 08/19/14 15:13.
Re: StopFactor isn't working with GER30 on fxcm [Re: molloy] #444873
08/20/14 13:41
08/20/14 13:41
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
When StopFactor is set to 1.0, Zorro normally won't stop a trade at all. It is stopped by the broker before, so the trade is already closed. For letting Zorro stop the trade, set StopFactor to 1.1 or so.

You can check in the FXCM TS if StopFactor works - with StopFactor = 1.0, the stop displayed in TS must be the same as the stop displayed by Zorro, except for a bid/ask difference.

Re: StopFactor isn't working with GER30 on fxcm [Re: jcl] #444895
08/21/14 08:25
08/21/14 08:25
Joined: Apr 2014
Posts: 18
molloy Offline OP
Newbie
molloy  Offline OP
Newbie

Joined: Apr 2014
Posts: 18
Hi jcl,

yes, this is what I expected, but this is not what happens. Zorro sets the stops way further at fxcm. The table in my first post was read from the fxcm mobile app. These stops were set by Zorro after Stop = 22, StopFactor = 1.0.

Because the fxcm stops are 90x further than needed, Zorro stops the trades, not fxcm.

Re: StopFactor isn't working with GER30 on fxcm [Re: molloy] #444925
08/22/14 07:01
08/22/14 07:01
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Can you do the following test: Use the TradeTest script at first with a defined Stop, but no StopFactor. Run it on your demo account and verify if the stop is by factor 1.5 more distant in the TS than in Zorro.

Now set StopFactor = 1.0 and check the stop distance in the TS. Please do this with several instruments and let me know the results.

Re: StopFactor isn't working with GER30 on fxcm [Re: jcl] #444931
08/22/14 11:56
08/22/14 11:56
Joined: Apr 2014
Posts: 18
molloy Offline OP
Newbie
molloy  Offline OP
Newbie

Joined: Apr 2014
Posts: 18
Hi jcl,

I have found that the problem is related to virtual hedging, I use Hedge=5 in my script.

If Hedging is not set then the stops are set close to what I expect, although if I leave it default or set it to 1.0, it works like with 2.0. If I set it to 3.0 then it works correctly.

CFD prices are not available on demo accounts at fxcm so I did my testing on a real account - thats why I have not very much test cases:

Hedging not set, StopFactor not set, Stop = 10:
9344/9365 (open/stop at fxcm)
9345/9366

StopFactor=3 Stop=10
9348/9379

StopFactor=1 Stop = 15
9349/9370

--
When Hedging=5 and StopFactor not set then the fxcm stops are way further like in my first post.

It is not clear to me what is the best method to handle the broker stops in virtual hedging. For me setting the broker stops of pool trades to the furthest of the stops (corrected with StopFactor) would be enough.

Re: StopFactor isn't working with GER30 on fxcm [Re: molloy] #445075
08/27/14 13:24
08/27/14 13:24
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Virtual hedging means that trades are not sent to the broker. The broker only gets the difference of long and short positions. A difference is just a lot amount and has no "stop".

http://manual.zorro-trader.com/hedge.htm

StopFactor only affects broker trades of which you've set a stop loss.

Re: StopFactor isn't working with GER30 on fxcm [Re: jcl] #445308
09/03/14 06:53
09/03/14 06:53
Joined: Apr 2014
Posts: 18
molloy Offline OP
Newbie
molloy  Offline OP
Newbie

Joined: Apr 2014
Posts: 18
Hi jcl,

thanks for the answer!

Setting the stop at the broker is a security measure for the case of software/hardware error and I think that the same measure can be used together with virtual hedging.

A very basic version of this is already implemented in Zorro: broker stops are set to every net position but way too far from the opening price.

So this turns to be a feature request, I would like to see the stops of net trades to be in relation with the stops of original trades!

It is clear that the net trades are not in one-to-one relation to the trades opened by the algo. If every algo trade is opened to the same direction then the net stop can be the lowest/highest of them. If algo trades to both directions are opened and mixed to a net trade then it is not trivial what to do - maybe a new setting is needed.

Re: StopFactor isn't working with GER30 on fxcm [Re: molloy] #445312
09/03/14 11:48
09/03/14 11:48
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
It is normally _not_ recommended to place a stop loss for a pool trade. Otherwise the trade can suddenly close and spoil the strategy.

But if you want to do it nevertheless, just set the stop manually. An automatic setting would not work well here, at least not for our systems.

I've put your suggestion of a special stop for pool trades on my list.


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