NexusFi: Find Your Edge


Home Menu

 





Need help using Awesome Oscillator as a filter


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 9 posts (14 thanks)
    2. looks_two angela d with 3 posts (1 thanks)
    3. looks_3 protrader007 with 3 posts (1 thanks)
    4. looks_4 prisonbreaker82 with 2 posts (0 thanks)
      Best Posters
    1. looks_one Fat Tails with 1.6 thanks per post
    2. looks_two Zondor with 1 thanks per post
    3. looks_3 angela d with 0.3 thanks per post
    4. looks_4 protrader007 with 0.3 thanks per post
    1. trending_up 13,278 views
    2. thumb_up 18 thanks given
    3. group 4 followers
    1. forum 19 posts
    2. attach_file 6 attachments




 
Search this Thread

Need help using Awesome Oscillator as a filter

  #1 (permalink)
 protrader007 
Bee Cave,Tx
 
Experience: Intermediate
Platform: NinjaTrader
Trading: CL
Posts: 54 since Aug 2010
Thanks Given: 31
Thanks Received: 20

I am trying to use the bwAO (bill williams Awesome Oscillator) as a filter in an indicator and having problems.
Even something as simple as drawing an "up" arrow on the price panel when its above zero and a "down" arrow when its below zero does not work.

As shown on the chart below I get "up" arrows even when its "below" zero and can't figure out why!
I'm guessing its because I'm not getting the correct values from the bwAO oscillator for some reason.

The code is below and I've attached the bwAO.cs file and would really appreciate if someone would take a look at it and tell me what I'm doing wrong.

Many thanks





Attached Files
Elite Membership required to download: bwAO.cs
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
Quant vue
Trading Reviews and Vendors
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NexusFi Journal Challenge - May 2024
Feedback and Announcements
 
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103



protrader007 View Post
I am trying to use the bwAO (bill williams Awesome Oscillator) as a filter in an indicator and having problems.
Even something as simple as drawing an "up" arrow on the price panel when its above zero and a "down" arrow when its below zero does not work.

As shown on the chart below I get "up" arrows even when its "below" zero and can't figure out why!
I'm guessing its because I'm not getting the correct values from the bwAO oscillator for some reason.

The code is below and I've attached the bwAO.cs file and would really appreciate if someone would take a look at it and tell me what I'm doing wrong.

Many thanks





There are several problems.

1. The bwAO indicator is a NT 6.5. indicator, which uses 3 DataSeries instead of one. You should start to recode it for NT7.
2. If you call that ancient beast, you should call the 3rd DataSeries, which is bwAO.AOValue.

3. You should use OnStartUp() instead of that initialized bracket in OnBarUpdate().

4. You only want to draw an arrow when the last value is smaller than zero and the current value is larger than zero (not whenever the current value is larger than zero).

Good luck.

Reply With Quote
Thanked by:
  #4 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103

Have reworked the Awesome Oscillator. The new version

- allows for different settings for the short and long period than 34 and 5
- does not split data into a positive and negative series to color the plot
- has a signal line that can be displayed to make it comparable to the MACD

The indicator can be found here:



The value of the oscillator can be accessed as anaAwesomeOscillator(5, false, 34, 5).Oscillator[0].

Attached Thumbnails
Click image for larger version

Name:	6B 03-11 (15 Min) 08_03_2011.jpg
Views:	397
Size:	94.6 KB
ID:	33103  
Reply With Quote
  #5 (permalink)
 protrader007 
Bee Cave,Tx
 
Experience: Intermediate
Platform: NinjaTrader
Trading: CL
Posts: 54 since Aug 2010
Thanks Given: 31
Thanks Received: 20


Fat Tails View Post
There are several problems.

1. The bwAO indicator is a NT 6.5. indicator, which uses 3 DataSeries instead of one. You should start to recode it for NT7.
2. If you call that ancient beast, you should call the 3rd DataSeries, which is bwAO.AOValue.

3. You should use OnStartUp() instead of that initialized bracket in OnBarUpdate().

4. You only want to draw an arrow when the last value is smaller than zero and the current value is larger than zero (not whenever the current value is larger than zero).

Good luck.

As you can tell I'm just learning to write some code and I really appreciate your help with this.
Also many thanks for converting it to NT7.
I also want to use Bill Williams AC (Acceleration/Deceleration) indicator and I assume this is also written for NT6.5 and will have the same problems. Could I ask you to take a look at the attached file and convert it to NT7 when you have the time.
Again, many thanks, it's much appreciated.

