Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Quad), 454 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
TMF return value 4+16 - Pending trade never Enters #440143
04/18/14 23:20
04/18/14 23:20
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 did enterLong(tmf) to create a Pending trade, and exited the tmf with return 20 to not call it again until the Entry condition was met, and to not enter automatically figuring this would allow the tmf to do any last-minute checks before entering. However, the tmf was never called again. The 4 appears to have prevented the call of the tmf when the Entry condition was met. I changed the tmf to return 16 and it was then called when the Entry condition was met. Are 4 & 16 incompatible for Pending trades? Or is there some other way the Entry should have been accomplished?

Thanks.

Re: TMF return value 4+16 - Pending trade never Enters [Re: DdlV] #440200
04/20/14 08:59
04/20/14 08:59
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
Hmmm 4 means "do not enter" and 16 means "only call TMF when entering", so 4+16 probably means "only call TMF when hell freezes over"?

Re: TMF return value 4+16 - Pending trade never Enters [Re: Spirit] #440215
04/20/14 13:12
04/20/14 13: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
Spirit, thanks for the quick response on Easter Sunday. Although when you have the time I'd appreciate something a bit more accurate, detailed, and useful in addressing the question.

Thanks.

Re: TMF return value 4+16 - Pending trade never Enters [Re: DdlV] #440239
04/21/14 07:51
04/21/14 07:51
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
I'm not sure what you want to achieve, but for calling a TMF when the entry condition is met, the right return value is 16, not 20. You can then decide in the TMF if you really want to enter or not.

Re: TMF return value 4+16 - Pending trade never Enters [Re: jcl] #440245
04/21/14 12:24
04/21/14 12: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. But this leaves me a bit confused as to the purpose of return value 4 - is it essentially to turn the TMF off? This seems inconsistent with the statement about return values 1 and 2 - how can they be set if the TMF is never called again?

And if 4 turns the TMF off, then how is the trade to ever be entered or exited?

The manual's 28 example is similar to what I tried (without the 8 to restrict to calling only per Bar), and seems to imply that 4 does not prevent calls as I experienced...

Perhaps an example showing the use of 4 would be useful...

Thanks.

Re: TMF return value 4+16 - Pending trade never Enters [Re: DdlV] #440249
04/21/14 12:49
04/21/14 12:49
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
You can find the description of all return values in the manual.

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

4 is for complex entry or exit conditions that are calculated in the TMF.

Re: TMF return value 4+16 - Pending trade never Enters [Re: jcl] #440251
04/21/14 12:52
04/21/14 12:52
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've lost count of how many times I've read this part of the manual. Could you provide a simple script showing the use of 4?

Thanks.

Re: TMF return value 4+16 - Pending trade never Enters [Re: DdlV] #440253
04/21/14 12:57
04/21/14 12:57
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
An example where you return 4 would be a complex exit, such as a chandelier exit. But I have no script example for this - we have not used this yet in our systems. Maybe a user can give you an example?

Re: TMF return value 4+16 - Pending trade never Enters [Re: jcl] #440257
04/21/14 13:22
04/21/14 13: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
Thanks jcl.


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