Need help using Awesome Oscillator as a filter - NinjaTrader Programming | futures.io
futures io futures trading


Need help using Awesome Oscillator as a filter
Started: by protrader007 Views / Replies:6,665 / 19
Last Reply: Attachments:6

Welcome to futures io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.


You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Reply
 6  
 
Thread Tools Search this Thread
 

Need help using Awesome Oscillator as a filter

  #1 (permalink)
Elite Member
Bee Cave,Tx
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: CL
 
Posts: 53 since Aug 2010
Thanks: 31 given, 20 received

Need help using Awesome Oscillator as a filter

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


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Attached Files
Register to download File Type: cs bwAO.cs (8.5 KB, 67 views)
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,557 since Mar 2010
Thanks: 4,217 given, 25,073 received



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


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

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
The following 2 users say Thank You to Fat Tails for this post:
 
  #4 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,557 since Mar 2010
Thanks: 4,217 given, 25,073 received

Awesome Oscillator for NT7

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:

https://futures.io/free_downloads/ninjatrader-7/indicators/857-download.html?view

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

Attached Thumbnails
Need help using Awesome Oscillator as a filter-6b-03-11-15-min-08_03_2011.jpg  
Reply With Quote
The following 4 users say Thank You to Fat Tails for this post:
 
  #5 (permalink)
Elite Member
Bee Cave,Tx
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: CL
 
Posts: 53 since Aug 2010
Thanks: 31 given, 20 received

Futures Edge on FIO

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
Register to download File Type: cs bwAC.cs (9.1 KB, 31 views)
Reply With Quote
The following user says Thank You to protrader007 for this post:
 
  #6 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,557 since Mar 2010
Thanks: 4,217 given, 25,073 received


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.

https://futures.io/free_downloads/ninjatrader-7/indicators/859-download.html

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
Need help using Awesome Oscillator as a filter-awesome-macd.jpg  
Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #7 (permalink)
Elite Member
Bee Cave,Tx
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: CL
 
Posts: 53 since Aug 2010
Thanks: 31 given, 20 received


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

https://futures.io/free_downloads/ninjatrader-7/indicators/859-download.html

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.

Reply With Quote
 
  #8 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,557 since Mar 2010
Thanks: 4,217 given, 25,073 received


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
Need help using Awesome Oscillator as a filter-macd-awesome-oscillator.jpg  
Reply With Quote
The following 3 users say Thank You to Fat Tails for this post:
 
  #9 (permalink)
Elite Member
Rio de Janeiro
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire, IB
Favorite Futures: Equity & Futures
 
prisonbreaker82's Avatar
 
Posts: 312 since Jun 2010
Thanks: 57 given, 140 received


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!

Reply With Quote
 
  #10 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,557 since Mar 2010
Thanks: 4,217 given, 25,073 received



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
The following user says Thank You to Fat Tails for this post:

Reply



futures io > > > > > Need help using Awesome Oscillator as a filter

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)
 

Spring Grains Outlook w/Sean Lusk @ Walsh Trading

Elite only

FIO Video Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

April

Process above all else w/Anthony Crudele @ Futures Radio Show

Elite only

Machine Learning - Quantitative Trading w/Martin Froehler @ Quantiacs

Elite only

Market Dynamics w/Peter Davies @ Jigsaw Trading

Elite only

Ask Me Anything w/Patrick Rooney @ Trading Technologies

Apr 18

Ask Me Anything w/FuturesTrader71

Apr 19

Machine Learning w/Kris Longmore

Elite only

Market Analysis w/Dave Forss

Apr 25

Introducing iSystems with Stage 5 Trading

Apr 27
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Three Way Filter with Boolean Setup zeller4 NinjaTrader Programming 3 July 19th, 2011 08:19 PM
Filter trades by using +DMI, help needed abcplot EasyLanguage Programming 5 May 19th, 2011 03:59 PM
Awesome Ipad II Ryanb Jokes 1 April 5th, 2011 08:00 AM
TWIGGS Oscillator for MT4... Chiantishire MetaQuotes MetaTrader MQL Programming 1 April 1st, 2010 04:26 AM
Oscillator 0 - 100 zeller4 NinjaTrader Programming 4 September 14th, 2009 08:27 AM


All times are GMT -4. The time now is 08:53 AM.

no new posts
Page generated 2017-03-30 in 0.14 seconds with 20 queries on phoenix via your IP 54.211.200.222