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

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 helpwanted, Today, 03:06 AM
        1 response
        8 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        7 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        5 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        242 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        385 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X