• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DiPlus & DiMinus

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

    DiPlus & DiMinus

    My simple indicator works on CrossAbove or Below like this :
    private int oper = 8;
    CrossAbove(DM(oper).DiPlus, DM(oper).DiMinus, 1)
    and ADX(oper)[0]>23

    but when i print in Output all values I have different values then DM indicator on my workspace.

    I print this :
    Print(Time[0].ToString());
    Print("The current D+ value is " + DM(oper).DiPlus[0]);
    Print("The current D- value is " + DM(oper).DiMinus[0]);
    Print("The current ADX value is " + ADX(oper)[0]);

    The ADX is correct but DiPlus and DiMinus are different ... and so some signal are not true.

    Why this ?

    Thanks in advance.

    #2
    Hello sniper,

    Thank you for your post.

    Are you seeing difference in the decimal place? Such as 100.25 on your chart but seeing 100.245678 in the Output?
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      No, sorry.
      For example : in the output I have these :
      11/12/2014 17:32:00
      The current D+ value is 20,6051981657602
      The current D- value is 13,6712931036324
      The current ADX value is 26,7155370430123

      But on my DM workspace i have :
      ADX = 34,14
      +DI = 19,79
      -DI = 14,34

      Comment


        #4
        Something is wrong.
        After several tests I confirm that the output values are different from those I read on my DM indicator, NT default indicator.
        The period are the same but the values are different.
        Can you also check you ?
        I await your kind reply .

        Comment


          #5
          Hello sniper,

          Print the values with ToString("N");. For example: Print("The current ADX value is " + ADX(oper)[0].ToString("N"));
          Patrick H.NinjaTrader Customer Service

          Comment


            #6
            Nothing ... on Output I have :
            The current D+ value is 23,89
            The current D- value is 18,56
            The current ADX value is 29,21

            And my workspace i have :

            ADX : 33,19
            +DI : 20,99
            -DI : 19,17

            Comment


              #7
              Sniper,

              I tried the same thing on my end and I'm seeing the same values between the chart and the indicator prints.

              Are you working with a Multi-Timeframe/Instrument Script?

              What are the settings for CalculateOnBarClose for both the DM indicator and the script you are using?
              Cal H.NinjaTrader Customer Service

              Comment


                #8
                No, this script ( attached below) no have mutitimeframe script.

                Please, can toy check the attached script for me ?

                Thanks
                Attached Files

                Comment


                  #9
                  sniper,

                  I have attached a picture with your indicator prints and the DM on the chart.

                  As you can see the values are matching up.

                  Ensure that you have both indicators using the same Period Setting.
                  Attached Files
                  Cal H.NinjaTrader Customer Service

                  Comment


                    #10
                    Solved !

                    I simply removed and replaced the indicator, and now it works fine.

                    I was going crazy.

                    Thank a lot for your patience.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by pecunianonolet, 11-28-2016, 03:34 AM
                    3 responses
                    3,134 views
                    0 likes
                    Last Post DaveS
                    by DaveS
                     
                    Started by contrax, Today, 08:20 AM
                    2 responses
                    10 views
                    0 likes
                    Last Post contrax
                    by contrax
                     
                    Started by brownsfan019, Today, 07:54 AM
                    1 response
                    9 views
                    0 likes
                    Last Post NinjaTrader_ChristopherJ  
                    Started by Amitabha, Today, 04:50 AM
                    1 response
                    12 views
                    0 likes
                    Last Post NinjaTrader_Marco  
                    Started by JulieG, Today, 12:40 AM
                    1 response
                    7 views
                    0 likes
                    Last Post NinjaTrader_ChrisSch  
                    Working...
                    X