Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ADXR-Problem

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

    ADXR-Problem

    Hello !
    I try to use the ADXR, a basic indicator in Ninja, to create a costume indicator. My script is not ok when i use ADXR -
    it shows an error in the following script-line:

    // Calculate ADXR value
    double value = ADXR (Period)[0];

    "No overload for method "ADXR" takes "1" argument"


    When i change it to the simple "ADX" everything is working well.

    // Calculate ADX value
    double value = ADX (Period)[0];

    I created it whith the wizard.

    Any ideas ?
    i am new in coding - so please try it in words for newbies ;-)
    Thanks max-td

    #2
    You need to use one of these syntax-ings for ADXR.
    Code:
    ADXR(int  interval, int period)[int barsAgo] 
    ADXR(IDataSeries  inputData, int interval, int period)[int barsAgo]
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      OK, and in wich area of the script do i place this ?
      Do i need additional ; or ( ) then somewhere ?

      Comment


        #4
        You need ; at the end of every line except for when you are making if-statements or loops or similar.

        You use this syntax anywhere you want it.

        double value = ADXR(5, 10)[0];
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks Josh - the thing works !
          I corrected my script like the code-piece from your second posting.
          Was my code wrong because ADXR has got 2 parameters?

          What for was the thing from your first post ?

          max-td

          Comment


            #6
            ADXR has 2 parameters so you need to call it with 2 parameters. My first response is the general form syntaxing. You need to fill in the associated parameters with proper values.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            612 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            355 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            561 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            564 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X