How to set TP and SL via parameters in Automated Strategy?
Forums › ProRealTime English forum › ProOrder support › How to set TP and SL via parameters in Automated Strategy?
- This topic has 9 replies, 5 voices, and was last updated 6 years ago by
GraHal.
-
-
04/03/2019 at 10:53 AM #95386
I am coding an automated strategy for a client. In indicators, one can define custom parameters – for e.g.
a=ExponentialAverage[x](close) rather than a=ExponentialAverage[20](close) and then we can define the user friendly variable name for x
However, when coding an Automated Trading Strategy, there is no Variables window on the right-hand side of the programming window. I would like variable for TP, SL, etc so that my client does not have to edit the code.
Any advice would be appreciated.
Many thanks
Ric
04/04/2019 at 7:56 AM #95450There are no external variables window without editing the code such as the one for indicators for example.
However, you can add fixed values for optimized variables in the optimisation window.
1 user thanked author for this post.
04/04/2019 at 8:46 AM #95460Many thanks Nicolas. That’s a bit shocking. On all other platforms – MT4, NinjaTrader, eSignal, cTrader, etc – one can define custom variables/parameters to allow a user to enter TP/SL values.
For example, if my client wants to put the strategy on NASDAQ with 10 point SL and 20 point TP and then on DAX with 20 point SL and 30 point TP and then on FTSE with 7 point SL and 10 point TP, etc, surely I can’t expect him to edit code each time?
Most of my clients are traders and not technical coding experts like me! Can you please advise on a workaround?
Many thanks
Ric
04/04/2019 at 9:22 AM #95462There is no workaround, I’m used to add the variables at the top of the code and clearly identified, so what the clients can change them easily. Never had any problem with that since years of coding for PRT. But I agree with you on the fact that it could be a great improvement to define external parameters without entering in the code, for automated strategies and for screeners too!
1 user thanked author for this post.
04/04/2019 at 9:59 AM #95466Just provide them with a separate strategy code for each market that they are interested in trading with the desired variables hard coded into the strategy. Put the name of the market in the strategy title. Your customer might even feel they are getting more for their money if you you give them five strategies for the price of one!
1 user thanked author for this post.
04/04/2019 at 1:08 PM #95472Ok thank you very much guys.
04/04/2019 at 1:17 PM #9547304/04/2019 at 1:25 PM #95474Thanks for the idea @pableitor, but it doesn’t work that way. Once the code is launched in ProOrder, the program is compiled and cannot be modified afterward.
For indicator, the external variables set by a user will be only the one used on the current chart and don’t impact at all the code itself.
04/04/2019 at 2:02 PM #95478Thanks guys.
It is a shame and a major flaw in an otherwise excellent platform (PRT) that external variables cannot be defined within an Automated Strategy. I have never seen this before in 20 years’ of coding on other platforms! 🙂
It is hard to understand why this functionality exists with Indicators but not with Automated Strategies. Are there any future plans to introduce custom external variables/parameters with Automated Strategies ? Alternatively, would it be possible to raise a product enhancement request?
Thanks again.
Ric
04/04/2019 at 2:29 PM #95480Alternatively, would it be possible to raise a product enhancement request?
Yes, below is a link which goes direct to PRT.
Make sure you sent it from your PRT Platform registered email address … which can be either Platform direct with PRT or Platform via IG.
https://www.prorealtime.com/en/contact
EDIT / PS
Click the Suggestion Box in left margin under the lady pic! 🙂
-
AuthorPosts
Find exclusive trading pro-tools on