Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Enhanced moving average indicator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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

    #2
    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,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      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

      Comment


        #4
        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').

        Comment


          #5
          Thanks for your great effort. This is exactly what I had always wished for. Very easy to trade.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by techgetgame, Yesterday, 11:42 PM
          0 responses
          7 views
          0 likes
          Last Post techgetgame  
          Started by sephichapdson, Yesterday, 11:36 PM
          0 responses
          1 view
          0 likes
          Last Post sephichapdson  
          Started by bortz, 11-06-2023, 08:04 AM
          47 responses
          1,613 views
          0 likes
          Last Post aligator  
          Started by jaybedreamin, Yesterday, 05:56 PM
          0 responses
          9 views
          0 likes
          Last Post jaybedreamin  
          Started by DJ888, 04-16-2024, 06:09 PM
          6 responses
          19 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Working...
          X