• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 10:14am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 10:14am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Average True Range 7 replies

Average True Range Channel Indicator 4 replies

average true range for 1 hour and 4 hour charts 2 replies

Average true range ratio 5 replies

Average True Range 1 reply

  • Trading Discussion
  • /
  • Reply to Thread
  • Subscribe
Tags: Calculation of Average True Range (Wilder)
Cancel

Calculation of Average True Range (Wilder)

  • Last Post
  •  
  • Page 1 2
  • Page 1 2
  •  
  • Post #1
  • Quote
  • First Post: Jan 6, 2008 9:41am Jan 6, 2008 9:41am
  •  fintrans
  • | Commercial Member | Joined May 2007 | 156 Posts
Hi,

I have a question for the mathematically 'gifted':

J. Welles Wilder's Average True Range calculation as per his book 'New Concepts In Technical Trading Systems' is as follows:

(Let's assume a 14 day period for the calculation)

ATR(Latest) = ( 13 X ATR(Previous) + True Range(Today) ) / 14

Right??? Common knowledge??? Right???

BUT (here's the problem / question):

Remember that the idea of doing it this way (above) was so that you did not have to keep track of 13 or 14 days worth of data every time (day) you did the calculation (when Wilder devised his ATR calculation the most powerful tool available to him at the time was a calculator) i.e. to simplify things on a daily basis it was (is) easier to just take the previous ATR, add the TR for today, and divide by 14

BUT:

The above DOES NOT give the same result as adding up the TR for the previous 14 days and dividing by 14 every time (day) you do the calculation i.e. every subsequent day that you do his original calculation you are compounding rounding errors and over time the errors become quite 'noticeable' (for want of a better description).

My question is this:

Am I right or wrong? If you think I'm wrong - tell me why.

Also - what do you think of this statement:

By performing the calculation the (his) original way i.e. by taking the previous ATR, adding the current TR, and then dividing by 14 - you are in effect applying 'smoothing' to the equation.

Why is any of this important you may ask???

Well - I've spent a good part of the last month 'programming' his systems into one of my trading platforms and it has become very apparent to me that using the 'standard' ATR / Parabolic SAR / True Range 'indicators' supplied with your (my) trading systems (platforms) the results are quite different from his original work (I have questioned Parabolic SAR at a few brokers for the past year or so). I have three different trading platforms (three different brokers - and one of them is an MT4 broker) and not a single one of the results given by any of them are exactly equal to what the results SHOULD be when manually calculating the ATR (for example) on paper (or using Excel) as per his original work. If you think I'm talking nonsense - have a look see - you'll be 'gobsmacked'!!!

Are these 'variations' or 'errors' 'material' in nature i.e. are they big enough to cause losses / bad trades? My (I) jury is still out on this BUT what if you are relying (for example) on the results of Wilder's ADX or DMI as presented by your trading platform and it's wrong??? What if Parabolic SAR is getting you in too early or out too late because the calculation that has been 'thrown' into your trading platform is incorrect??? Believe me - it's possible!!!

Thanks for reading this far!!!

Dale.
  • Post #2
  • Quote
  • Jan 6, 2008 3:00pm Jan 6, 2008 3:00pm
  •  Ted1983
  • | Joined Oct 2006 | Status: Britunculus | 940 Posts
Hi,

Nice observations. Maybe you could create a renaissance in keeping hand drawn charts. I might try it, could be an good aid to concentration.
 
 
  • Post #3
  • Quote
  • Jan 6, 2008 4:30pm Jan 6, 2008 4:30pm
  •  fintrans
  • | Commercial Member | Joined May 2007 | 156 Posts
Hey Ted,

Thanks for the reply.

I'm not kidding though i.e. if you have a very close look at the calculation and 'manual' plotting of Parabolic SAR for example - you'll note that Parabolic SAR does not just accelerate 'blindly' by the step factor contrary to popular belief i.e. Parabolic SAR when calculated manually and plotted manually on a chart will 'back off' now and then thus avoiding (many) whipsaws but on all three of my trading platforms it just keeps accelerating 'blindly' by the step factor which is not the way it was originally designed. The only way it will keep accelerating and producing a 'perfect parabola' is if every bar in the trend has the identical range and closes higher (or lower) by exactly the same amount as the previous bar. This I proved (manually) on more than one occasion last year and because of this I now verify the results of any indicator that I choose to use manually before taking the trading platforms word for it. Painful (pedantic?) I know. Does it make a difference? With Parabolic SAR it most certainly it does.

Dale.
 
 
  • Post #4
  • Quote
  • Jan 29, 2009 8:55am Jan 29, 2009 8:55am
  •  nonlinear
  • Joined Sep 2007 | Status: simmer down now | 1,251 Posts
How do you take into account Sunday candles?
 
 
  • Post #5
  • Quote
  • Jan 29, 2009 9:00am Jan 29, 2009 9:00am
  •  nonlinear
  • Joined Sep 2007 | Status: simmer down now | 1,251 Posts
I think the safer approach is to calculate your own ATR per Wilder's formula.
 
 
  • Post #6
  • Quote
  • Jul 17, 2011 1:20am Jul 17, 2011 1:20am
  •  Forexia
  • Joined Jun 2010 | Status: Member | 3,896 Posts
Quoting fintrans
Disliked
Hi,

I have a question for the mathematically 'gifted':

J. Welles Wilder's Average True Range calculation as per his book 'New Concepts In Technical Trading Systems' is as follows:

(Let's assume a 14 day period for the calculation)

ATR(Latest) = ( 13 X ATR(Previous) + True Range(Today) ) / 14

Right??? Common knowledge??? Right???

BUT (here's the problem / question):

Remember that the idea of doing it this way (above) was so that you did not have to keep track of 13 or 14 days worth of data every time (day) you did the calculation (when...
Ignored
Not sure if anyone answered this or not but I will try to put in my two cents according to what I just learned from this website.

This "smoothing" formula is correct is sense that Wilder does want to incorporate the previous ATR values in the calculation of current ATR values to make the ATR as a smoothed version of the moving average of ATR. BUT this formula only kicks in after period 14 (the default period) or whichever period that you specify.

Before period 14 or whatever your choice of period (let's assume it's also 14 for simplicity), the formula for calculating ATR is simply:

Sum of TR / 14

Hope this helps. The website link to this info. is:

http://www.meta-formula.com/average-true-range.html


Good pipping!
Make your losses in demo. Earn your profits live.
 
 
  • Post #7
  • Quote
  • Edited 3:14am Jul 17, 2011 2:57am | Edited 3:14am
  •  fintrans
  • | Commercial Member | Joined May 2007 | 156 Posts
Hello,

Geez: talk about a 'corpse thread' 'coming back to life'!!! LOL!!!

Thanks for the input though Forexia.

I'm not 'mathematically gifted' but I AM a 'Wilder Expert' or 'Wilder Junkie' i.e. I've 'stuck' with his stuff since 'day dot' (which is NOW about six or seven years now) so I know the contents and nuances of each of his systems BACKWARDS!!! LOL!!!

Here's some useful (useless???) information for you:

Wilder's 'smoothing' is nothing more than this:

It's DOUBLE the EMA of the PERIOD MINUS ONE.

In other words a Wilder 'smoothed' ATR formula would look something like this:

LASTCLOSE := REF(CLOSE,1);
TRUERANGE := MAX(HIGH-LOW,ABS(LASTCLOSE-HIGH),ABS(LASTCLOSE-LOW));
ATR := EMA(TRUERANGE,(Period*2)-1);

(The above is a 'subset' of C# code but I believe it's self explanatory).

The ONLY difference is that if you use Wilder's MANUAL method (as detailed in 'New Concepts In Technical Trading Systems') you will get different results for the first few bars (normally the results for the first few bars for the period being used will be different) as you have to wait for the EMA to 'settle down'. But after that the results become IDENTICAL to the book (and let's face it you're not ever going to be looking at a chart with only 14 bars on it)!!! LOL!!!

The above applies to ALL of the calculations where Wilder's 'smoothing' is required.

Actually I'm glad you've brought this up. DID YOU KNOW that the ATR calculations in MetaTrader 4 are WRONG (for this VERY reason)??? Take a look at the code. Wilder's 'smoothing' is NOT implemented in the standard ATR indicator code as supplied with MetaTrader 4. It's ALSO not implemented in MetaTrader 4's ADX. That's why you'll notice that ADX in MetaTrader 4 is a LOT more 'choppy' than what ADX is SUPPOSED to be. SOMEHOW though: they managed to get RSI correct!!! Go figure!!! LOL!!! Does it make a difference??? 'Hell yeah'!!! Without the Wilder 'smoothing' you get whipsawed 'left, right, and center'.

I sort of 'skimmed over' this 'corpse thread' before posting this post and remember seeing something about 'Sunday Candles'. Believe it or not: I asked Wilder HIMSELF (I got in contact with him via his 'Delta Society' organization) to ask him about this and to my surprise he responded to me via his son Andrew (and THAT, let me tell you, earned him MUCH respect and is more than I can say for some of these other 'market gurus'). Wilder said to IGNORE the Sunday Candles. Remember: Wilder was a commodities and futures trader so he never HAD the problem of 'Sunday Candles'. And believe me when I say it DOES make a BIG difference. The problem is: how to eliminate them in your code??? Fortunately I've not had that problem for years now because I don't have 'Sunday Candles' on my charts. But I CAN tell you that when testing his systems on brokers that DO show 'Sunday Candles' it TOTALLY 'upsets' things. I've proved, for example, that it totally 'screws' with a system like the Turtles Trading System or Donchian Channels and stuff like that (not to mention with Wilder's Systems). Take the channels for example: for the most part you'll be looking for a new 20-day high or 20-day low. If you're being shown 'Sunday Candles' YOUR 20-day high or 20-day low is 'arriving' one day EARLY i.e. you have an extra (almost meaningless) bar in you chart. My 'workaround' for THOSE types of systems (IF you're being shown 'Sunday Candles' is to look for a new 21-day high or 21-day low. But it's only a 'workaround' not a 'solution'. The 'solution' is to find a broker that does NOT show you 'Sunday Candles' (in FOREX) OR to trade equity futures and commodities (on-exchange traded instruments) as I do. Why??? Because you have 'fixed' opening and closing trading times. What does this mean??? It means that no matter where in the world you are you are seeing the exact same chart as any other trader trading the same instrument. With FOREX: you have as many different 'variations' of charts as you have brokers in different timezones due to the fact that the daily charts close at different times at these different brokers in the different timezones. And it DOES make a difference UNLESS you're trading the 1-hour timeframes and shorter in which case you SHOULD be seeing the same data as everyone else. But I digress (sorry: I do that SOMETIMES)!!! LOL!!!

Anyway: I hope this post helps somebody sometime in the future.

In my opinion: Wilder was, is, and always will be, THE 'market technician' of all time.

But beware: there are a couple of things (inaccuracies or things that are easily misunderstood) in the book (Wilder's 'Capital Management' for one). But if anybody is interested in the work of 'the old man' (as I affectionately call him) I have forums that are pretty much 'dedicated' to his trading systems (techtradercentral.proboards.com) (I THINK the link is in my signature on these forums too if memory serves me correctly i.e. I don't post here too often and the only reason I was made aware that there had been some 'life' 'breathed back' into this thread is because I must have 'subscribed' to it back in 2008). Also BEWARE: don't bother trading ANY of Wilder's systems on any timeframe shorter that the daily timeframe. You'll get 'chopped up' quicker than you thought possible (trust me on this one too). Put another way: the 4-hour timeframe??? MAYBE (I've had some nice trades on the 4-hour timeframe). But anything shorter: be prepared to become frustrated. You won't LOSE money but you won't MAKE money either i.e. the SARs (Stop and Reverses) 'chop you up' on the shorter timeframes unfortunately.

Regards,

Dale.
 
 
  • Post #8
  • Quote
  • Edited 6:35am Jul 17, 2011 6:25am | Edited 6:35am
  •  stevegee58
  • Joined Oct 2005 | Status: Pip Slappa Extrordinaire | 1,012 Posts
I'm a programmer by trade and I've noticed differences between platforms in the results of various indicators myself. Such things drive me crazy because I assumed that whoever implemented the indicators was actually faithful to whatever source information was available. It turns out that programmers frequently take shortcuts in order to reduce code complexity (or just lazy). As long as it's "close enough" it passes qual testing.

A few years ago I used a technical analysis library called ta-lib, an open source library written in C. The beauty of open source projects like this is that many eyes are looking at the code. Their implementations are more likely to be correct because of this, or at least if there's a problem you can fix it yourself.

I just re-visited the ta-lib web site and was delighted to see how many languages they've ported to now: (C/C++, Java, Managed .NET, Perl, Python) There's also an Excel add-on which I did use back when I was active with this. There is a free open-source version and a commercial version. Good stuff.
You are in a maze of twisty little passages, all alike.
 
 
  • Post #9
  • Quote
  • Edited 9:50am Jul 17, 2011 9:38am | Edited 9:50am
  •  fintrans
  • | Commercial Member | Joined May 2007 | 156 Posts
Hi,

Nice to 'meet' you and nice reply.

I too have been horrified at some of the 'workarounds' that I've seen. Wilder's ASI (which is the 'core' of his Swing Index System) being the most horrifying I've seen. If you look at the formula it starts with 50 * (the result of 'a whole bunch of calculations' divided by another result of 'a whole bunch of calculations') and that result is then multiplied by the result of another 'whole bunch of calculations' divided by the LIMIT MOVE. So the 'expert in question' simply decided that seeing as there is no LIMIT MOVE in FOREX decided to divide the 50 by 3 (3 being the LIMIT MOVE that Wilder used AS AN EXAMPLE) and simply dropped the rest of the calculation. The end result is that the signals generated were nowhere NEAR what they SHOULD be (which of course results in losses). Parabolic SAR (as I think I may have mentioned some years ago on this thread or somewhere else anyway) is another 'favourite' of mine!!! And that's just WILDER'S stuff I've spent years on. WHO KNOWS about other stuff??? LOL!!! Sometimes I've wondered if it's not 'by design'. I mean to say: can any person in their right mind at MetaQuotes honestly tell me that after ALL THESE YEARS (ADX has been around since 1978) that nobody has told them or that they don't know that the calculations for ADX and ATR are not 'Wilder correct'??? I MYSELF once tried to REMOVE Wilder's 'smoothing' from RSI to generate more signals for a particular system. DISASTER!!! 'The man' knew what he was doing and I'm sure before writing his book he experimented with every manner of calculation before publishing it. There was a time where I thought that his 'smoothing technique' was simply designed or implemented to save time (remember he used to plot charts MANUALLY on graph paper and only received completed charts delivered to his office every Monday morning for the previous week) but I'm sure NOW that wasn't the reason.

But thanks for mentioning that site ('ta-lib'). It sure sounds like 'my cup of tea' so I'll go 'have a look see' after clicking the 'Submit Reply' button.

Keep in touch!!!

Regards,

Dale.
 
 
  • Post #10
  • Quote
  • Jul 17, 2011 11:37pm Jul 17, 2011 11:37pm
  •  Forexia
  • Joined Jun 2010 | Status: Member | 3,896 Posts
Yes me too. I have noticed quite a few comments pointing out the discrepancies in ATR calculations hence the different results depending on which trading platforms you use. I have seen people pointing out that the ATR values in the Oanda Java platform is wrong too.

I am going to stick with the formulas that I read in the stockcharts website that I quoted in my previous comment and reprogram the one in C# in the platform that I use. I find the formula for ATR after period 14 or whatever your own period is more of a recursive one.

I thought this thread has some really detailed and useful info. about ATR so I thought I replied to it. Glad you liked it.
Make your losses in demo. Earn your profits live.
 
 
  • Post #11
  • Quote
  • Jul 18, 2011 2:25am Jul 18, 2011 2:25am
  •  fintrans
  • | Commercial Member | Joined May 2007 | 156 Posts
Hello again.

Thanks for posting again (and as a matter of fact thanks for resurrecting this thread i.e. it will at least be noticeable for a while to the next batch of new and unsuspecting traders).

To me (now anyway, after all this time) it's not so much that the indicators are wrong it's the principle of the thing. If you have just started trading you just ASSUME (and why SHOULDN'T you) that whatever your trading platform / broker is presenting to you is correct. It's difficult enough to make it in this business without having to worry about the darn software that you're using. THAT is what upsets me the most.

Now I know that there are many professional traders that trade only price action and don't use indicators so of course none of them would be affected by this. But the vast majority of new traders WILL start out with an indicator based system (and some of the 'not so new anymore' like myself still use indicator based systems and these little 'mistakes' do make a difference. Sometime slight. Sometimes not so slight.).

I for one use volatility based stops (a percentage of ATR). I've proved (when I use the word 'proved' I mean 'paper traded' and I mean that literally) that using the incorrect ATR formula can make the difference many times as to whether you get stopped out prematurely or not.

Wilder's Directional Movement System based on ADX: alright most people have just 'read somewhere' that if +DI is above -DI you go long and the opposite for short. First: there's a LOT more to it than that (and if anybody is interested in Wilder's work his book can be downloaded from my forums i.e. it's no longer subject to copyright because it's so old so don't worry: you're not breaking any laws but be careful with some of the others available and make sure to read my 'disclaimer' and 'advice' on 'fairness'). If you trade Wilder's Directional Movement System with the INCORRECT (MetaTrader 4 as an example) ADX indicator you'll get whipsawed 'like it's the new fashion'. And that particular indicator has so many little 'nuances' that are NOT covered in these short, 'broker supplied, synopsis'!!!

Same thing (as above) with Parabolic SAR. Note how Wilder designed and traded it i.e. it's NOT the simple 'go long when a dot appears below the signal bar' (and the opposite for going short) (and this is ASSUMING that the Parabolic SAR indicator calculation on your platform is CORRECT)!!! LOL!!!

Same thing with RSI. It's probably one of the MOST misused and misunderstood indicators around. As but one example: NOWHERE does Wilder even mention that an RSI reading above 50 indicates an uptrend and RSI below 50 indicates a downtrend. Just do a search and you'll be surprised how many trading systems are based on this EXACT principle!!!

Alright: we're dealing with TWO things here (at least insofar as Wilder is concerned i.e. lack of knowledge and research on the part of the trader and trading platforms where the calculations are questionable).

And of course: I'm going on about Wilder here because I'm biased and believe in his work and am testament to it's profitability but I'm sure these little 'mistakes' apply 'across the board'.

And of course there's my FAVORITE 'bugbear' and that's automated backtesting software in particular MetaTrader 4's Strategy Tester. I know it looks like I'm having a 'go' at MetaTrader 4. I'm not but I've sure gotten some REAL 'interesting' results and is one of the reasons why I always advise a new trader to PAPER TRADE their system and forget about writing an EA and running it through the Strategy Tester with 'optimization' and then assume that they're going to be profitable using the parameters that MetaTrader 4 'spat out'. About two years ago: two 'trader friends' of mine in different countries (me in South Africa, one in Finland, and another one in Italy) did a test using the Strategy Tester. We opened demo account at the SAME broker, used the EXACT same EA, the EXACT same timeframes, and the EXACT same periods for testing. You won't believe me if I tell you that all three of us got different results no matter HOW many times we ran the tests. And if THAT was not bad enough: we did the EXACT same experiment two weeks later and got DIFFERENT individual results from the first tests (and of course each of our results were still different). Now THAT I'm afraid is really a bit worrying (to me anyway). At the time one of us contacted both the broker and MetaQuotes to as the proverbial 'WHY' i.e. how is this possible??? We're STILL waiting for a reply from either!!!

And any new traders reading this: don't think I'm posting this because I'm a 'bitter trader'. Yes: I lost a LOT of money in this business in my first two or so, maybe even three, years (and I'm not talking 'small change' here i.e. let's just say that we're talking 'epic proportions' i.e. I'm an 'all or nothing type') and those losses I cannot honestly attribute to the topic of this thread i.e. they were mostly attributable to trying to be too 'smart', ignoring money and risk management, not using stops, cutting winners short and letting losers run, all the 'usual'. But I will say this: the topic of this thread didn't help matters that's for sure. Some people will say that a bad broker will not cause you to fail. Only you can be the cause. I do agree with that. However: a bad broker (or incorrect calculations or bad software) most CERTAINLY doesn't help matters. THAT I can tell you.

And 'at the end of the day' and as I said above (back to the topic of the thread): it's the PRINCIPLE that 'gets to me'. A new trader has SO much to contend with (trader psychology, finding a decent trading system, that type of thing). That LAST thing they should have to worry about is what is being presented to them by their platform.

But GOOD TRADING to everyone. When you're feeling 'down' and feeling 'I'm NEVER going to get this right' then feel free to contact me. I'm most certainly not 'trader of the decade' but I'm a good listener and I've felt that way MANY times but I assure you: with enough time and dedication it CAN be done.

Regards,

Dale.
 
 
  • Post #12
  • Quote
  • Jul 18, 2011 1:34pm Jul 18, 2011 1:34pm
  •  Forexia
  • Joined Jun 2010 | Status: Member | 3,896 Posts
Well one thing that I find with trading with indicators is that you can't blindly apply them to your trading according what the creator has specified. You have to use the indicators in a way that fits your trading and you can't go the other way around, fit your trading to the indicator which is usually how we start with any indicators. That's how you lose money.

I still use an indicator-based trading system but I am not using ANY of the indicators according to what the creator has specified in their books or studies.
Make your losses in demo. Earn your profits live.
 
 
  • Post #13
  • Quote
  • Jul 18, 2011 1:54pm Jul 18, 2011 1:54pm
  •  fintrans
  • | Commercial Member | Joined May 2007 | 156 Posts
Hello again.

You make a very good point(s). I have to admit that I myself apply a 'variation' or two to Wilder's systems (not changes to the formulas of the relevant indicators but rather their implementation). But overall (in my case anyway) that applies really only to two of his systems. The others I trade 'as is' with little to no problems. Then again (as I've probably mentioned before): I trade his systems on instruments that they were DESIGNED to be traded with (I don't, as a rule, trade spot FOREX with them i.e. only equity futures and commodities and I think I've proved beyond a REASONABLE doubt that different markets 'move' in different ways and that's one of the reasons, I believe anyway, that these same systems COST me money on spot FOREX but now MAKE me money on equity futures and commodities).

Regards,

Dale.
 
 
  • Post #14
  • Quote
  • Jul 18, 2011 3:16pm Jul 18, 2011 3:16pm
  •  6pack
  • | Joined Jan 2008 | Status: I am a money magnet! | 173 Posts
Quoting fintrans
Disliked
Hi,
J. Welles Wilder's Average True Range calculation as per his book 'New Concepts In Technical Trading Systems' is as follows:

(Let's assume a 14 day period for the calculation)

ATR(Latest) = ( 13 X ATR(Previous) + True Range(Today) ) / 14

Right??? Common knowledge??? Right???

BUT (here's the problem / question):

Remember that the idea of doing it this way (above) was so that you did not have to keep track of 13 or 14 days worth of data every time (day) you did the calculation (when Wilder devised his ATR calculation the most...
Ignored
This is due to different approaches to averaging, with Wilder's approach resembling an exponential moving average, and the latter obviously being a simple moving average.

There is no "right" or "wrong" way to take these average, as long as you know what you are doing and what you are trying to achieve. Personally, I am not very fond of what seems to be Wilder's original approach. But as long as you are consistent, and use the same formulas in your indicators, EAs, etc., you probably won't have too much of a problem.

The reason for the "smoothing" is that in the first case, you are only incorporating 1/14 of today's TR into a heavily-weighted ATR, whereas in the case of a SMA, you are both adding today's TR and removing the TR from 15 days ago, rather abruptly. Another reason, according to your more recent post, is that the former actually uses a 27-period EMA for the 14-period ATR...
 
 
  • Post #15
  • Quote
  • Edited 2:34am Jul 19, 2011 2:21am | Edited 2:34am
  •  fintrans
  • | Commercial Member | Joined May 2007 | 156 Posts
Good morning.

You're quite correct: Wilder's 'smoothing' equates to nothing more than (after a couple of bars in beginning anyway) doubling the period of the EMA and subtracting 1 from the result (basically just using a longer EMA). At first: I myself thought that his method of doing his calculations were simply to save time (he used a calculator remember) and that the 'smoothing' was simply a 'byproduct'. I still don't have that answer (and I'm sure not going to email him to ask him)!!! LOL!!! What I DO know is this though: me, like every other trader, has gone through that 'impatient phase' (in my case more than once) i.e. not being given enough signals. So (again more than once) I've experimented by 'removing the 'smoothing' (that rhymes)!!! LOL!!! The end result WITHOUT FAIL was obviously MORE but FALSE signals (which inevitably resulted in losses). (You must remember I've been 'at' Wilder's stuff for years now i.e. a while before I started this thread, and ever since starting it, so I've had the time to do my fair bit of experimentation)!!! LOL!!!

In the case of ATR: I cannot HONESTLY tell you that it makes THAT much difference (which I'm sure you already know). But there's no doubt in mind that RSI and ADX are pretty useless without his 'smoothing'. Well put another way: technical trading systems BASED on those indicators become useless without his 'smoothing'. A good example (that I've 'played with' and trade extensively) is a system called the 'RSI Rollercoaster' (eveloped by Kathy Lien and Boris Shchlossberg and is freely available on my forums or on the Internet just about everywhere you look. It's actually detailed in a 'public domain' Investopedia e-book and there's some jolly good systems in there although the RSI Rollercoaster is the only one I use). At first I got frustrated because using Wilder's 'smoothed' RSI APPEARED to be keeping me out of some good trades. So, of course, in a crass attempt to 'turn things up a notch', I removed Wilder's 'smoothing' from RSI. The end result: I got LOADS more trades. The problem??? The win/loss ratio 'dropped like a stone'!!! LOL!!!

I tried the same with Wilder's Directional Movement System (based on ADX). At first I thought 'what a winner' (after I'd removed the 'smoothing') and then the whipsaws started eating away at my account.

So: as for there being a 'right' way or a 'wrong' way I'm not sure and don't feel qualified to comment. Put another way: all I know is that with my choice or 'basket' of trading systems Wilder's 'smoothing' does make a difference in the long run.

Judging from your number of posts and making the assumption that you're an experienced trader then what I'm about to say you already know. But to a new trader: it's a real challenge to NOT trade or to FORCE signals JUST to be in a trade (I still 'suffer' from a 'spinoff' of this i.e. I cannot sleep unless I have at least just ONE trade on no matter how small)!!! LOL!!! BUT: I don't FORCE signals or 'see' signals that just are not there. That's the difference (and it's taken me a LOT of time and a LOT MORE money to get there)!!! LOL!!!

But like I said: to me it's not so much that there are 'mistakes' or 'differences' in calculations as supplied with the various trading platforms. but I DO think it would more fair on the part of the broker concerned to make the (new???) trader aware of these differences. I, for example, in all my MetaTrader 4 installations (mainly only used for support or comparison purposes), have ATR 'as supplied' and then 'ATR Smoothed' (I just took the original ATR and 'smoothed' it using Wilder's 'smoothing' technique or, more to the point, changed the 'MODE_SMA' to 'MODE_EMA' and changed the 'Period' to '(Period * 2) - 1'. Nothing major. All I'm saying is that I think there should be a bit more 'transparancy' is all and I think that would be only fair. I've not bothered to go through ALL of MetaTrader 4's indicators (again I'm only using MetaTrader 4 as an example and THAT only because that's the only other platform I have any reason to work with on occasion) but I've always found myself wondering just how many of the OTHER indicators MAY have incorrect calculations in them. That type of thing.

Let's face it though: while I'm enjoying very much participating in this thread and am pleased that it was 'resurrected' there are indeed WAY more factors that may be WAY more important than the odd indicator value being incorrect by a few points. 'Broker tricks', different timezones, 'Sunday Bars', the list (for spot FOREX trading anyway) is endless!!! LOL!!! As a good example: RIGHT NOW I'm involved with a little 'experiment' i.e. I'm having to 'convert' all my indicators from our proprietary trading platform to MetaTrader 4. So I'm testing (and unfortunately my testing is limited to testing on FOREX pairs). SAME trading systems in use, same instruments, same parameters, etc. At one (demo) broker I have some signals at certain places and at another (demo) broker I either have NO signals or signals at different places. I've checked that at any given time the price quotes are (almost) identical (maybe a pip or two difference is all) so that's not the problem. The problem is twofold: one broker shows no 'Sunday Bars' and the brokers are in different timezones so the daily open, high, low, and close are different between the brokers. My point is with spot FOREX you ALREADY have a few things 'stacked' against you before you even OPEN an account. My PERSONAL opinion is that instead of the US regulators worrying about 'protecting the consumer' by imposing restrictions on the TRADER they should take a look at the BIGGER picture. The FIRST thing they should do (or maybe WE should all 'lobby' for this) is that ALL brokers EVERYWHERE close their daily charts at EXACTLY the same time no matter WHERE in the world they are. Believe me: that would help a LOT of traders out INCLUDING price action traders or chart pattern traders!!! I mean (off topic again I guess): another test I've done MORE than once is take the SAME trading system, same parameters, and same instruments, and (my personal feelings about MetaTrader 4's Strategy Tester aside) run the system through three or four different brokers (making the assumptions that at very LEAST the price quotes are the same or VERY similar at best). The result: an overall loss at one or two brokers and nice profits at another (those were not the EXACT results but you 'get the picture'). The only difference (theoretically)??? The fact that each broker was in a different timezone so the 4-hour and daily timeframes closed at different times (one broker was 8 hours behind the other). When you start 'summing' all of these 'anomolies' you cannot help but 'wonder' about spot FOREX trading and your chances of success (and this is BEFORE you've even ATTEMPTED to master this 'thing' of 'trader psychology')!!! LOL!!!

Anyway: there's my 'few dollars worth'.

Regards,

Dale.
 
 
  • Post #16
  • Quote
  • Sep 11, 2011 5:31pm Sep 11, 2011 5:31pm
  •  mooselover
  • | Joined Jan 2009 | Status: Member | 23 Posts
I enjoyed this thread and am now yearning for the mq4 versions of the ADX and PSAR indicators with the correct math based on Wilder. Can someone supply or point in the right direction? Thanks
 
 
  • Post #17
  • Quote
  • Sep 12, 2011 6:05am Sep 12, 2011 6:05am
  •  deltatrade
  • Joined Mar 2010 | Status: natural medicine | 643 Posts
an observation which i found very usefull is on thinkorswim platform. this platform has 2 Atr. average true range and atrwilder and they are different. avearage true range is the same both for thinkorswim and for metatrader.
 
 
  • Post #18
  • Quote
  • Sep 12, 2011 11:16am Sep 12, 2011 11:16am
  •  fintrans
  • | Commercial Member | Joined May 2007 | 156 Posts
Hello,

All the information you need can be found on my forums (techtradercentral.proboards.com) but I did mention that before in a previous post on this very same thread.

As I noted (in MetaTrader 4 anyway) the 'affected' indicators are Wilder's ADX and ATR.

I'm in the process of converting all my (Wilder) indicators and trading systems used with Deltastock's Delta Trading trading platform for use with MetaTrader 4 but unfortunately I'm not 'done' yet and given that MetaTrader 4 doesn't come with the MQL code for ADX it's going to be a total rewrite 'from scratch' unfortunately. Sorry: I know that doesn't help you now but I getting there!!! LOL!!!

If you're any good at coding then just download his book from my forums (and pleae DO note my 'warnings' and 'disclaimers') and code ADX CORRECTLY yourself.

Regards,

Dale.
 
 
  • Post #19
  • Quote
  • Dec 10, 2011 1:09am Dec 10, 2011 1:09am
  •  clc4x
  • | Joined Jan 2010 | Status: L. C. Chong | 882 Posts
As I am in the middle of changing my charting platform from Alpari MT4 to FXCM MT4, due to FXCM MT4 got weekend data (time zone: GMT), I have created one ATR indicator which exclude weekend data from calculation.
I am not sure whether the code is optimized enough, but it works.
 
 
  • Post #20
  • Quote
  • Aug 21, 2012 5:05am Aug 21, 2012 5:05am
  •  bassemfg
  • | Joined Aug 2012 | Status: Junior Member | 1 Post
any chance you can post the C# code to calculate Wilder's average please?
 
 
  • Trading Discussion
  • /
  • Calculation of Average True Range (Wilder)
  • Reply to Thread
    • Page 1 2
    • Page 1 2
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023