I am new here. Just trying to design my first strategy.
I'm just having a hard time trying to access values from MASlopeLine. I doesn't give the same values for the indicator that I see on the chart. I ran the SampleEveryNBar indicator on it and looks like not all values are valid ? Not sure where to go from here.
I've attached the code and an illustration of what the strategy should do in the case of a Long. Basic logic is : Go long when both MASlopeLines (slow and fast periods) are above their thresholds (20 and 40) and go short (reverse) when both are below (-20 and -40). The values I see in the histogram are the ones I need. If someone can point me in the right direction, I'd appreciate it very much.
Thank you,
Pedro
Comment