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

Wilder's Moving Average

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

    Wilder's Moving Average

    Hi,

    Can someone help me to correct this indicator.

    It is showing a straight line.

    Regards
    Sujay

    Amibroker Code:
    =============
    A1 = WilderMA(C, 5);

    function WilderMA(Field, Period)
    {
    X[0] = Field[0];

    for(i = 1; i < BarCount; i++)
    {
    X[i] = Field[i]/Period + X[i - 1] * (Period - 1)/Period;
    }
    return X;
    }
    Attached Files

    #2
    sujay,

    Could you describe to me the issue a bit more here for clarification? Where did you get this indicator?
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Hi NinjaTrader_AdamP,

      I wrote this indicator by modifying EMA code.

      Formula:



      Problem:
      This is a kind of trend indicator so it should draw a line like other moving average up and down curve.

      But i am getting a horizontal straight line.
      Last edited by ssijbabu; 10-07-2012, 10:38 PM.

      Comment


        #4
        Hello,

        Likely the formula has an issue here. At first I thought it might be because it's only adding some small value each time, but looking at it closer I think it might be that the order these arithmetic operations are going through causes the issue. Division on computers can sometimes be funky if you aren't careful.



        This appears to work :

        Code:
        Plot0.Set(CurrentBar == 0 ? Input[0] : ((Plot0[1]*(period-1) + Input[0])/period ) );
        Last edited by NinjaTrader_AdamP; 10-08-2012, 08:19 AM.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_AdamP View Post
          Hello,

          Likely the formula has an issue here. At first I thought it might be because it's only adding some small value each time, but looking at it closer I think it might be that the order these arithmetic operations are going through causes the issue. Division on computers can sometimes be funky if you aren't careful.



          This appears to work :

          Code:
          Plot0.Set(CurrentBar == 0 ? Input[0] : ((Plot0[1]*(period-1) + Input[0])/period ) );
          Thanks for the code Adam. Here is the indicator.
          Attached Files

          Comment


            #6
            Does anyone have wilders for ninjatrader? This indicator doesnt work with the newest ninjatrader

            Comment


              #7
              Hello calster,

              Though I was not able to find it, it is possible that this indicator is publicly available on our NinjaTrader Ecosystem website:Otherwise, this thread will remain open for any users of the forum community to chime in if they are aware of any existing versions of the Wilders indicator for NinjaTrader.

              Here is a basic guideline of how to import NinjaScript add-ons in NinjaTrader 8:

              Note — To import NinjaScripts you will need the original .zip file.

              To Import:
              1. Download the NinjaScripts to your desktop, keep them in the compressed .zip file.
              2. From the Control Center window select the menu Tools > Import > NinjaScript Add-on...
              3. Select the downloaded .zip file
              4. NinjaTrader will then confirm if the import has been successful.

              Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'

              Once installed, you may add the indicator to a chart by:
              • Right-click your chart > Indicators... > Select the Indicator from the 'Available' list on the left > Add > OK

              Here is a short video demonstration of the import process:
              Please let me know if I can be of further assistance.

              The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
              Gaby V.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by ntram, Today, 05:39 PM
              0 responses
              2 views
              0 likes
              Last Post ntram
              by ntram
               
              Started by giulyko00, Today, 11:49 AM
              2 responses
              11 views
              0 likes
              Last Post giulyko00  
              Started by Aviram Y, Today, 06:03 AM
              2 responses
              10 views
              0 likes
              Last Post Aviram Y  
              Started by FishTrade, Today, 03:42 PM
              0 responses
              1 view
              0 likes
              Last Post FishTrade  
              Started by Richozzy38, Today, 01:06 PM
              3 responses
              14 views
              0 likes
              Last Post Richozzy38  
              Working...
              X