I'm looking for the Random Walk Index for MT4.
The original formula developed by Mike Poulos used 4 indicators- a short-term period of 1 to 8 bars of the highs and lows, and a long-term indicator of 8 to 64 bars of the highs and lows. Any help appreciated, I do not have the knowhow for MT4 coding. Included is a link to a basic description of the indicator, but please be aware the formula for the long-term calculation at the bottom of the page is incorrect.
Thanks in advance, William
Can U write all orginal (correct) formula?
Or mabye U have a link to it? If so, i think I can help U with that indicator.
Thanks for responding.
As noted in my first post, here's a link to the formula:
but the code for the second part of the indicator is incorrect.
The RWI is a 2-part indicator, and each part has a high RWI and a low RWI.
The short RWI includes the high and low and uses 1 to 8 periods.
The long RWI includes the high and low and uses 8 to 64 periods.
You'll see in the lower part of the link that the code does not reflect this.
It's not a hard indicator to code, but it's very long.
I used to have the code for Metastock, but it's long gone.
I looked all over the web for a MetaStock or Tradestation formula but haven't been able to find one.
Any help appreciated, thanks again.
Random Walk Index
This thread is pretty old and I'm not a coder but I was wondering if anyone would happen to have this indicator stashed away anywhere. There is another thread out there started by raff1410 but the indicator is unfortunately not quite the standard indicator. Raff took the general concept and made a channel-type of system out of it.
It is basically a dynamic ADX that registers inefficiencies in a fixed look-back period by using the average true range as a dyamic telltale for random vs. continuous (predictable) events.
For a visual explaination and technique please refer to here on page 286:
Technical Analysis from A to Z ... - Google Book Search
This is the formula from the following website:
Random Walk Index - MetaStock / Oscillators, indicators, systems for Metastock, Tradestation, Amibroker, Wealth-Lab and Metatrader - forex, futures, stock,commodities.
Max((Ref(HIGH,-1) - LOW) / ((Ref(Sum(ATR(1),2),-1) / 2) * Sqrt(2)),
Max((Ref(HIGH,-2) - LOW) / ((Ref(Sum(ATR(1),3),-1) / 3) * Sqrt(3)),
Max((Ref(HIGH,-3) - LOW) / ((Ref(Sum(ATR(1),4),-1) / 4) * Sqrt(4)),
Max((Ref(HIGH,-4) - LOW) / ((Ref(Sum(ATR(1),5),-1) / 5) * Sqrt(5)),
Max((Ref(HIGH,-5) - LOW) / ((Ref(Sum(ATR(1),6),-1) / 6) * Sqrt(6)),
Max((Ref(HIGH,-6) - LOW) / ((Ref(Sum(ATR(1),7),-1) / 7) * Sqrt(7)),
Max((Ref(HIGH,-7) - LOW) / ((Ref(Sum(ATR(1),8),-1) / 8) * Sqrt(8)),
(Ref(HIGH,-8) - LOW) / ((Ref(Sum(ATR(1),9),-1) / 9) * Sqrt(9)) )) )) )) )
And here is another visual example but the explaination and settings here are not the best:
Investor/RT Tour - Random Walk Index
It seems relatively simple to put together; if any coders have a few minutes to spare the uses are endless and it would be a good add-on to any system. I can help with some explainations if anyone is interested.
I have this one with the following text inside the code:
Thanks for sharing Linuxser...
Just found something interesting related to this subject.
JRC Fractal Dim (indicator).
Article/Author: Mark Jurik, Jurik Research Jurik Research
There is a weak and a strong
way to measure the random
quality of a time series.
The weak way is to use the random walk index (RWI).
You can download it from the Omega web site.
It makes the assumption that the market is
moving randomly with an average distance D
per move and proposes an amount the market
should have changed over N bars of time.
If the market has traveled less, then
the action is considered random, otherwise
it's considered trending.
The problem with this method is that taking
the average distance is valid for
a Normal (Gaussian) distribution of price activity.
However, price action is rarely Normal,
with large price jumps occuring much
more frequently than a Normal distribution
would expect. Consequently, big jumps
throw the RWI way off, producing invalid results.
The strong way is to not make any assumption
regarding the distribution of price changes and, instead,
measure the fractal dimension of the time series.
Fractal Dimension requires a lot of data to be accurate.
If you are trading 30 minute bars, use a multi-chart
where this indicator is running on 5 minute bars and
you are trading on 30 minute bars.[/CODE]
The following table shows how to interpret the results....
2.0 -1.0 0.0 congestion
1.5 0.0 0.5 random walk
[CODE]Remember two important points:
1) Trend is STRONGER when the indicator
is LOWER. If this is confusing, you can
convert Fractal Dimension
to a trend efficiency index
(like Kaufmann's efficiency ratio) this way:
Trend Efficiency = 2 - Fractal Dimension
2) Maxbarsback must be set greater
Our forum threads/posts:
https://www.mql5.com/en/forum/178285 (indicators with explanation)
Thanks New Digital/Linuxser! I agree most of that quote. From a frontward perspective, just looking at the indicator as it is (as in the last link in my post) its no better than an ADX. By extending the high/low periods and weakening the high/low periods (conversely) you have a much better interpretation of the beginning of a lasting trend or a short-term jerk in price.
I've seen it used in several different ways. As with any indicator, interpretation is $. Common sense would keep you out of spikes in price that you would know full well to throw off certain indicators.
I just checked out some of the links you posted here. The ideas in use are somewhat new to me but the math makes total sense.
The indicators themselves look great. Morphine for a nervous trader.
I feel this concept gets overlooked too often, especially in development of trading systems good for trending vs. ranging markets. Especially with the development of an automated strategy, where so many times trades fail due to signals good for ranging conditions or, the other way around, trending conditions.
I'll dig more. If I see anything I'll post.
Many thanks again.
More on the fractal dimension index
Here is a great link on the fractal dimension index from FXStreet, explained by an expert on the subject:
FXstreet Live Sessions Transcripts: Fractal Dimension Index (FDI). What it is, how it works and how to trade with it
There is a powerpoint presentation at the bottom which basically describes chaos theory and how to apply in the markets using the FDI.
He basically describes it as follows:
1.6≥FDI≥2.0 will confirm stochastic, RSI, Bollinger Band and reversal pattern signals
1.0≤FDI≤1.4 will confirm moving average cross-over and continuation pattern signals
So if the FDI is registering a a higher value, random, undpredictable patterns are about to occur. Lower values, and price is more cyclical in nature.
After experimenting with the settings myself, I'm finding that higher values (>1.4)indicate a short-term, to the beginning of a trend, movement in price (indicator movement always precedes price, so it is leading in this sense). They can also mean the extermination of a current trend.
Lower values (<1.4) represent a more predictable (cyclycal or trend-following) market, where change in price is constant and generally smoother.
It is non-directional, so it leaves you to determine what the next move is. But with basic tools its easy to do that.
But I am still experimenting with the time period. I'm using 21,34,55 etc., but I notice in the powerpoint presentation it looks like there is a much higher setting being used. If anyone has anymore experience using here would appreciate input.
Fractual Dimension and Choppiness Index
Choppiness Index another way of calculating Fractual Dimension:
Choppiness is a modern indicator based on ideas of chaos theory and fractal geometry. Benoit Mandelbrot was the one person most responsible for the great interest in the subject of fractal geometry. He showed how fractals can occur in many different places in both mathematics and elsewhere in nature. They could be found underlying cloud formations, waves, leaves, fingerprints, and sunflowers, and his ideas provided some exciting glue between mathematics and nature. Using computer graphics and with the help of IBM, Mandelbrot was able to show how to express fractal geometry using computer graphics.
Figure 6 The classic Mandelbrot image
While most of us think there are only whole number dimensions, like 1D, 2D, and 3D, in fractal geometry there exist fractional dimensions in between the whole number dimensions. So there are a number of fractional dimensions between a 1D line and a 2D plane. Fractals are basically a measurement of the dimensionality of a system; they are able to express different images based on the fractional nature of dimension.
E. W. Dreiss, a trader based in Australia, came up with the creative idea of using fractal geometry as a way to measure price movement in a security. He cleverly assigned a "dimension" to a price movement chart. A chart that was trending and linear could be given the whole dimension of 1 while a chart that was totally choppy and not trending could be said to have a dimension of 2. Somewhere in between these two values represented fractional states and different degrees of choppiness. In the figure below we added a Choppiness indicator with the parameters set in the Preferences. A pane is inserted at the bottom of the chart and a blue line is used to indicate the choppiness index along the chart. If you select a different stock this study will continue to exist at the bottom of the chart, and will readjust for the new security.
Figure 7A Choppiness indicator
The Choppiness Index or CI varies between 0 and 100, the higher the index the choppier the price action is and the lower the index the more trending the price action. Since it is a trending indicator it has a length, which sets the look back period, here in the example its set to 14. There are two bands in the Choppiness indicator: Inside Band Color and Outside band color. The display only shows on of the two band colors, red if its insider the Upper or Lower bands and yellow if its inside the bands. The bands can be set but default to Fibanocci numbers of 38.20 and 61.80. When the choppiness indicator is under 38.20 it will display the red Outside band. If its above 61.80 it will display the yellow Inside band.
Dreiss explains the way he works with CI in an article in November 1991 Technical Traders Bulletin: "Low readings in the CI correspond closely with the end of strong impulsive movements either up or down, while high readings occur after significant consolidations in the price." A good article on the subject of Choppiness by Gibbons Burke appeared in Futures Magazine in October of 1993. You can find a copy on the web at http://www.quote.com/quotecom/qcharts/help.asp?option=choppiness
Conventional Trading Wisdom
The Choppiness indicator has an inverse relationship to price action and a trend is considered broken when the CI is below the lower line and reverses. Again this does not tell you the direction of the market it just gives a fundamental different perspective on the change of a trend in general. You can see this in the Figure above at the right side of the chart where AOL's 14 day Choppiness has dropped below the red Outside band color, indicating maximum trending and hence minimum choppiness. If you look at the price chart you can see that the bullish uptrend that started around the 14th of August, now appears to be broken. If other signals confirmed that this is a turning point, it could likely that we are headed towards a new trend direction down and it might be a good time to sell, or go short.
Figure 7B Choppiness indicator preferences
Choppiness Index and Fractual Dimension
More about Choppiness Index: Measuring market choppiness with chaos. | Banking & Finance > Financial Markets & Investing from AllBusiness.com