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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        59 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        143 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        161 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        97 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        276 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X