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 PeakTry, Today, 10:49 AM
      0 responses
      2 views
      0 likes
      Last Post PeakTry
      by PeakTry
       
      Started by llanqui, Today, 10:32 AM
      0 responses
      4 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by StockTrader88, 03-06-2021, 08:58 AM
      45 responses
      3,992 views
      3 likes
      Last Post johntraderuser2  
      Started by TAJTrades, Today, 09:46 AM
      0 responses
      8 views
      0 likes
      Last Post TAJTrades  
      Started by rhyminkevin, Yesterday, 04:58 PM
      5 responses
      62 views
      0 likes
      Last Post dp8282
      by dp8282
       
      Working...
      X