How to optimise a custom indicator?
Forums › ProRealTime English forum › ProOrder support › How to optimise a custom indicator?
- This topic has 7 replies, 5 voices, and was last updated 6 years ago by
robertogozzi.
-
-
07/17/2019 at 12:43 PM #102726
Hello everyone,
I’m trying to optimise a custom indicator (with lost of input parameters) and have watched the optimisation video tutorials on how one might add in the optimisation variables for an MA crossover system. This is a crossover system too but is based on TSI.
Ive defined the two variables I want to optimise and the step intervals etc…
I have the below in the code:
123// Conditions to enter long positionsindicator2, indicator1, ignored, ignored, ignored = CALL "TSI-on-TSI"[1, 0, 2, 10, 20, 100, 0.85, 1, 0.35, 0.002, 10, 50, 2, 13, 0, 14, 15, 10, 100, 4, 0, 14]c1 = (indicator1 > indicator2)So I change the specific numerical values of the inputs I want to optimise to the label I have defined like is shown in the tutorial. I end up with this:
123// Conditions to enter long positionsindicator2, indicator1, ignored, ignored, ignored = CALL "TSI-on-TSI"[1, 0, 2, 10, 20, 100, 0.85, 1, 0.35, 0.002, 10, 50, [short], [long], 0, 14, 15, 10, 100, 4, 0, 14]c1 = (indicator1 > indicator2)Obviously I do this for entering short positions and exiting positions too.
But I always end up with a syntax error?
Anyone give me any pointers where I’m going wrong?
Many Thanks
07/17/2019 at 12:50 PM #10272707/17/2019 at 1:04 PM #102730If you want to use the optimiser, replace the numbers with variables names you add in the optimization settings window, that’s where you control the start/end and step of each value.
If the 2 variables names are short and long, then you are good, but remove the brackets!!
07/17/2019 at 2:53 PM #10274507/17/2019 at 4:13 PM #10275807/17/2019 at 4:14 PM #10276007/17/2019 at 4:21 PM #10276307/17/2019 at 4:29 PM #102765Try using variable for ALL parameters, then comment out the ones you want to optimize (p13 and p14), until they are ok:
12345678910111213141516171819202122232425// Conditions to enter long positionsp01=1p02=0p03=2p04=10p05=20p06=100p07=0.85p08=1p09=0.35p10=0.002p11=10p12=50//p13=2//p14=13p15=0p16=14p17=15p18=10p19=100p20=4p21=0p22=14indicator2, indicator1, ignored, ignored, ignored = CALL "TSI-on-TSI"[p01, p02, p03, p04, p05, p06, p07, p08, p09, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22]c1 = (indicator1 > indicator2) -
AuthorPosts
Find exclusive trading pro-tools on