Attached Files
Elite Membership required to download: bwAC.cs
Started this thread Reply With Quote
Thanked by:
  #6 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


protrader007 View Post
As you can tell I'm just learning to write some code and I really appreciate your help with this.
Also many thanks for converting it to NT7.
I also want to use Bill Williams AC (Acceleration/Deceleration) indicator and I assume this is also written for NT6.5 and will have the same problems. Could I ask you to take a look at the attached file and convert it to NT7 when you have the time.
Again, many thanks, it's much appreciated.

You can find the Acceleration/Deceleration indicator here.



Please be aware that the Awesome Oscillator is nothing special. It is just a raw MACD built from simple moving averages instead of exponential moving averages.

The Acceleration/Deceleration Indicator is just the MACD histogram, which is obtained, if you use simple moving averages instead of exponential moving average and if you also use a simple moving average for the smoothing of the signal line.

Attached Thumbnails
Click image for larger version

Name:	Awesome MACD.jpg
Views:	369
Size:	139.9 KB
ID:	33173  
Reply With Quote
Thanked by:
  #7 (permalink)
 protrader007 
Bee Cave,Tx
 
Experience: Intermediate
Platform: NinjaTrader
Trading: CL
Posts: 54 since Aug 2010
Thanks Given: 31
Thanks Received: 20


Fat Tails View Post
You can find the Acceleration/Deceleration indicator here.



Please be aware that the Awesome Oscillator is nothing special. It is just a raw MACD built from simple moving averages instead of exponential moving averages.

The Acceleration/Deceleration Indicator is just the MACD histogram, which is obtained, if you use simple moving averages instead of exponential moving average and if you also use a simple moving average for the smoothing of the signal line.

Thanks again Fat Tails for all your work.
I was using a MACD before trying the Acceleration/Deceleration indicator and the Acc/Dec version worked best for me but I'll check it out further following your comments.

Started this thread Reply With Quote
  #8 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


protrader007 View Post
Thanks again Fat Tails for all your work.
I was using a MACD before trying the Acceleration/Deceleration indicator and the Acc/Dec version worked best for me but I'll check it out further following your comments.

If you use a MACD(5,34,5) and use it on the Median of the bars, the result is comparable to the Awesome Oscillator. Below is a comparison. It shows a standard MACD(5,34,5) form the Medians with only the raw MACD displayed as bars.

Below you can see the Awesome Oscillator with the same settings.

Only difference (except for the colors): The MACD is built from EMAs, the Awesome Oscillator is built from SMAs.

Attached Thumbnails
Click image for larger version

Name:	MACD and Awesome Oscillator.jpg
Views:	396
Size:	116.9 KB
ID:	33340  
Reply With Quote
  #9 (permalink)
 
prisonbreaker82's Avatar
 prisonbreaker82 
Rio de Janeiro
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire, IB
Trading: Equity & Futures
Posts: 312 since Jun 2010
Thanks Given: 58
Thanks Received: 141


Fat Tails View Post
If you use a MACD(5,34,5) and use it on the Median of the bars, the result is comparable to the Awesome Oscillator. Below is a comparison. It shows a standard MACD(5,34,5) form the Medians with only the raw MACD displayed as bars.

Below you can see the Awesome Oscillator with the same settings.

Only difference (except for the colors): The MACD is built from EMAs, the Awesome Oscillator is built from SMAs.

Hi Fat Tails!

I prefer the standard MACD indicator, but in NinjaTrader it does not show the red and green colours..

Is it possible to change from SMA to EMA and chose from Median to Close (what I understand the standard MACD uses)?

Can you please indicate where in the code I need to change this?

Thank you!

Visit my NexusFi Trade Journal Reply With Quote
  #10 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103



prisonbreaker82 View Post
Hi Fat Tails!

I prefer the standard MACD indicator, but in NinjaTrader it does not show the red and green colours..

Is it possible to change from SMA to EMA and chose from Median to Close (what I understand the standard MACD uses)?

Can you please indicate where in the code I need to change this?

Thank you!

If you do those changes, you will have standard MACD with colors, LOL. You are asking me to add colors to the MACD? You can do this yourself: Edit the MACD, add the following code at the end of OnBarUpdate()

 
Code
if(Rising(Diff))
    PlotColors[2][0] = Color.Lime;
else
   PlotColors[2][0] = Color.Red;
and save the indicator under a new name and compile it via F5.

Not tested.

Reply With Quote
Thanked by:




Last Updated on August 30, 2016


© 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