Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add a standard deviation to an indicator

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

    Add a standard deviation to an indicator

    Hello

    I have this indicator and I would like to add 1 standard deviation (up and down) to it.

    I guess it is something like:

    0+StdDev()* 1
    0-StdDev()*1

    But I don't know what is the exact code I have to write. Can you help me please?

    Thanks

    I attach the indicator
    Attached Files

    #2
    Hello dvercher,
    Unfortunately we do not do custom NinjaScript coding however you can refer to the Bollinger indicator which is on similar lines.
    • In Control Center menu bar goto Tools>Edit NinjaScript>Indicators...
    • In the Indicators dialog select Bollinger and click Ok.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Edit the Bollinger indicator. Save it under a new name. Then replace line 48, which currently reads

      Code:
      double smaValue = SMA(Period)[0];
      with

      Code:
      double smaValue = DonchianChannel(Period)[0];
      Then compile via F5. Not tested.

      Comment


        #4
        we have a free / open-source indicator on our site that adds additional bands to the standard bollinger indicator.

        here's the link:


        perhaps you can compare it with your code or tweak it to your liking.

        cheers,
        -e

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sjsj2732, 03-23-2026, 04:31 AM
        0 responses
        42 views
        0 likes
        Last Post sjsj2732  
        Started by NullPointStrategies, 03-13-2026, 05:17 AM
        0 responses
        294 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        290 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        135 views
        1 like
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        98 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Working...
        X