♥ 0 |
Hello Mr. Hahn, I keep trying to get a scan searching when the dmi + crosses the dmi – input length = 14; input averageType = AverageType.WILDERS; def hiDiff = high – high[1]; def loDiff = low[1] – low; def plusDM = if hiDiff > loDiff and hiDiff > 0 then hiDiff else 0; def minusDM = if loDiff > hiDiff and loDiff > 0 then loDiff else 0; def ATR = MovingAverage(averageType, TrueRange(high, close, low), length); plot “DI+” = 100 * MovingAverage(averageType, plusDM, length) / ATR; plot “DI-” = 100 * MovingAverage(averageType, minusDM, length) / ATR; def DX = if (“DI+” + “DI-” > 0) then 100 * AbsValue(“DI+” – “DI-“) / (“DI+” + “DI-“) else 0; plot ADX = MovingAverage(averageType, DX, length); “DI+”.SetDefaultColor(GetColor(1)); “DI-“.SetDefaultColor(GetColor(8)); ADX.SetDefaultColor(GetColor(5));
Marked as spam
|
Please log in to post questions.
Editor’s note: The title and URL of the question has been modified to make it easier for other viewers to search for and find this post. The original title has been moved to the first line of the question description.