Search | User Listing Vidsite | Calendars | Quotes
Home Page ->  OmniTrader HowTo's -> Chart Indicators - Canned -> View ThreadLogon (or Register, or Join TradeTight)

You are logged in as a limited-access Guest.To join TradeTight, first read the info in the Organization & Content room, then click the link above. 

1 Timothy 6:6-8 (ESV) … Now there is great gain in godliness with contentment,  for we brought nothing into the world, and we cannot take anything out of the world.  But if we have food and clothing, with these we will be content.


The Many Faces of ADX
Jump to page : 1
Now viewing page 1 [50 msgs/pg]
Jump to room :
JimDean
Posted 11/10/2011 9:14 AM (#3230)
Subject: The Many Faces of ADX



Owner/Admin

Posts: 3925
2000100050010010010010025
Location:
USA: GA, Lawrenceville
Click here for a question posted in the OT forums regarding use of the ADX. It includes a copy of an article discussing this from Active Trader magazine, and some interesting comments by TomH from his attendance of the training course.

The article presents an extremely simplistic view of ADX. All it says is to find situations where ADX is crossing over 40. That is a simple scan:
ADX(14) > 40 and ADX(14)[1] <= 40

However, there are many other things to consider. If you're interested in ADX, I recommend that you try to get a copy of Welles Wilder's "New Concepts in Technical Trading". It's out of print but you may be able to find it used via Amazon. It is a VERY good book, and it explains Wilder's thinking behind the many indicators and concepts he originated.

A related Wilder indicator (actually, a component of the ADX calc) is called the DMI - it has a "plus" and a "minus" version, which tracks how consistently stocks have been moving in a positive or negative direction.

If you are looking for a long entry, Wilder says that an important condition is for the DMI+ to be greater than the DMI- ... or in OScan terms:
DI_PLUS(14) > DI_MINUS(14)

Wilder also uses a lower threshold than 40 for the ADX. In fact, despite what many articles purport to be "Wilder's method" ... he suggests using ADXR, rather than ADX ... OScript supports both. An ADXR crossover beyond 30 (Wilder's suggested threshold) would be:
ADX_R(14) > 30 and ADX_R(14)[1] <= 30

If you want to identify a long trade, combine that with:
DI_PLUS(14) > DI_MINUS(14)
... or for a short trade:
DI_MINUS(14) > DI_PLUS(14)


I've worked a LOT with ADX in many forms. There is nothing "magic" about the parameter 14 (it was a favorite of Wilder's - but his trading was done forty years ago in different market conditions). There is nothing "magic" about the threshold of 30 ... or 20 ... or 40.

These things must be "tuned" to the current market conditions and even possibly to each symbol. I suggest you plot the various curves (best if done via OLang so that all the y-axes line up for ADX and DMI's) and do a bunch of testing using Strategy Wizard with different forms of these rules.


One thing that I have found to be quite valuable is to use a variable threshold for the ADX ... that is, make the threshold be the upper Bollinger band of a med-long term window of the ADX - anywhere from 50 to 150 days. There are many other possible rules, regarding the slope of the ADX (use LnReg_Slope) and whether it recently peaked, etc. Much of this is discussed in Wilder's book (BB idea is mine, however).

Wilder was a brilliant fellow. His work is well worth digging into.
Top of the page Bottom of the page
KeithParsons
Posted 11/26/2013 9:31 AM (#5434 - in reply to #3230)
Subject: The Many Faces of ADX



Veteran

Posts: 122
100
Location:
S.Africa: , Umgeni Park, Durban
Hi Jim & Tom,
After reading this T.T. thread by Jim, I went to OT and noted some of Tom's work on the ADX. I then snagged one file for future reference. (this is attached).

I now want to do some work on it - and despite "many searches" simple cannot find Tom's thread that I snagged. Its in 2011.

Found it, under Ken Calhoun in OT 2011

Attachments
Attachments ADX THREAD 2011.docx (109KB - 13 downloads)
Top of the page Bottom of the page
ThomasHelget
Posted 11/27/2013 8:33 AM (#5436 - in reply to #3230)
Subject: The Many Faces of ADX



Elite

Posts: 473
1001001001002525
Location:
USA: NY, Baldwinsville
Keith:

Yes, Ken Calhoun has done a lot of work with the ADX and offers course on it.

I believe he also published an article about it in Technical Analysis of Stocks and Commodities or one of the other trading magazines.
Top of the page Bottom of the page
SalimHira
Posted 8/20/2018 10:51 PM (#9133 - in reply to #3230)
Subject: The Many Faces of ADX



Veteran

Posts: 183
100252525
Location:
USA: MD, Columbia
Hi Jim and All:

I came across this small code recently, as shown below the ADX with DMI, that seems to work well with my mental bias for trading in very short time-frames including Tick bars, with off-course, in conjunction, with other non-correlated indicators charted for a contextual view of price action.

What I really like about this indicator is Plotlabel 20 & 25 (even though nothing magic about it), it still keeps me grounded to stay on the sideline when the ADX/DMI is below it, irregardless of price action (i.e., clearly shows basing/consolidation) - and its kept me not only out of trouble, but allow me to "think" out of the box by separating myself from what all other indicators, omniscripts, etc... are telling me (i.e., confirmation bias).

i.e., ADX measures the strength of a trend, but does not distinguish between uptrends and downtrends.
....................

My question is: the indicator still lags considerably and wondering if there is any new "technological / technical view" after the late '90s when it was initially introduced, or share any other thoughts since than and/or revival of the topic. Including if there is another comparable indicator or ideas lurking in a proscripts folder :-) that is similar ?

Thanks.

=============================================

#Indicator

#Param "ADXPeriods", 8
#Param "DMIPeriods", 13
#Param "Treshhold1", 20
#Param "Treshhold2", 25
#Param "Treshhold3", 40
#Param "Treshhold4", 55

Dim ADMom, PDI, MDI as Single
Dim ScaleHigh, ScaleLow as Single

ADMom = ADX(H,L,C,ADXPeriods)
PDI = DI_PLUS(H,L,C,DMIPeriods)
MDI = DI_MINUS(H,L,C,DMIPeriods)

ScaleHigh = HHV(ADMom,200)
ScaleLow = LLV(ADMom,200)
SetScales(ScaleLow, ScaleHigh)
Plot("ADMom",ADMom,Blue, 3)
Plot("PDI",PDI,Green,2)
Plot("MDI",MDI, Red,2)
PlotLabel(Treshhold1)
PlotLabel(Treshhold2)
PlotLabel(Treshhold3)
PlotLabel(Treshhold4)

Return 0

=======================================

I attached an abbreviated version of an ADX presentation PDF that Salim wanted to add

For those not familiar with this indicator, here are few references:

https://www.youtube.com/results?search_query=adx+dmi

PPO/ADX Pinch system
https://www.omnitrader.com/currentclients/otforum/thread-view.asp?th...

Ken Calhouns ADX Breakout Scanning
https://www.omnitrader.com/currentclients/otforum/thread-view.asp?th...

More from Jim's thoughts:
https://www.omnitrader.com/currentclients/otforum/thread-view.asp?th...

Jim Dean's references found on OT forums:
Another useful thing to scan for is when ADX values are rising ...

LnReg_Slope(ADX(9),3) > 0 - This means that the "consistency" of price direction is improving.

Bearish:
DI_Minus(9) > DI_Plus(9) and DI_Minus(9)[1] < DI_Plus(9)[1]

Bullish:
DI_Minus(9) < DI_Plus(9) and DI_Minus(9)[1] > DI_Plus(9)[1]
================

These are presentation files in pdf format:

Trading Power - Trends with ADX by Dr. Charles B. Schaap, Jr.
http://www.tradelikeapro.com/public/images/Expo14_ADX_PowerTrends.p...

ADX and DMI - Dr. Charles B. Schaap (download full file)
https://www.forexfactory.com/attachment.php/2567687?attachmentid=256...


Edited by SalimHira 8/22/2018 8:06 PM

Attachments
Attachments March_PitNews_Schaap.zip (749KB - 3 downloads)
Attachments ADXcellence-Abbrev.pdf (1874KB - 3 downloads)
Top of the page Bottom of the page
JimDean
Posted 8/21/2018 8:27 AM (#9135 - in reply to #9133)
Subject: The Many Faces of ADX



Owner/Admin

Posts: 3925
2000100050010010010010025
Location:
USA: GA, Lawrenceville
ADX is inherently laggy due to its use of Wilder’s Smoothing (based on Wilder’s 1971 book), which is essentially a “slow” form of an EMA. Imho it’s a very clever and insightful indicator, but it’s more useful for position trading than short term trading.

If you want to make it work with less lag, you could rewrite the ADX and DMI from scratch using a more responsive smoothing. I don’t know if it would “work” as well re identifying trends etc - though I’d guess it would. Some modern sites such as Investopedia describe the ADX/DMI smoothing as exponential - but that’s not how Wilder did it. I don’t recall offhand if I ever “checked” if N functions do it the original way or not - but my guess is that they do.

The Wikipedia article seems to correctly explain the calc of the ADX / DMI … and at the end, it suggests that sometimes different MA smoothing methods are used. You can click on the blue words for expanded formulae. They suggest that people sometimes also use an EMA or an Adaptive MA instead of the “Running” MA (their term for Wilder’s Smoothing). Either of those others would likely have less lag.
Top of the page Bottom of the page
SalimHira
Posted 8/24/2018 9:14 PM (#9136 - in reply to #3230)
Subject: The Many Faces of ADX



Veteran

Posts: 183
100252525
Location:
USA: MD, Columbia
Hi Folks,

I have attached a sample chart of visual view of ES in a 5-min timeframe.

Observe how all day, a trader should have strayed away from attempting to Exit or Short as viewed on ADX/DMI and possibly Exit around lunch time, after which, market just churned all afternoon as DMI shows being below 25 & 20.

Man, that'd be sooo cool... to include ADX/DMI inside Jim's StateStrip indicator instead of the RSI :-) ... so much info. within an indicator pane. An idea, from many :-).

Thanks.

Shaded background color in ADX/DMI is LnReg_Slope(ADX(9),3) > 0

(ESin5-minChartADXb.png)



Attachments
Attachments ESin5-minChartADXb.png (336KB - 3 downloads)
Top of the page Bottom of the page
JimDean
Posted 8/24/2018 9:30 PM (#9137 - in reply to #9136)
Subject: The Many Faces of ADX



Owner/Admin

Posts: 3925
2000100050010010010010025
Location:
USA: GA, Lawrenceville
1. StateStrip was provided primarily as a programming example for plotting - I chose the rules simply to illustrate states. So, it’s nothing to hang your hat on imho.

2. ADX/DMI are technically unbounded-top-end indicators but you can make an arbitrary choice to cap them at some max value, between 70-100 or so depending on desired resolution. Use SetScales for that per the example.

3. If the ADX/DMI is capped, then when the calc hits the cap the line will flatten. This only would make a difference if you are visually checking slopes and/or divergences.

… that should give you enough to go on ;-)
Top of the page Bottom of the page
JimDean
Posted 8/25/2018 10:25 AM (#9138 - in reply to #9137)
Subject: The Many Faces of ADX



Owner/Admin

Posts: 3925
2000100050010010010010025
Location:
USA: GA, Lawrenceville
I put together a flexible variant of the aJDndStateStrips code which uses ADX/DMI instead of RSI, and also has a lot more flexibility regarding input parameters and the BB evaluations ... it plots the BB's as well, on the Price Pane.

This took some time to do, so it's for sale ... and I'm willing to custom-enhance it to show signals using logic related to the ADXcellence presentation or whatever ... email me to purchase or discuss (JimDean at TradeTight.org)

The top and bottom strips mean basically the same as before, BUT:
1. parameter option to use Guts Close or H/L extremes to compare to the upper/lower BB's
2. parameter options for slow & fast BB pds and SD multiplier

The center shows ADX & DMI with parameter inputs for their periods, and for the threshold and the max scale. Note that the "70" y-axis scale is 10 higher than the input max ADX/DMI limit.

Gray dots on pricepane show the price being compared to the BB's (Guts or Close ... if Extremes selected, then H/L are used for upper/lower BB checks, and no dots plot). Violet line on price pane is EMA (used by ADXcellence logic)

I turned off the vertical lines showing entry/exit since rules as yet undefined.

(Later snaps are a "zoom" into the first snap.)

(aJDndAdxDmiBB.png)



(aJDndAdxDmiBB-zoom.png)



Attachments
Attachments aJDndAdxDmiBB.png (46KB - 2 downloads)
Attachments aJDndAdxDmiBB-zoom.png (54KB - 3 downloads)
Top of the page Bottom of the page
JimDean
Posted 8/30/2018 12:17 PM (#9158 - in reply to #9138)
Subject: The Many Faces of ADX



Owner/Admin

Posts: 3925
2000100050010010010010025
Location:
USA: GA, Lawrenceville
I've been working further on a Strategy that combines the information from Bollinger & Keltner Bands on the price pane with ADX/DMI info on the indicator pane to create entry and exit rules. I've significantly enhanced the graphic output (posted earlier in this thread) to show additional relevant information, partly for visual research and partly for checking the internal signal rules that are derived from that info.

The attached snapshot shows the "indicators only" version of "aJDndAdxBands" ... the "trading signals" version of this also shows entry and exit points with vertical lines on the Adx/Dmi 0-70 pane (not shown here since still being tweaked). This will eventually be provided for sale, so the OLang source is not available ... but I'm providing a snippet that shows how the three "strips" at the bottom of the Indicator pane are created.

NOTE that here:

1. I chose to put all the strips on the bottom, since when the cursor+databox mode is live, there are a *lot* of values that appear just under the indicator label, that would obscure a top strip.

2. The three strips each have 2-3 background colors, to indicate the states of metrics that matter to me for the signals logic (hinted at by the comments in the code, btw ;~)

3. Each strip also has a thin foreground line that can be black, white, or invisible ... thus three more states are reported. I've paired up the lines with the backgrounds that relate to them.

4. All the relevant info about "interpreting" the price-pane Bollinger Band and Keltner Channel is reported in the three Indicator pane strips ... as a result, ALL of the plotting on the Price Pane can be deactivated (to make the chart cleaner, or to allow for other indicators to be plotted on it ... without losing any important information.

The net result is that those three bottom strips provide info regarding 17 different individual states (many permulations). The Adx/Dmi provides even more ... and I'm not done yet!

You'll also realize from this that *color choices* are very important. The code shows the selections that I made here ... see this thread for complete info re available colors: http://tradetight.org/forums/thread-view.asp?tid=258


(aJDndAdxBands chartsnap.png)



(aJDndAdxBands stripcolorscode.png)



Attachments
Attachments aJDndAdxBands chartsnap.png (38KB - 3 downloads)
Attachments aJDndAdxBands stripcolorscode.png (58KB - 3 downloads)
Top of the page Bottom of the page
VinayJain
Posted 4/4/2020 1:07 PM (#9805 - in reply to #3230)
Subject: Plotting Dots at the Candle Midpoint


Regular

Posts: 59
2525
Location:
India: , Bangalore
I want to plot dots at the midpoint of the price candle as you have done with the grey dots on price candles as shown in your post #9138. How it can be done? Thanks in advance.


Top of the page Bottom of the page
JimDean
Posted 4/4/2020 1:42 PM (#9806 - in reply to #9805)
Subject: Plotting Dots at the Candle Midpoint



Owner/Admin

Posts: 3925
2000100050010010010010025
Location:
USA: GA, Lawrenceville
Hi Vinay

Honestly that particular trick is part of my “secret sauce bag” - it took a lot of experimentation to get it to work reliably with a wide variety of charts. But I’ll be happy to lay out the basics for you to get started with …

1. Use the plotpriceline( label, x1,y1, x2,y2, wdth ) command. The x axis (date) values are equal. The y axis (price) values are each offset from the desired mark … such as (H+L+O+O+C+C)/6 = guts … by a “magic” variable. The width is typically somewhere between 3-8, depending on what you want the dot to look like.

2. The magic variable takes a bunch of experimentation. It needs to be bigger for symbols with high prices and smaller for syms with low prices. And it needs to be responsive to the auto-scaling of the y axis … which is a function of how much swing the stock has over time from HHV to LLV … which is a function of the current market - but also of the width of the display window (3 months, one year, etc).

3. OLang unfortunately has no way of knowing what the current window width setting is - and the height of the dot really does need to vary enough to work for a bunch of cases. Sometimes I have added an input Param that skootches the height and width a tad (small med large) … but usually I don’t.

4. Finally, the entire process of calculating the height needs to be very efficient, since a whole lot of dots are plotted as individual items, for the entire chart history (unless you limit it) … that can slow things down.

5. The “secret” to making this work is to do it incrementally, much like a “manual” EMA calculation. On the first bar you create a seed value, then as each new bar appears, you tweak that value a tad. Do *not* use the HHV() and LLV() commands - they are very slow - and since the chart width can vary widely, you don’t know how far to look back.

Of course this is much easier for an Indicator plot if the indicator has fixed min max y-axis range - in the case, the y-offset is a fixed value that “looks right”.

That should be enough to get you started.
Top of the page Bottom of the page
VinayJain
Posted 4/5/2020 12:05 AM (#9807 - in reply to #3230)
Subject: The Many Faces of ADX


Regular

Posts: 59
2525
Location:
India: , Bangalore
Thanks Jim. However the steps you outlined are intimidating to people like me who can't code anything beyond basic stuff. The dots on the candles looks cool but I will settle with a simple indicator which plots the midpoint values on the chart.
Top of the page Bottom of the page
JimDean
Posted 4/5/2020 8:10 AM (#9808 - in reply to #9807)
Subject: The Many Faces of ADX



Owner/Admin

Posts: 3925
2000100050010010010010025
Location:
USA: GA, Lawrenceville
Okay. So you want to plot the Guts value as a line? Presumably on the price chart? Simplest way to do that is to right-click on chart to create a Quick Indicator with the Guts formula (H+L+O+O+C+C)/6.

The OLang version would look like this:
#Indicator
Dim Guts as single
Guts = (H+L+O+O+C+C)/6
Plotprice(“GutsPrc”, Guts)
Return Guts
Top of the page Bottom of the page
Jump to page : 1
Now viewing page 1 [50 msgs/pg]
( E-mail a Link | Printer Version | Search Room )

Owner of site: Jim Dean -- Forum content is confidential, and may not be distributed without written permission.