Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Coding for reversal bars

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

    Coding for reversal bars

    Hi, i am new to ninja. I know programming but could not figure out the following:
    is there a way to code appearence of a bar which is reveresed to the previous one ( a reversal bar from the previous one). can somebody point me to where i can get a glimpse of how to write such code?
    thanks,y.

    #2
    Sorry not sure I follow. What do you want to do?

    Comment


      #3
      REversal bar

      I want to know if the 1 hour bar that currently ended is a reversal bar to previos one, e.g the bar before it opened low and closed high and the current bar opened high and closed low. If this is the case i want to buy (if closed high) or sell (closed low).

      Comment


        #4
        I see. You could try coding something like:
        Code:
        if (Close[1] > Open[1] && Close[0] < Open[0])
            // do something
        I suggest taking a look at the NinjaScript section in the docs and the various sample/help e.h. here: http://www.ninjatrader-support.com/v...splay.php?f=30

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        635 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 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
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        569 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X