Originally Posted by AndrewAMD
So far so good. At least your code is clear.


Thanks !

Originally Posted by AndrewAMD

First, you have an error in the countLL function - you'll want to change ">" to "<".


You are so right laugh Not sure how I missed that.

Originally Posted by AndrewAMD

Next, what is your definition of highest-highs in a period? Is it when the high is higher than the previous high, or is it when a new record is set? It seems you are doing the former and not the latter.


Strategy is comparing highs and lows as momentum condition, so don't need record, but just number of higher highs and lower lows in the same period.

if(countHH(Highs,WindowPeriod)>countLL(Lows,WindowPeriod) and ...) enterLong and opposite for short.



Thanks one more time, you are helping me very much !

Best regards,

Neb