Dear all I was wondering if any of you could help me in coding the following: definition of a uptrend scenario there are 2 higher highs in the last x days period. there are 2 higher lows in the last x days periods definition of a downtrend scenario there are 2 lower highs in the last x days period. there are 2 lower lows in the last x days periods Thak you very much! Francesco