HPotter

Ergotic MDI Strategy

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.

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 17/07/2014
// 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.
////////////////////////////////////////////////////////////
study(title="Ergotic MDI (Mean Deviation Indicator) Strategy")
r = input(32, minval=1)
s = input(5, minval=1)
u = input(5, minval=1)
SmthLen = input(3, minval=1)
hline(0, color=blue, linestyle=line)
xEMA = ema(close, r)
xEMA_S = close - xEMA
xEMA_U = ema(ema(xEMA_S, s), u)
xSignal = ema(xEMA_U, u)
pos =	iff(xEMA_U > xSignal, 1,
	    iff(xEMA_U < xSignal, -1, nz(pos[1], 0))) 
barcolor(pos == -1 ? red: pos == 1 ? green : blue )
plot(xEMA_U, color=green, title="Ergotic MDI")
plot(xSignal, color=red, title="SigLin")