Forums › ProRealTime English forum › ProOrder support › Strategy TrendImpulse v1 › Reply To: Strategy TrendImpulse v1
05/26/2020 at 10:25 AM
#133285
I’m confused about this part of the code:
define trena
1 2 3 4 5 6 |
if (line1[0]>line2[0] or trend[0] = 1) then trena = 1 endif if (line1[0]<line2[0] or trend[0] = -1) then trena = -1 endif |
Its logic seem to favor trena=-1 (since it’s only 1 if trend = 1 and line1>=line2). How does this make sense?
Also, I’m confused by the numbers switching from 1 for bullish to -1 for bullish to 2 for bearish, etc. It would make more sense to just use 1 for bullish and -1 for bearish imho.
Does anyone else have any comments about the code? Maybe we can improve it together 😉