NexusFi: Find Your Edge


Home Menu

 





ADX - what lengths work best?


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one ernald with 4 posts (3 thanks)
    2. looks_two vmodus with 4 posts (2 thanks)
    3. looks_3 bobwest with 2 posts (3 thanks)
    4. looks_4 futrstrdr with 1 posts (2 thanks)
      Best Posters
    1. looks_one futrstrdr with 2 thanks per post
    2. looks_two bobwest with 1.5 thanks per post
    3. looks_3 ernald with 0.8 thanks per post
    4. looks_4 vmodus with 0.5 thanks per post
    1. trending_up 6,303 views
    2. thumb_up 10 thanks given
    3. group 3 followers
    1. forum 10 posts
    2. attach_file 1 attachments




 
Search this Thread

ADX - what lengths work best?

  #1 (permalink)
 
ernald's Avatar
 ernald 
Austin TX
 
Experience: Intermediate
Platform: Multicharts C#
Broker: Interactive Brokers + IQFeed
Trading: Futures, stocks, options
Posts: 6 since Jul 2020
Thanks Given: 7
Thanks Received: 4

Hi there, long time lurker / first time poster.

I'm using Multicharts and C# (i.e. Power Language) to create automated trading strategies for /ES. My current strategy primarily uses CCI intraday. The CCI length I use is 15 (on a 1min chart).. The strategy trades on a 1 minute chart and averages about 25 trades/session. Backtest and live results have been decent/profitable so far.

To optimize the strategy, I was considering using ADX as a sort of "trend strength" type of indicator... but for me it didn't really pass the eyeball test... on any timeframe. I looked at a daily chart and minute, and it seems really noisy. Is there a length that works somewhat well for anyone on ES for daily or minute charts, to help identify range vs. trend days? I know it can't be perfect, just looking to learn more about ADX. I haven't used this indicator much.

Thanks. :-)

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Quant vue
Trading Reviews and Vendors
NexusFi Journal Challenge - May 2024
Feedback and Announcements
REcommedations for programming help
Sierra Chart
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
How to apply profiles
Traders Hideout
 
  #2 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


ernald View Post
Hi there, long time lurker / first time poster.

I'm using Multicharts and C# (i.e. Power Language) to create automated trading strategies for /ES. My current strategy primarily uses CCI intraday. The CCI length I use is 15 (on a 1min chart).. The strategy trades on a 1 minute chart and averages about 25 trades/session. Backtest and live results have been decent/profitable so far.

To optimize the strategy, I was considering using ADX as a sort of "trend strength" type of indicator... but for me it didn't really pass the eyeball test... on any timeframe. I looked at a daily chart and minute, and it seems really noisy. Is there a length that works somewhat well for anyone on ES for daily or minute charts, to help identify range vs. trend days? I know it can't be perfect, just looking to learn more about ADX. I haven't used this indicator much.

Thanks. :-)

We develop strategies in both EasyLanguage and PowerLanguage. 14 is the gold standard for length, of course, but that doesn't make it right for all purposes. Personally I set aside ADX a few months ago, as I wasn't able to easily integrate it into my strategies. Like you, it seemed like a lot of noise.

If you really want to work with it, maybe you can create an input for the ADX length, then optimize on that. Example:
 
Code
Input:
ADXLength(14) ; 

Var: 
MyADX(0) ;

MyADX = ADX( ADXLength );

Condition1 = MyADX > MyADX[1] ; // rising ADX

This is just a thought, of course. I have actually optimized on ADX threshold (between 19 and 25) with some success, for example MyADX > ADXThreshold, where ADXThreshold is an input. With that being said, I am not using ADX in any of my currently running automated strategies, though I may come back to it later.

I hope this makes sense and is helpful.

~vmodus

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #3 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,172 since Jan 2013
Thanks Given: 57,495
Thanks Received: 26,291



vmodus View Post
We develop strategies in both EasyLanguage and PowerLanguage. 14 is the gold standard for length, of course, but that doesn't make it right for all purposes. Personally I set aside ADX a few months ago, as I wasn't able to easily integrate it into my strategies. Like you, it seemed like a lot of noise.

For unrelated reasons I was thinking about the default of 14 that you often see in settings on indicators the other day, and as it happens I am familiar with where that number came from.

