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

Keltner Channel: Documentation needs to be updated

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

    Keltner Channel: Documentation needs to be updated

    In the documentation for Keltner Channel (http://www.ninjatrader-support.com/H...erChannel.html), it says:

    "Keltner Channel indicator is based on volatility using a pair of values placed as an "envelope" around the data field. Values are calculated by taking the Exponential Moving Average of the data and adding or subtracting the average true range multiplied by an offset value from the moving average."

    I opened the source code. It's using SMA, not EMA.

    protected override void OnBarUpdate()
    {
    diff.Set(High[0] - Low[0]);

    double middle = SMA(Typical, Period)[0];
    double offset = SMA(diff, Period)[0] * offsetMultiplier;

    double upper = middle + offset;
    double lower = middle - offset;

    Midline.Set(middle);
    Upper.Set(upper);
    Lower.Set(lower);
    }

    #2
    Thanks for bringing this to our attention. We will get it corrected.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Our implementation is correct. The original Keltner Channel uses SMA. Later variations NOT by the original author uses EMA and sometimes even offsets of ATR. The documentation is incorrect and I will change that.
      RayNinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_Ray View Post
        Our implementation is correct. The original Keltner Channel uses SMA. Later variations NOT by the original author uses EMA and sometimes even offsets of ATR. The documentation is incorrect and I will change that.
        Agreed, the original uses SMA.

        Comment


          #5
          keltner channel with EMA

          Hello. I am looking for the Keltner Channel with the EMA.

          Any help would be appreciated.

          Thanks.

          Comment


            #6
            geotrader, you can open up the source code for the Keltner Channel indicator, make a copy (make sure to change the Keltner Channel name in the code itself!) of it, and then every time you see a reference to SMA, you can just change it to EMA and then compile it and you'll have an EMA Keltner Channel ready to go.
            AustinNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by llanqui, Today, 10:32 AM
            0 responses
            1 view
            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
            7 views
            0 likes
            Last Post TAJTrades  
            Started by rhyminkevin, Yesterday, 04:58 PM
            5 responses
            62 views
            0 likes
            Last Post dp8282
            by dp8282
             
            Started by realblubb, Today, 09:28 AM
            0 responses
            8 views
            0 likes
            Last Post realblubb  
            Working...
            X