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
4 registered members (7th_zorro, Quad, VoroneTZ, 1 invisible), 623 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Trade Entry Parameters #477956
08/19/19 12:53
08/19/19 12:53
Joined: Aug 2018
Posts: 98
O
OptimusPrime Offline OP
Junior Member
OptimusPrime  Offline OP
Junior Member
O

Joined: Aug 2018
Posts: 98
Good Morning Kind Sirs:

Am I correct that this line here is calling the TMF but also opening a trade at the default lots and specified limit price?

enterShort (MyTMF, 0, -5*PIP);

Sorry if it seems basic but I need the sanity check.

Thank you


Thanks so much,

OptimusPrime

Re: Trade Entry Parameters [Re: OptimusPrime] #477959
08/19/19 13:13
08/19/19 13:13
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Not correct. Look at the definitions of the functions:
https://zorro-project.com/manual/en/buylong.htm

You just required that your TMF have two arguments. It must be:

function MyTMF(var v0, var v1){ /* ... */ }

In your case, v0 will be 0, and v1 will be -5*PIP for that particular trade. I do not think that this is what you wanted.

You can still set parameters such as Lots and Stop prior to placing the trade, but not as function inputs.

Re: Trade Entry Parameters [Re: OptimusPrime] #477960
08/19/19 14:51
08/19/19 14:51
Joined: Aug 2018
Posts: 98
O
OptimusPrime Offline OP
Junior Member
OptimusPrime  Offline OP
Junior Member
O

Joined: Aug 2018
Posts: 98
Thanks Andrew. You are right, I was not intending to pass any argument to the TMF. Yes, I was wondering if I could specify trade entry parameters as well as make a call to my MyTMF in one single command.

Thanks, I will continue to set them separately.


Thanks so much,

OptimusPrime


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