Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with Rising

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

    Help with Rising

    Hello I can not compile new parameter for ADRX

    adxrUP = 35 ( is "private int" in variable region and "public int" in properties region

    It is functional :
    // Condition set 1
    if ( Close[0] > Close[1]
    && ADXR(12, 15)[0] > adxrUP
    {
    EnterLong(DefaultQuantity, "");
    }
    But I can't compile this:


    // Condition set 1
    if ( Close[0] > Close[1]
    && adxrUP > (ADXR(12, 15)[0] > ADXR(12, 15)[1] )
    {
    EnterLong(DefaultQuantity, "");
    }
    Or this
    // Condition set 1
    if ( Close[0] > Close[1]
    && ADXR(12, 15)[0] > adxrUP
    && Rising (ADXR(12, 15)[0] > adxrUP) = true; )
    {
    EnterLong(DefaultQuantity, "");
    }
    I'm not a programer... sorry, but I have learned a lot in this forum

    Thanks

    #2
    Hello franki,

    Thanks for your post and welcome to the forums!

    On this line: && adxrUP > (ADXR(12, 15)[0] > ADXR(12, 15)[1] )

    The adxrUP > cannot be evaluated because this section ADXR(12, 15)[0] > ADXR(12, 15)[1] does not resolve as a numerical value, it will resolve as either true or false so the expression is adxrUP > true (or false) is not correct. I'm not entirely certain what you are trying to evaluate but this should work:

    && adxrUP > ADXR(12, 15)[0] && ADXR(12, 15)[0] > ADXR(12, 15)[1])

    On this line: && Rising (ADXR(12, 15)[0] > adxrUP) = true; )

    Rising() will resolve as either true or false so somewhat the same as before, Rising (true or false) > (ADXR(12, 15)[0] is not correct. Also, Rising() requires a dataseries as the input and by using [0] it would not accept as that would be a singular double value.
    Try this:

    && Rising(ADXR(12, 15)) && ADXR(12, 15)[0] > adxrUP)



    References: http://ninjatrader.com/support/helpG...htm?rising.htm

    This link will take you to educational resources which will provide further links to help with your programming efforts: http://ninjatrader.com/support/helpG..._resources.htm

    Comment


      #3
      Very thanks Paul

      The product of ADRX is a line that shows the strength of the trend
      AdrxUP is the largest value I need to allow operations
      That is why adrxUP > is more than the result of ADRX (12, 14)
      If adrxUp has a value of 30, the strategy does not operate if the result of ADRX (12, 14) is less than 30
      When the ADRX value (12, 14) exceeds 30 it launches orders until the value returns to less than 30
      My intention is that when ADRX makes its maximum value, it does not return to operation if it is descending


      Try this:

      && Rising(ADXR(12, 15)) && ADXR(12, 15)[0] > adxrUP)
      This is the option I'm using and it is the result that I have been looking for

      very thanks again Paul

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X