This is one of the techniques described by William Blau in his book "Momentum, Direction and Divergence" (1995). If you like to learn more, we advise you to read this book. His book focuses on three key aspects of trading: momentum, direction and divergence. Blau, who was an electrical engineer before becoming a trader, thoroughly examines the relationship between price and momentum in step-by-step examples. From this grounding, he then looks at the deficiencies in other oscillators and introduces some innovative techniques, including a fresh twist on Stochastics. On directional issues, he analyzes the intricacies of ADX and offers a unique approach to help define trending and non-trending periods. This indicator plots Ergotic CSI and smoothed Ergotic CSI to filter out noise.
You can change long to short in the Input Settings WARNING: - For purpose educate only - This script to change bars colors.