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 protrader007 with 3 posts (1 thanks)
    3. looks_3 angela d with 3 posts (1 thanks)
    4. looks_4 Zondor with 2 posts (2 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 protrader007 with 0.3 thanks per post
    4. looks_4 angela d with 0.3 thanks per post
    1. trending_up 13,262 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

  #11 (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 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.


LOL, Thanks. I fixed the MACD with color bars!

Visit my NexusFi Trade Journal Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
Increase in trading performance by 75%
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
GFIs1 1 DAX trade per day journal
15 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
My NQ Trading Journal
11 thanks
  #12 (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,102

@ Zondor: I saw your version of the Awesome Oscillator.

In my opinion it is a completely different indicator and has little to do with the original Awesome Oscillator.

I have compared the indicator with the Awesome Oscillator as it was created by Bill Williams. I do not think it is a good idea to replace various parts of the code and still call it Awesome Oscillator. It shows a completely different behavior.

Chart attached below with Awesome Oscillator and new Update. Hope you do not mind my comment.

Attached Thumbnails
Click image for larger version

Name:	Awesome Oscillator.jpg
Views:	292
Size:	103.9 KB
ID:	53545  
Reply With Quote
  #13 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: Ninjatrader®
Broker: CQG, Kinetick
Trading: Gameplay Klownbine® Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731



Quoting 
Chart attached below with Awesome Oscillator and new Update. Hope you do not mind my comment

I don't mind at all, but please don't report me to Bill Williams!

Now the question is whether this in-need-of-a-new-name concoction is of any practical value. With actual median values and a more responsive MA, I considered that this version might be more faithful to the original intended concept. Or might not!

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #14 (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,102


Zondor View Post
I don't mind at all, but please don't report me to Bill Williams!

Now the question is whether this in-need-of-a-new-name concoction is of any practical value. With actual median values and a more responsive MA, I considered that this version might be more faithful to the original intended concept. Or might not!

Actually your indicator is quite different from the Awesome Oscillator.

-> The raw MACD is the difference between a fast and a slow EMA.
-> The Awesome Oscillator is the difference between a fast and a slow SMA.
-> Zondor's oscillator is the difference between a fast and a slow LLMA.

If you look at the chart below, you will find that the MACD (red) and the Awesome Oscillator (blue) are close relatives, but that Zondor's Oscillator (green) is quite different. All indicators use the same settings, that is a period of 5 for the fast and a period of 34 for the slow moving average.


Reply With Quote
Thanked by:
  #15 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: Ninjatrader®
Broker: CQG, Kinetick
Trading: Gameplay Klownbine® Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

There are some changes to my recently posted mutant Awesome Oscillator. It now uses the statistical median of each bar. I believe that the calculation method is correct (midpoint member of a sorted ArrayList), but I needed to make a few small "sledge hammer" tweaks to the code to get it to plot.



How it differs from the starting point version on the Ninja Forum:
  • Changed the plot to a multi-color line.
  • Added user selection option for MA periods. Defaults are 9/12, original was 5/34.
  • Added the choice of using the SMA or the LLMA.
  • Added the choice of using the actual statistical median, computed on a bar by bar basis, or the Ninjatrader median which is just the average of the High and Low.

I don't know if I would have called it Awesome. Awful, maybe?

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #16 (permalink)
 angela d 
New York City, NY USA
 
Experience: Advanced
Platform: NinjaTrader
Trading: ES, ER
Posts: 27 since May 2015
Thanks Given: 10
Thanks Received: 28


Fat Tails View Post
Have reworked the Awesome Oscillator. The new version

Fat Tails,

I'm trying to use the AO in a strategy, but any value <0 cannot be detected. Is there a way to check for the AO value below zero?

Thanks very much in advance.

Reply With Quote
  #17 (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,102


angela d View Post
Fat Tails,

I'm trying to use the AO in a strategy, but any value <0 cannot be detected. Is there a way to check for the AO value below zero?

Thanks very much in advance.

Probably a bug in the strategy.

The value of the Awesome Oscillator can be accessed as anaAwesomeOscillator.Oscillator[0] and may take positive or negative values.

Reply With Quote
  #18 (permalink)
 angela d 
New York City, NY USA
 
Experience: Advanced
Platform: NinjaTrader
Trading: ES, ER
Posts: 27 since May 2015
Thanks Given: 10
Thanks Received: 28


Fat Tails View Post
Probably a bug in the strategy.

The value of the Awesome Oscillator can be accessed as anaAwesomeOscillator.Oscillator[0] and may take positive or negative values.

Thanks so much for your response.

I just created a fresh strategy that does nothing but print to output if AO is above or below 0. In an 8 month backtest, it can detect only >0.

I just wrote it in the strategy wizard.

curious.

Thanks again.

here's the code for the test strategy:

CalculateOnBarClose = true;
}

/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (anaAwesomeOscillator(5, false, 34, 5).OscillatorLine[0] > 0)
{
PrintWithTimeStamp("above");
}

// Condition set 2
if (anaAwesomeOscillator(5, false, 34, 5).OscillatorLine[0] < 0)
{
PrintWithTimeStamp("below");
}
}

Reply With Quote
  #19 (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,102


angela d View Post
Thanks so much for your response.

I just created a fresh strategy that does nothing but print to output if AO is above or below 0. In an 8 month backtest, it can detect only >0.

I just wrote it in the strategy wizard.

curious.

Thanks again.

here's the code for the test strategy:

CalculateOnBarClose = true;
}

/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (anaAwesomeOscillator(5, false, 34, 5).OscillatorLine[0] > 0)
{
PrintWithTimeStamp("above");
}

// Condition set 2
if (anaAwesomeOscillator(5, false, 34, 5).OscillatorLine[0] < 0)
{
PrintWithTimeStamp("below");
}
}


If you add the Awesome Oscillator to a chart, you will notice that the oscillator line is deactivated. This means that no values are written to the OscillatorLine plot. In this case NinjaTrader set the close value to the DataSeries. The close is always > 0, as there are no negative prices. But if you check for a value via "anaAwesomeOscillator.OscillatorLine.ContainsValue(0)", this should return false, as no value has been set to the plot!

You have two choices that will work

(1) activate the line via anaAwesomeOscillator(5, true, 34, 5).OscillatorLine[0]

(2) or use the plot that is not being disabled anaAwesomeOscillator(5, false, 34, 5).Oscillator[0]

Only if you disable the line plot and then try to access the disabled line, it cannot work.

Reply With Quote
Thanked by:
  #20 (permalink)
 angela d 
New York City, NY USA
 
Experience: Advanced
Platform: NinjaTrader
Trading: ES, ER
Posts: 27 since May 2015
Thanks Given: 10
Thanks Received: 28



Fat Tails View Post
If you add the Awesome Oscillator to a chart, you will notice that the oscillator line is deactivated. This means that no values are written to the OscillatorLine plot. In this case NinjaTrader set the close value to the DataSeries. The close is always > 0, as there are no negative prices. But if you check for a value via "anaAwesomeOscillator.OscillatorLine.ContainsValue(0)", this should return false, as no value has been set to the plot!

You have two choices that will work

(1) activate the line via anaAwesomeOscillator(5, true, 34, 5).OscillatorLine[0]

(2) or use the plot that is not being disabled anaAwesomeOscillator(5, false, 34, 5).Oscillator[0]

Only if you disable the line plot and then try to access the disabled line, it cannot work.

Wow, that works! Thank you so much!

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