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

Checking for a reversal bar

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

    Checking for a reversal bar

    Hi, this seems really easy, but I couldn't figure out how to make it work.

    I am using range charts and I want to identify reversal bars.

    I tried this, and although it seems very straightforward, it doesn't work:

    Code:
    bIsReversalBarDown = false;                    
    if (Open[0] > Close[1] && Low[0] == Close[0])
        {                    
            bIsReversalBarDown = true;
            BackColor = Color.Green;
        }
    Reversal bars are not marked green in the indicator panel. What am I doing wrong?

    #2
    Hi Lonneman,

    Syntax looks ok. Are you getting any error messages in log tab of control center? You may be running into this issue:
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thank you, that solved it.

      Comment


        #4
        Request for REVERSAL BAR INDICATOR WITH ALERT

        Wow! I was needing exactly the same thing. A reversal bar indicator with audio and visual alert. A reversal bar simply being a bar with higher close than open (after a bar with a lower close than open) or a lower close than open (after a bar with a higher close than open). Would be extremely helpful! Thoughts anyone?

        Comment


          #5
          Southsea,

          If you're interested in creating on your own, can see this page for help working with [ ] brackets. It looks like you're just looking to compare price values over a few bars.

          Ryan M.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by GLFX005, Today, 03:23 AM
          0 responses
          1 view
          0 likes
          Last Post GLFX005
          by GLFX005
           
          Started by XXtrader, Yesterday, 11:30 PM
          2 responses
          11 views
          0 likes
          Last Post XXtrader  
          Started by Waxavi, Today, 02:10 AM
          0 responses
          6 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Started by TradeForge, Today, 02:09 AM
          0 responses
          12 views
          0 likes
          Last Post TradeForge  
          Started by Waxavi, Today, 02:00 AM
          0 responses
          2 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Working...
          X