NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 01-13-2011, 01:26 AM   #1
ETFVoyageur
Senior Member
 
Join Date: Dec 2010
Posts: 470
Thanks: 0
Thanked 4 times in 4 posts
Default Enhanced moving average indicator

This is a packaged up version of RwbMA -- zipped up suitable for NT Import.
  • It is a learning tool that allows you to explore moving averages pretty thoroughly
  • It is also an indicator that allows you to do some things there is no other easy way to do
  • It only handles single moving averages -- if you want to investigate crossovers, you'll have to have two instances running. One thing you might want to try is crossings of a moving average with a smoothed version of itself.
I am hoping that a few people will give it a try and let me know their reaction -- bugs, suggestions, usability issues, etc. After giving it a bit to settle and fix any issues brought to my attention, I'll post it in the normal sharing location.

There are quite a few files in the package -- RwbMA supports 18 different moving averages, and the package has to also contain anything they need. I had to fix the code in several of the moving average indicators so they would be callable. In all cases, I started from the latest available version. The changes should not affect stand-alone use of the fixed indicators (I did a quick test), but you do need the package version of the following: ZiNonLagma, ZeroLagEMA, FRAMA, and ModifiedOptimumEllipticFilter for RwbMA to work right.

This was developed and tested under V7. I have no idea how well it works with V6, or whether it does not.

Features are:
  • You can choose which moving average to use. There are 18 to choose from. I included all I could find, either in the NT distribution, or in the public sharing area. ZLagEMA came from the V7 area. FRAMA, ModifiedOptimumEllipticFilter, ZiNonLagma and ZeroLagEMA all came from the V6.5 area. If I missed your favorite one, bring it to my attention and I'll consider adding it.
  • You can put 0, 1, or 2 bands around any of the moving averages. There are 5 different kinds of bands to choose from.
  • You can choose whether or not to color code the moving average for bull/bear. If you do choose to color it, you can choose from among 4 different ways to do so. I encourage you to experiment with this. Some of the coloring ways, on some of the moving averages, are downright amazing.
  • You can choose whether or not to smooth the moving average. If you do smooth it, you can use single, double, or triple smoothing. That means you can now smooth any moving average, not just those whose author provided for that. I use EMA for smoothing. I have not (yet) experimented to see whether some of the newer moving averages would do a better job. If you have experience with that, please let me know.
  • You can offset the moving average vertically.
    • One reason to do so is that some of the no-lag moving averages follow the price so closely that it is hard to see the moving average, or to see when the trend changes, coloring changes, etc. You may as well offset that kind of moving average, because you are sure not going to be trading price crossing that moving average.
    • Another reason is to get moving average pairs out from under the price so that crossovers are easier to see -- kind of like putting an indicator right there on the chart, in close proximity to the actual prices.
    • Offsetting the moving average does not offset any bands there may be. When you stop to think about it, bands around a shifted moving average make no sense; bands around the price do make sense, even if the actual moving average itself has been shifted.
That's about it. You can mix and match any of the above.
  • If you like Bollinger bands, choose SMA + standard deviation bands. Or see what Bollinger bands around some other kind of moving average would be like.
  • If you want Starc Bands, choose SMA + ATR bands.
  • An SMR with 3xATR bands is very close to Keltner bands, although not identical, because the Keltner computation is not exactly ATR. (It would not be architecturally difficult to provide true Keltner bands, but they are so close to ATR that it did not seem worth my time.)
Please give it a try and let me know your observations, whether a big deal to a trivial item, favorable or unfavorable.

My thanks to any who do try it and let me know,
EV
Attached Files
File Type: zip RwbMA.zip (59.9 KB, 127 views)
ETFVoyageur is offline  
Reply With Quote
Old 01-13-2011, 03:13 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
Default

Hi EV, thanks for sharing your hard work and update of the indicator here on our forums - let's hope you get the desired feedback in and can package it up for the sharing section.

Thanks,
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 01-13-2011, 09:42 PM   #3
ETFVoyageur
Senior Member
 
Join Date: Dec 2010
Posts: 470
Thanks: 0
Thanked 4 times in 4 posts
Default Dropping ZeroLagEMA

In later builds I have removed ZeroLagEMA

My reason is that it is precisely the same as DEMA, which is in the NT V7 release.

--EV
ETFVoyageur is offline  
Reply With Quote
Old 09-15-2011, 10:18 AM   #4
slsdoug
Junior Member
 
Join Date: Sep 2011
Posts: 8
Thanks: 0
Thanked 8 times in 5 posts
Default Setting up STARC bands

Not exactly sure how to set up STARC bands. I believe the formula is:

6 period SMA +- 2*15 period ATR

I could not find out how to set ATR period (I'm using the outer band with inner band set to 'none').
slsdoug is offline  
Reply With Quote
Old 08-24-2012, 01:40 PM   #5
rplust
Junior Member
 
Join Date: Jan 2012
Posts: 2
Thanks: 0
Thanked 1 time in 1 post
Default

Thanks for your great effort. This is exactly what I had always wished for. Very easy to trade.
rplust is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving Average of an Indicator Joshua 1:8 Miscellaneous Support 6 08-30-2010 04:29 PM
Moving Average of Custom Indicator MasterSepp Indicator Development 2 12-07-2009 03:55 PM
Oscillator of Moving Average (OsMA) indicator maiganrui Indicator Development 3 05-20-2009 07:33 AM
Adding moving average to indicator winja Indicator Development 3 02-24-2009 09:43 AM
Moving Average of a Indicator buderim Indicator Development 56 05-05-2008 12:05 AM


All times are GMT -6. The time now is 03:07 PM.