Indicators: Awesome Oscillator (AO)

 

Awesome Oscillator (AO):

Bill Williams's Awesome Oscillator (AO) is a 34-period simple moving average, plotted through the middle points of the bars (H+L)/2, which is subtracted from the 5-period simple moving average, built across the central points of the bars (H+L)/2.

It shows us quite clearly what’s happening to the market driving force at the present moment. (B. Williams: "New Trading Dimensions: How to Profit from Chaos in Stocks, Bonds and Commodities").

Author: MetaQuotes Software Corp.

 

Forum on trading, automated trading systems and testing trading strategies

Trading chaos

iTC, 2014.04.21 08:41 AM.

It is impossible without Williams. His Super AO is a real grail indicator. Counting waves is very simple. There are clear rules. They just need to be followed.

Three main applications of the indicator AO (Awesome Oscillator) when counting Elliott waves.

1. To determine the peak of the 3rd wave of any order on any time frame.

2. To determine if the minimum conditions for wave 4 are met (Histogram crossing the zero line after the peak of the third wave). 3.

3. To determine if there is a divergence between price and momentum, and to show what the market momentum is now.

Determining the peak of wave 3 using the AO.

Wave 3 will have the highest peak on the AO of 100-140 bars.


 

Forum on trading, automated trading systems and testing trading strategies

Trading chaos

iTC, 2014.04.21 08:44

Finding the first wave is quite simple. Using the example of buying. We should see that the previous high on the left side of the chart is broken and AO is above zero. Then the AO changes colour to red in the second wave and then the colour change to green "BLUE" takes the market into the third wave.

 

Forum on trading, automated trading systems and testing trading strategies

Trading chaos

iTC, 2014.04.21 08:59 pm.

To avoid confusion with the first wave, I should add that you should look at the previous 140 bars. Was there a five wave cycle before that or not. If you can not see, then the sideways is ordinary and should not trade. So there is no first wave there.

 

Forum on trading, automated trading systems and testing trading strategies

Trading chaos

iTC, 2014.04.21 09:24 AM.

Here is an example of the first and second wave the other day. You can reverse the second wave into sub-waves of smaller TFs and look for upward momentum after reaching the target level. See Figure 2.


 

Forum on trading, automated trading systems and testing trading strategies

Trading chaos

iTC, 2014.04.22 13:38

Having an ordinary AO indicator, even without seeing the chart you can know what to do buy or sell, let's look at the histogram of the indicator. Here is the markup.



 

Forum trading, automatic trading systems and testing trading strategies

Trading Chaos

iTC , 2014.04.22 13:38

Having ordinary AO indicator, even without seeing the graph, you can know what to do to buy or sell, look at the histogram display. That markup.



 

I found the Awsome Oscillator referenced in documentation for how-to-code indicators in several locations, but didn't think the code example provided as easily identifiable functions for creating an indicator as might be optimal. I made this re-write to provide a more structured coding example - perhaps it will help others who are new to coding in MLQ5 and -- maybe readers will comment and provide their own ideas to make it into a really good example.  Optimally, the examples distributed with the terminal would be the best-of-the-best examples of code style and function.

I haven't seen an actual style guide for mql5 programs, like the one here: https://google.github.io/styleguide/cppguide.html.  I notice a number of preferences in the coding styles of some of the best developers on the site that are different from that guide, and some that are different from my personal preferences, like
- The curly braces follow the more compressed style resulting in fewer coding lines, and with the brace directly below the first character - such as directly below the f in a for loop.  This is good if that is the style, but personally I think it increases the time it takes for the human eye to find the beginning and end of the code blocks.
- member variable names are preceded with m_ where the above guide has them with a trailing underscore.  I like the m_ better.
- enumerations are named in the macro naming style versus with a leading k - visually, I prefer the macro naming style, but think technically, the leading k as in the github doc is better.

I added a variable last_prev_calculated to the AO example to keep track of the last fully successful run, and used that as the return value instead of the zero which I think will result in an unnecessary a full start-over - is that a good code practice?

Is there a forum discussion for style that I just haven't found yet?