Unlocking the Secrets of Market Timing: A Comprehensive Guide to Trading with Tom DeMark's New Market Timing Techniques
3.4 TD Risk/Extension Levels
inputs: price series OHLC
for i from 4 to end:
if close[i] < close[i-4]: setup_count_bull +=1 else setup_count_bull = 0
if close[i] > close[i-4]: setup_count_bear +=1 else setup_count_bear = 0
if setup_count_bull == 9: mark bullish setup complete, begin countdown
// implement countdown logic to 13 using Close <= Low[i-2] etc.