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 burtoninlondon, Today, 12:38 AM
      0 responses
      5 views
      0 likes
      Last Post burtoninlondon  
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      14 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      11 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Yesterday, 07:51 PM
      0 responses
      13 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,982 views
      3 likes
      Last Post jhudas88  
      Working...
      X