Welles Wilder, who invented a bunch of indicators (long ago, in the 1970's I recall) including: ATR, RSI, ADX, Parabolic SAR and others, and who was an early user of his own version of ema's (when most were using only sma's) believed that commodities markets had a natural (wait for it) 14-day cycle. Yes, day. So, since he was writing indicators mainly for daily charts, he thought 14 was the right number. I'm not sure if he thought this because a 14 day average would largely suppress a 14-day cycle, which it would, or because he thought that what he was writing would be responsive to a 14 day cycle if he used 14 for the length (I don't think they would), but it doesn't matter, because the "cycle" he had in mind was 14 days.

Now we see 5-minute charts with 14-bar settings on indicators simply because it's the default. Or 1-minute charts with 14, or 2000 tick charts with 14, and even daily charts with 14. No one knows why, or few do, but it's the default, and you have to use something....

I think these lengths work, or not, only because they are kind of short-term, and if the trader wants short-term on that particular chart, it's what he's looking for. Or, if a trader wants long-term, maybe he chooses something longer, like 50, and then it fits because it is longer-term (slower to change) -- I don't think the actual number means anything at all, outside of "kind of short-term, or kind of long-term," depending on your preference. I think this is why such an arbitrary number as 14 still persists -- it's kind of short term and it works well enough for that (assuming the indicator works at all, another question.) For that matter, many indicators have default settings of 10. Why? Well, it's kind of a convenient number, and it's kind of short-term, and it's a round number, and somebody used it before as the default, and so on.

I would not worry about optimal settings at all. I would just try a few and see what they get you. For different applications, for different market conditions, for different markets, and for different trading styles, you may find one works better than another. Use that until it doesn't work any more. The markets will change at some point, and it may no longer fit what you're doing. Then change.

Just my 2 cents. But the historical tidbit about 14 is genuine, if trivial.

Bob.

When one door closes, another opens.
-- Cervantes, Don Quixote
Reply With Quote
Thanked by:
  #4 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


bobwest View Post
For unrelated reasons I was thinking about the default of 14 that you often see in settings on indicators the other day, and as it happens I am familiar with where that number came from.

Welles Wilder, who invented a bunch of indicators (long ago, in the 1970's I recall) including: ATR, RSI, ADX, Parabolic SAR and others, and who was an early user of his own version of ema's (when most were using only sma's) believed that commodities markets had a natural (wait for it) 14-day cycle. Yes, day. So, since he was writing indicators mainly for daily charts, he thought 14 was the right number. I'm not sure if he thought this because a 14 day average would largely suppress a 14-day cycle, which it would, or because he thought that what he was writing would be responsive to a 14 day cycle if he used 14 for the length (I don't think they would), but it doesn't matter, because the "cycle" he had in mind was 14 days.

Now we see 5-minute charts with 14-bar settings on indicators simply because it's the default. Or 1-minute charts with 14, or 2000 tick charts with 14, and even daily charts with 14. No one knows why, or few do, but it's the default, and you have to use something....

I think these lengths work, or not, only because they are kind of short-term, and if the trader wants short-term on that particular chart, it's what he's looking for. Or, if a trader wants long-term, maybe he chooses something longer, like 50, and then it fits because it is longer-term (slower to change) -- I don't think the actual number means anything at all, outside of "kind of short-term, or kind of long-term," depending on your preference. I think this is why such an arbitrary number as 14 still persists -- it's kind of short term and it works well enough for that (assuming the indicator works at all, another question.) For that matter, many indicators have default settings of 10. Why? Well, it's kind of a convenient number, and it's kind of short-term, and it's a round number, and somebody used it before as the default, and so on.

I would not worry about optimal settings at all. I would just try a few and see what they get you. For different applications, for different market conditions, for different markets, and for different trading styles, you may find one works better than another. Use that until it doesn't work any more. The markets will change at some point, and it may no longer fit what you're doing. Then change.

Just my 2 cents. But the historical tidbit about 14 is genuine, if trivial.

Bob.

Thanks @bobwest for the insight, I was thinking about the Wilder number after I posted and I'm glad you mentioned it.

If you follow the fractal theory of markets, the number 14 should be important at any timeframe, even at the tick level. Scale in, scale out, it should not matter.

Then with that being said, on the subject of fractals, the number 13 may be more significant (part of the Fibonacci sequence) than 14. However, if I spend too much time thinking about numbers in such a way, it feels like I'm going down a numerology wormhole.

~vmodus

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #5 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,172 since Jan 2013
Thanks Given: 57,495
Thanks Received: 26,291


vmodus View Post
Then with that being said, on the subject of fractals, the number 13 may be more significant (part of the Fibonacci sequence) than 14. However, if I spend too much time thinking about numbers in such a way, it feels like I'm going down a numerology wormhole.

~vmodus

You wouldn't be the only one.

Bob.

When one door closes, another opens.
-- Cervantes, Don Quixote
Reply With Quote
  #6 (permalink)
 
ernald's Avatar
 ernald 
Austin TX
 
Experience: Intermediate
Platform: Multicharts C#
Broker: Interactive Brokers + IQFeed
Trading: Futures, stocks, options
Posts: 6 since Jul 2020
Thanks Given: 7
Thanks Received: 4

thank you both for your replies. Really interesting about Wilder and the history of 14. So far, I haven't found a practical way to use ADX. Seems like a simple linear regression is more helpful.

Started this thread Reply With Quote
  #7 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


ernald View Post
thank you both for your replies. Really interesting about Wilder and the history of 14. So far, I haven't found a practical way to use ADX. Seems like a simple linear regression is more helpful.

You are welcome. Where can I learn more about linear regression with respect to trading? I am always wanting to learn something new.

~vmodus

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #8 (permalink)
 
ernald's Avatar
 ernald 
Austin TX
 
Experience: Intermediate
Platform: Multicharts C#
Broker: Interactive Brokers + IQFeed
Trading: Futures, stocks, options
Posts: 6 since Jul 2020
Thanks Given: 7
Thanks Received: 4


vmodus View Post
You are welcome. Where can I learn more about linear regression with respect to trading? I am always wanting to learn something new.

~vmodus

In Multicharts, checkout the linear regression indicators that come out of the box. They have a straight one (which I haven't really been able to make use of, but I'm sure is useful for identifying trends), and a curved one. The curved one isn't much different than a moving average, but rather than averaging price, it just seeks to find the most centered line through a series of data. This makes it more sensitive to price extremes than a MA. I've made my own custom indicator which takes curved linear regression lines of two different lengths and subtracts them in an attempt to find reversals. This is akin to a 200 and 50 dma type of thing, but I feel the linnear regression is quicker to react, so maybe more appropriate for shorter timeframes? I'd recommend just playing with them in MC to get a feel for them. Alternatively you could get some data into an Excel spreadsheet and they have built-in linnear regression formulas to play with. :-)

Here's an example for me in Multicharts. This is /MES the last week or so on a 100-tick chart. I have both a curved linnear regression (WHITE) and a moving average (YELLOW). They are both length = 7000 . As you can see the linnear regression is more sensitive as it seeking to find a line with the least distance from each point within those 7000 ticks... a different (and more arithmetic-intensive) calculation than a simple moving average.


Started this thread Reply With Quote
Thanked by:
  #9 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


ernald View Post
In Multicharts, checkout the linear regression indicators that come out of the box. They have a straight one (which I haven't really been able to make use of, but I'm sure is useful for identifying trends), and a curved one. The curved one isn't much different than a moving average, but rather than averaging price, it just seeks to find the most centered line through a series of data. This makes it more sensitive to price extremes than a MA. I've made my own custom indicator which takes curved linear regression lines of two different lengths and subtracts them in an attempt to find reversals. This is akin to a 200 and 50 dma type of thing, but I feel the linnear regression is quicker to react, so maybe more appropriate for shorter timeframes? I'd recommend just playing with them in MC to get a feel for them. Alternatively you could get some data into an Excel spreadsheet and they have built-in linnear regression formulas to play with. :-)

Here's an example for me in Multicharts. This is /MES the last week or so on a 100-tick chart. I have both a curved linnear regression (WHITE) and a moving average (YELLOW). They are both length = 7000 . As you can see the linnear regression is more sensitive as it seeking to find a line with the least distance from each point within those 7000 ticks, a different (and more arithmetic-intensive) calculation that a simple moving average.


Wow, thank you so much. We bought MultiChart licenses in April and I am starting to use if for trading Forex (I use TradeStation for futures.... for now....). This is very interesting stuff.

~vmodus

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #10 (permalink)
 
ernald's Avatar
 ernald 
Austin TX
 
Experience: Intermediate
Platform: Multicharts C#
Broker: Interactive Brokers + IQFeed
Trading: Futures, stocks, options
Posts: 6 since Jul 2020
Thanks Given: 7
Thanks Received: 4



vmodus View Post
Wow, thank you so much. We bought MultiChart licenses in April and I am starting to use if for trading Forex (I use TradeStation for futures.... for now....). This is very interesting stuff.

~vmodus

you're welcome. Let me know if you end up finding it useful.

Started this thread Reply With Quote
Thanked by:




Last Updated on July 24, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts