Trade Entry Parameters

Posted By: OptimusPrime

Trade Entry Parameters - 08/19/19 12:53

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
Posted By: AndrewAMD

Re: Trade Entry Parameters - 08/19/19 13:13

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.
Posted By: OptimusPrime

Re: Trade Entry Parameters - 08/19/19 14:51

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.
© 2024 lite-C Forums