This is probably a very trivial answer but I have been studying this for quite some time now, but I just cant seem to understand why the signal produced in the training video builds a line graph that goes up (increase +1) and down???? (down being the key part) The positive slope part I understand but there is no -1 in the code and cant seem to put it together why the line graph goes down as well. I feel like the “increase” indicator should only have a positive slope.
MyMACD = MACD[12,26,9](close)
increase = 0
For a= 1 to 20 do
if MyMACD [a] > MyMACD[a+1] and MyMACD [a] >0 then
increase = increase +1
endif
next
return increase
It doesn’t decrease, the count of total MACD increase over the last 20 bars is recounted on each bar, starting from zero. So from one candle to another, the count of “increase” condition could be more or less than the one of the previous period.