Optimization variables, how to define?
Forums › ProRealTime English forum › ProOrder support › Optimization variables, how to define?
- This topic has 10 replies, 3 voices, and was last updated 6 years ago by
soulintact.
-
-
09/01/2019 at 7:32 PM #106127
Good evening!
I tried to optimize different bull variables of HeikinAshi, but I am obviously doing it wrong. My logic was to define each indicator with a number; 1016-1020 and then labelling them as aa-ff in the optimization tool. Thanks in advance!
Optimization variables1234567891011121314151617181920212223//Definitions of different BullHeikinAshiBullishHaramiCross=1016BullishCounterAttack=1017BullishBreakaway=1018GapUp=1018InvertedHammer=1019TweezersTop=1020//Bullish Signal Heikin AshiBullishBreakaway=(body[4]<0 and body[3]<0 and body>0 and open[3]<close[4] and close[2]<close[3] and close[1]<close[2] and longcandle and close<close[4] and close>open[3]) and TrendDown[5]BullishCounterAttack=(body[1]<0 and longcandle[1] and body>0 and longcandle and close<=close[1]) and TrendDown[2]BullishHaramiCross=(body[1]<0 and longcandle[1] and bodybottom>bodybottom[1] and bodytop<bodytop[1] and ratio<0.3 and range<0.3*range[1]) and TrendDown[2]GapUp=(low>high[1])InvertedHammer=(body[1]<0 and longcandle[1] and low<low[1] and shadowtop>2*abody and shadowbottom<0.3*abody)and TrendDown[2]TweezersTop=(body[1]>0 AND longcandle[1] AND body<=0 AND high=high[1]) and TrendUp[2]BullHeikinAshi=aa or bb or cc or dd or ee or ff09/01/2019 at 7:37 PM #106129Why didn’t you do below?
1234567//Definitions of different BullHeikinAshiBullishHaramiCross=aaBullishCounterAttack=bbBullishBreakaway=ccGapUp=ddInvertedHammer=eeTweezersTop=ff1 user thanked author for this post.
09/01/2019 at 7:51 PM #106132Thanks GraHal, but the optimization is done in numbers. Doing the optimization could exclude several BullHeikinAshi as aa-ff could end up in just being one or two of the variables.
Optimization example: aa=1017, bb=1017, cc=1018, dd=1018, ee=1018, ff=1017.
Conclusion: only use BullishCounterAttack (1017) and BullishBreakaway (1018) in the statement.
09/01/2019 at 8:00 PM #10613409/01/2019 at 8:12 PM #106135Thanks GraHal, but I am sorry, I do not see how that would help me sorting out possible variables?
09/01/2019 at 8:17 PM #106137I’ve just seen below
1BullHeikinAshi=aa or bb or cc or dd or ee or ffSo I’d have coded
12345678BHC = BullishHaramiCross=aaBCA = BullishCounterAttack=bbBB = BullishBreakaway=ccGU = GapUp=ddIH = InvertedHammer=eeTT= TweezersTop=ffBullHeikinAshi = BHC or BCA or BB or GU or IH or TTMaybe I’m reading your problem all wrong?? 🙂 Vonasi or Roberto … help?? 🙂
09/01/2019 at 8:28 PM #106138Now I look at and have read all your code I don’t see how – for example – you can optimise below in the way I suggest, apologies! 🙂
1BullishHaramiCross=(body[1]<0 and longcandle[1] and bodybottom>bodybottom[1]Maybe best if Vonaso or Roberto delete my posts and I stop watching TV at the same time I make comments on here!? 🙂
09/01/2019 at 8:33 PM #106139No worries GraHal, I am thankful that you are responding so quickly on a Sunday evening when you should watch TV 🙂
My statement is probably so absurd that it was difficult to grasp. Anyhow, let’s see how it evolves tomorrow. TV suggestions: Vis a vis on Netflix and Quarry on HBO 🙂
Not to forget Toc Toc on Netflix.1 user thanked author for this post.
09/02/2019 at 7:45 AM #106174You could test this way of adding the boolean condition in the same variable:
123456if aa = 1016 thenBullHeikinAshi=bullheikinashi and BullishHaramiCrosselsif aa = 1017 thenBullHeikinAshi=bullheikinashi and BullishCounterAttackelsif aa = 1018 then// .. and so on ..Do the same for bb,cc,…
(not tested)
1 user thanked author for this post.
09/02/2019 at 7:52 AM #106175Good morning Nicolas and thank you very much.
Your suggestion seems logical and I will try that approach. After testing I will confirm and include the partial code, THANKS!
09/02/2019 at 12:11 PM #106224Dear Nicolas, I just want to confirm that your suggestion worked very well. I enclose the code:
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071//Definitions of BullHeikinAshiif aa = 1016 thenaaa=BullishHaramiCrosselsif aa = 1017 thenaaa=BullishCounterAttackelsif aa = 1018 thenaaa=BullishBreakawayelsif aa = 1019 thenaaa=GapUpelsif aa = 1020 thenaaa=InvertedHammerelsif aa = 1021 thenaaa=TweezersTopelsif bb = 1016 thenbbb=BullishHaramiCrosselsif bb = 1017 thenbbb=BullishCounterAttackelsif bb = 1018 thenbbb=BullishBreakawayelsif bb = 1019 thenbbb=GapUpelsif bb = 1020 thenbbb=InvertedHammerelsif bb = 1021 thenbbb=TweezersTopelsif cc = 1016 thenccc=BullishHaramiCrosselsif cc = 1017 thenccc=BullishCounterAttackelsif cc = 1018 thenccc=BullishBreakawayelsif cc = 1019 thenccc=GapUpelsif cc = 1020 thenccc=InvertedHammerelsif cc = 1021 thenccc=TweezersTopelsif dd = 1016 thenddd=BullishHaramiCrosselsif dd = 1017 thenddd=BullishCounterAttackelsif dd = 1018 thenddd=BullishBreakawayelsif dd = 1019 thenddd=GapUpelsif dd = 1020 thenddd=InvertedHammerelsif dd = 1021 thenddd=TweezersTopelsif ee = 1016 theneee=BullishHaramiCrosselsif ee = 1017 theneee=BullishCounterAttackelsif ee = 1018 theneee=BullishBreakawayelsif ee = 1019 theneee=GapUpelsif ee = 1020 theneee=InvertedHammerelsif ee = 1021 theneee=TweezersTopendifBullHeikinAshi=aaa or bbb or ccc or ddd or eeeHaving 5 alternatives was a bit too many. 3 seems to be well enough. By the optimization, I can filter out what factors that likely work best within a specific time frame and stock.
-
AuthorPosts
Find exclusive trading pro-tools on