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

Bollinger from Hull MA?

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

    Bollinger from Hull MA?

    Hi,

    Is there any way to use a Hull (or other MA) as the source for bollinger bands so they're smoothed more than the regular ones? Image attched shows a 20 period JHMA-smoothed BB from Tradestation)

    Many thanks
    Attached Files
    Last edited by 5iver; 11-10-2008, 05:12 PM.

    #2
    Hi 5iver,

    Thanks for your post.

    Yes, the Bollinger Bands have an 'inputData' parameter, please also review this link http://www.ninjatrader-support.com/H...Bollinger.html

    This input allows you to feed your custom MA (or HMA) value into them to arrive at the indicator in the picture you posted.

    Our second NinjaScript indicator building tutorial will be of good help, it deals with 'indicator on indicator' calculations - http://www.ninjatrader-support.com/H...verview22.html

    Basically you want to calculate the HMA value first and then feed that series into the Bollinger Bands as input.




    Originally posted by 5iver View Post
    Hi,

    Is there any way to use a Hull (or other MA) as the source for bollinger bands so they're smoothed more than the regular ones? Image attched shows a 20 period JHMA-smoothed BB from Tradestation)

    Many thanks
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks for the speedy reply :-) I'll do the homework and if I get it right I'll post a new indie in the download section.

      Comment


        #4
        OK, I've worked out how to change the regular Bollinger into an EMA-derived or HMA-derived set of plots, but neither of them are giving me the result I was hoping for...

        Is there actually a way to add a simple smoothing factor to an SMA?

        Or is there a JTHMA like there is in TS? Something that'll just iron out the kinks...?

        I see there's an example of a CCI with HMA averaging that's giving the right smoothing effect, but I have no coding skills...

        Any help much appreciated
        Last edited by 5iver; 11-11-2008, 07:56 AM.

        Comment


          #5
          Hi 5iver,

          Yes, the HMA is build-in in NinjaTrader.

          Please review this link here - http://www.ninjatrader-support.com/H...verageHMA.html

          Here is the code snippet you want to use for smoothing your upper Bollinger Band with a HMA with Length of 10.

          Code:
          [SIZE=2][SIZE=2][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] mySmoothBand = HMA(Bollinger(High, [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]2[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2], [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]20[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]).Upper, [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]10[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]];
          [/SIZE][/FONT][/SIZE][/FONT][/SIZE][/SIZE]
          Then progress the same way for the other values you need to have smoothed.

          Here are two links of interest -

          1. http://www.ninjatrader-support.com/H...iesObject.html

          2. http://www.ninjatrader-support2.com/...ead.php?t=7299



          Originally posted by 5iver View Post
          OK, I've worked out how to change the regular Bollinger into an EMA-derived or HMA-derived set of plots, but neither of them are giving me the result I was hoping for...

          Is there actually a way to add a simple smoothing factor to an SMA?

          Or is there a JTHMA like there is in TS? Something that'll just iron out the kinks...?

          I see there's an example of a CCI with HMA averaging that's giving the right smoothing effect, but I have no coding skills...

          Any help much appreciated
          Last edited by NinjaTrader_Bertrand; 11-11-2008, 10:07 AM.
          BertrandNinjaTrader Customer Service

          Comment


            #6
            Well, despite my newbie coding skills... it worked. thankyou.

            Comment


              #7
              You are welcome 5iver, great it all worked out - good job!!

              Originally posted by 5iver View Post
              Well, despite my newbie coding skills... it worked. thankyou.
              BertrandNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by bortz, 11-06-2023, 08:04 AM
              47 responses
              1,607 views
              0 likes
              Last Post aligator  
              Started by jaybedreamin, Today, 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
               
              Started by Jon17, Today, 04:33 PM
              0 responses
              6 views
              0 likes
              Last Post Jon17
              by Jon17
               
              Started by Javierw.ok, Today, 04:12 PM
              0 responses
              15 views
              0 likes
              Last Post Javierw.ok  
              Working...
              X