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 Quanto, 04-17-2024, 10:43 AM
        2 responses
        20 views
        0 likes
        Last Post Quanto
        by Quanto
         
        Started by Irukandji, Today, 03:06 PM
        0 responses
        6 views
        0 likes
        Last Post Irukandji  
        Started by cmtjoancolmenero, 04-25-2024, 03:58 PM
        17 responses
        93 views
        0 likes
        Last Post cmtjoancolmenero  
        Started by nleitman, Today, 11:46 AM
        8 responses
        20 views
        0 likes
        Last Post nleitman  
        Started by Option Whisperer, 03-20-2024, 07:01 AM
        3 responses
        72 views
        0 likes
        Last Post ScalpRule  
        Working...
        X