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. :-)

The following user says Thank You to ernald for this 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.

If you really want to work with it, maybe you can create an input for the ADX length, then optimize on that. Example:

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

You panic, you die.

The following user says Thank You to vmodus for this 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.

When one door closes, another opens.
-- Cervantes, Don Quixote

The following 3 users say Thank You to bobwest for this post:

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

You panic, you die.

The following user says Thank You to vmodus for this 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.

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.

The following user says Thank You to ernald for this 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.