Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 13:53
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Quad), 6,361 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
TradeStopLimit - Trades are closed after next bar #463095
11/15/16 00:14
11/15/16 00:14
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Quote:
If the value is less than half the asset price, Zorro assumes that it's a distance, otherwise it's a price.

Is this also valid for TradeStopLimit? If I extend Workshop 4_1.c with a simple TMF

Code:
int ModiStop() {
	
	TradeStopLimit = 150*PIP;
	return 0;
}



short trades are closed the next bar by stop while the stop is not hit or the trade is even in proift:

Code:
[EUR/GBP::S7301] Short 1@0.89352 Risk 8$  at 08:00:00
[174: Wed 13.01.10 09:00] +0 +0 1/0  (0.89346)
[EUR/GBP::S7301] Stop 1@0.89358: -0.10 at 09:00:00
...

[EUR/GBP::S8103] Short 1@0.89203 Risk 9$  at 16:00:00
[182: Wed 13.01.10 17:00] -4 +3 1/2  (0.89214)
[EUR/GBP::S8103] Stop 1@0.88980: +3.02 at 17:00:00
...

[EUR/GBP::S5315] Short 1@0.87310 Risk 8$  at 13:00:00
[554: Thu 04.02.10 14:00] -15 +1 2/13  (0.87304)
[EUR/GBP::S5315] Stop 1@0.87261: +0.66 at 14:00:00



Long trades last longer and seem to behave normal. What have I done wrong? Has the direction to be considered using TradeStopLimit? Thanks, Sphin

Re: TradeStopLimit - Trades are closed after next bar [Re: Sphin] #463098
11/15/16 01:34
11/15/16 01:34
Joined: Feb 2014
Posts: 73
Montreal, Qc Canada
F
Finstratech Offline
Junior Member
Finstratech  Offline
Junior Member
F

Joined: Feb 2014
Posts: 73
Montreal, Qc Canada
Try using TICKS and EXTRADATA flags, see if it makes any difference.

Re: TradeStopLimit - Trades are closed after next bar [Re: Finstratech] #463108
11/15/16 18:08
11/15/16 18:08
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
I faced the problem originally on another script where these flags were already set. If I set EXTRADATA+TICKS on Workshop_4_1.c with my TMF the stops of short trades are executed next minute because of TICK's resolution.

Code:
173: Wed 13.01.10 08:00] (0.89446)
[EUR/GBP::S7301] Short 1@0.89345 Risk 8$  at 08:00:00
[EUR/GBP::S7301] Stop 1@0.89323: -0.04 at 08:01:00
...

[EUR/GBP::S8103] Short 1@0.89190 Risk 8$  at 16:00:00
[EUR/GBP::S8103] Stop 1@0.89207: -0.43 at 16:01:00
...

[EUR/GBP::S5315] Short 1@0.87310 Risk 8$  at 13:00:00
[EUR/GBP::S5315] Stop 1@0.87325: -0.10 at 13:01:00



Maybe I mix up something? Isn't TradeStopLimit equivalent to Stop? Is it better to modify Stop within the TMF?

Re: TradeStopLimit - Trades are closed after next bar [Re: Sphin] #463111
11/15/16 20:22
11/15/16 20:22
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi Sphin,

TradeStopLimit is in price units, not distance. I.e., priceClose()+/-150*PIP...

HTH.

Re: TradeStopLimit - Trades are closed after next bar [Re: DdlV] #463112
11/15/16 22:23
11/15/16 22:23
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Thanks a lot for clarify, DdlV!


Moderated by  Petra 

Gamestudio download | 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