Brettser16
New member
I was wondering if there was another indicator out there that is better than the DMI indicator? Any advise would be appreciated
Last edited by a moderator:
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
False signals of what? breakouts? The crossing of the adx and a dmi line aren't really what the system is built for. ADX says how strong a trend is, The higher of the 2 DMI lines says which direction is dominant. They're measuring 2 different things. Did you read about using that dmi crossing the adx signal from a forum or newsletter by chance?I use the dmi indicator daily and usually buy when say a di-splits the adx and if the adx is above 20 but you can get alot of false indications was wondering if there was anything better
It is a lagging indicator, meaning that it confirms an uptrend or downtrend after the direction is already established. The ADX will not change until after the market or security has already reversed its trend
Hi Ben, quick question..I am using the DMI indicator but I manually have to put in the 25 line because its hard to see with the price bubbles to the right...the problem is once I put a 25 line in I have to do it manually for every stock. Is there an easier way to accomplish this with a script added to the DMI? ThanksWhat's wrong with the DMI indicator? It would be helpful if you could provide more context as to what you're looking for.
plot line_25 = 25;
#
# TD Ameritrade IP Company, Inc. (c) 2008-2020
#
declare lower;
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));
plot line_25 = 25;
Thanks Ben appreciate as usual!! And as usual I learn something new everyday..thanks lol@Joseph Patrick 18 As easy as a single line of code below:
plot line_25 = 25;
Here is the full script:
Code:# # TD Ameritrade IP Company, Inc. (c) 2008-2020 # declare lower; 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)); plot line_25 = 25;
"I want someone to help me" is that really the best way to ask. Switch the ordertype tohi. I want to enter buy and sell orders when the indicator rises above zero and below zero, but without confirmation of the closing candle, that is, when the candle starts I want someone to help me
input length = 18;
input paintBars = yes;
input averageType = AverageType.WILDERS;
def diPlus = DMI(length, averageType)."DI+";
def diMinus = DMI(length, averageType)."DI-";
plot Osc = diPlus - diMinus;
plot Hist = Osc;
plot ZeroLine = 0;
Osc.SetDefaultColor(GetColor(0));
Hist.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Hist.SetLineWeight(3);
Hist.DefineColor("Positive", Color.UPTICK);
Hist.DefineColor("Negative", Color.DOWNTICK);
Hist.AssignValueColor(if Hist > 0 then Hist.Color("Positive") else Hist.Color("Negative"));
Hist.HideTitle();
ZeroLine.SetDefaultColor(Color.GRAY);
DefineGlobalColor("Positive", Color.UPTICK);
DefineGlobalColor("Negative", Color.DOWNTICK);
AssignPriceColor(if !paintBars
then Color.CURRENT
else if Osc > 0
then GlobalColor("Positive")
else GlobalColor("Negative"));
def buy = hist crosses above 0;
def sell = hist crosses below 0.3 ;
AddOrder(OrderType.BUY_TO_OPEN, condition = buy, price = open , tickcolor = Color.GREEN, arrowcolor = Color.GREEN);
AddOrder(OrderType.SELL_Tpen, condition = sell, price = open,
tickcolor = Color.GREEN, arrowcolor = Color.GREEN);
AddOrder(OrderType.SELL_To_Close, condition = sell, price = open, tickcolor = Color.MAGENTA, arrowcolor = Color. MAGENTA);
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
I | Better way to show MTF labels | Questions | 1 | |
A | better TRIN indicator | Questions | 5 | |
![]() |
Better fields in contracts or options watchlist | Questions | 5 | |
![]() |
Is there a better way to test if a indicator repaints? | Questions | 1 | |
W | Why is this one Options daytrade better than the other? | Questions | 4 |
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.