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

ADX of Ninja different from MT4

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

    ADX of Ninja different from MT4

    Hi,

    I would like to know why the ADX for NT don't look the same as MT4. Where are the Plus and Minus lines? I refer to the program written, it only written to show the "SUM"

    If I need to abstract the information on the plus and minus what command should I put (or what must I do?).

    Based on the help index it is written as follow:

    Syntax
    ADX(int period)
    ADX(IDataSeries inputData, int period)

    There are no example and further explanation in the help section. So I have limited info on using ADX.

    Can anyone help, please. I need some advise and thanks in advance.

    Shek

    #2
    To fully understand the ADX implementation in NinjaTrader you can view the NinjaScript source file for it in the NinjaScript Editor. From the code itself you can get an idea of how the ADX is built and if you want you can create your own adaptation of it that is like MT4's if you want.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      The indicator you want is the DM, which is more commonly called ADX/DMI, it includes the Di lines as well as the ADX line.


      There is a chance that the NT DM could be calculated different than other platforms because of the way Wilder used moving averages:


      *Welles Wilder's Indicators

      Users should beware, when setting time periods for Welles Wilder's indicators, that he does not use the standard exponential moving average formula. For example, Wilder describes 1/14 of today's data + 13/14 of yesterday's average as a 14-day exponential moving average. If you refer to Exponential MA Time Periods you will see the formula equates to a 27-day exponential moving average.
      Indicators affected are:We recommend that users try shorter time periods when using one of the above indicators. For example, if you are tracking a 30-day cycle you would normally select a 15-day Indicator Time Period. With the ATR, adjust the time period as follows:
      ATR time period = (n + 1) / 2 = (15 + 1) / 2 = 8 days
      Alternatively, select the Exponential Moving Average option (for RSI or ATR) in place of the default Wilder moving average.

      Can someone confirm whethere the NT version is consistent with the original implementation?

      Comment


        #4
        Thanks to Elliott Wave and Josh

        Originally posted by Elliott Wave View Post
        The indicator you want is the DM, which is more commonly called ADX/DMI, it includes the Di lines as well as the ADX line.


        There is a chance that the NT DM could be calculated different than other platforms because of the way Wilder used moving averages:


        Can someone confirm whethere the NT version is consistent with the original implementation?
        Hi EW an Josh,

        Thanks for the information, I have opened up the code of DM, I think that is the indicator I am looking for. I need the plus and minus to calculate some result for my trading system.

        I think I have made the right choice of using NT for programming my system, the replies here is very good and prompt. So far, the support here is great and I am very surprises.

        Thanks all!

        Shek

        Comment


          #5
          Any way to offset up or down the +dm or -dm lines in the DM indicator? i.e bring them closer further apart?

          Comment


            #6
            Hi Hooya,

            Are you referring to the default 25 and 75 lines?

            If yes, you can change these in the indicator settings for the DM at "Right click>Indicators" by expanding the "Lower" and "Upper" fields under "Lines".

            Let me know if you are referring to something else.
            TimNinjaTrader Customer Service

            Comment


              #7
              hi

              No, I am talking about shifting the indictor lines up or down.

              Lets asume the DI+ line is currently at 39 I would like to shift it to sa 34 i.e -5pts and raise the DI- line by 5pts.

              I am sure all it would take is a function in the code to offset the 'drawn' lines by x amount.

              Comment


                #8
                Hi Hooya,

                You can do something like...

                Code:
                DiPlus.Set((diPlus) + 5);
                DiMinus.Set((diMinus) + 5);
                Then save the indicator as another name.

                Or replace 5 with your exposed variable, so you can change from the indicator settings.
                TimNinjaTrader Customer Service

                Comment


                  #9
                  excellent. thx...that should do the trick

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by BarzTrading, Today, 07:25 AM
                  2 responses
                  14 views
                  1 like
                  Last Post BarzTrading  
                  Started by devatechnologies, 04-14-2024, 02:58 PM
                  3 responses
                  19 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Started by tkaboris, Today, 08:01 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post tkaboris  
                  Started by EB Worx, 04-04-2023, 02:34 AM
                  7 responses
                  162 views
                  0 likes
                  Last Post VFI26
                  by VFI26
                   
                  Started by Mizzouman1, Today, 07:35 AM
                  1 response
                  10 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Working...
                  X