Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Rising & Falling ADX issue

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

    Rising & Falling ADX issue

    Hello,
    I'm trying to identify a previous bar that the ADX was Rising or Falling. My idea was this:
    if (Rising(ADX(10)[1]) == true
    && Falling(ADX(10)[0]) == true),
    but of course I'm getting an error that I can't "convert from 'double' to 'NinjaTrader.Data.IDataSeries'".
    Might there be another way around this issue?

    #2
    Hello,

    Thanks for the forum post.

    Take the [0] and [1] off there and it should compile now.

    When you add the [] this returns a double. If you leave them off this is a data series object.

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Thanks for the reply. Yes, that will compile, but will it do anything? I want check to see if the previous bar was rising and if the current bar is falling.

      Comment


        #4
        Hello,

        No this would not work for this as this works in realtime only.

        Therefor If I was going to do this I would just program it manually.

        Close[2] < Close[1] &&.//Rising of the last bar
        Close[0] > Close [1 ] //Falling of the current bar
        BrettNinjaTrader Product Management

        Comment


          #5
          Good suggestion, but with the ADX indy the Closes can be >or< than the previous without the ADX rising or falling. I need to identify the ADX rising or falling in each bar. I can easily color a bar to show that, but I can't use bar coloring in a strategy.
          Last edited by CaptainAmericaXX; 03-16-2011, 01:15 PM.

          Comment


            #6
            Well of coarse you would want to substitute my example of close with your indicator of choice.

            ADX(10)[2} < ADX(10)[1] etc. etc.
            BrettNinjaTrader Product Management

            Comment


              #7
              That did it. Thanks so much!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by SalmaTrader, 07-07-2026, 10:26 PM
              0 responses
              42 views
              0 likes
              Last Post SalmaTrader  
              Started by CarlTrading, 07-05-2026, 01:16 PM
              0 responses
              20 views
              0 likes
              Last Post CarlTrading  
              Started by CaptainJack, 06-17-2026, 10:32 AM
              0 responses
              14 views
              0 likes
              Last Post CaptainJack  
              Started by kinfxhk, 06-17-2026, 04:15 AM
              0 responses
              20 views
              0 likes
              Last Post kinfxhk
              by kinfxhk
               
              Started by kinfxhk, 06-17-2026, 04:06 AM
              0 responses
              22 views
              0 likes
              Last Post kinfxhk
              by kinfxhk
               
              Working...
              X