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 question

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

    Bollinger question

    I'm wondering if this can be changed so that it pivots on the "high" or " Low"
    instead of the close .

    Upper.Set(SMA(Period)[0] + NumStdDev * StdDev(Period)[0]); Middle.Set(SMA(Period)[0]);
    Lower.Set(SMA(Period)[0] - NumStdDev * StdDev(Period)[0]);

    A lot of times you'll see price spike to the upper band or Lower ,but
    close well away from either . Not really a true representation of what
    is going on ....

    Correction :.... Sorry , screwed up . I'm trying to get the Percent B to pivot
    on the Bar high or low ,so it's based on the Bollinger indicator and I thought
    I'd have to edit the Bollinger first to make the percent B do what I'm looking for .
    Last edited by T2020; 02-05-2010, 12:21 PM.

    #2
    Hello T2020,

    You can use a different overload of the SMA to calculate based on the High or Low.
    Code:
     
     
    Upper.Set(SMA(High, Period)[0] + NumStdDev * StdDev(Period)[0]);
    Middle.Set(SMA(Low, Period)[0]);
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_RyanM View Post
      Hello T2020,

      You can use a different overload of the SMA to calculate based on the High or Low.
      Code:
       
       
      Upper.Set(SMA(High, Period)[0] + NumStdDev * StdDev(Period)[0]);
      Middle.Set(SMA(Low, Period)[0]);
      Thanks Ryan . I'm able to come close to the look I was hoping
      for with those changes .

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by helpwanted, Today, 03:06 AM
      1 response
      12 views
      0 likes
      Last Post sarafuenonly123  
      Started by Brevo, Today, 01:45 AM
      0 responses
      9 views
      0 likes
      Last Post Brevo
      by Brevo
       
      Started by aussugardefender, Today, 01:07 AM
      0 responses
      5 views
      0 likes
      Last Post aussugardefender  
      Started by pvincent, 06-23-2022, 12:53 PM
      14 responses
      242 views
      0 likes
      Last Post Nyman
      by Nyman
       
      Started by TraderG23, 12-08-2023, 07:56 AM
      9 responses
      387 views
      1 like
      Last Post Gavini
      by Gavini
       
      Working...
      X