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 warreng86, 11-10-2020, 02:04 PM
              4 responses
              1,354 views
              0 likes
              Last Post mathewlo  
              Started by Perr0Grande, Today, 08:16 PM
              0 responses
              2 views
              0 likes
              Last Post Perr0Grande  
              Started by elderan, Today, 08:03 PM
              0 responses
              5 views
              0 likes
              Last Post elderan
              by elderan
               
              Started by algospoke, Today, 06:40 PM
              0 responses
              10 views
              0 likes
              Last Post algospoke  
              Started by maybeimnotrader, Today, 05:46 PM
              0 responses
              12 views
              0 likes
              Last Post maybeimnotrader  
              Working...
              X