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

Is there a function to tell you the end or start tick of a bar

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

    Is there a function to tell you the end or start tick of a bar

    I try to match this function in TradeStation Easy Language Function
    BarStatus
    is used to determine whether the current tick is the opening or closing tick of a bar, or whether it is a tick ’r;inside the bar.’
    BarStatus(DataNum)
    DataNum is a numeric expression representing the data stream that is being evaluated. 1 refers to Data1, 2 to Data2 and so on. DataNum can be between 1 and 50, inclusive.
    Notes:

    This reserved word will return one of four possible values:
    2 = the closing tick of a bar
    1 = a tick within a bar
    0 = the opening tick of a bar (relevant only for strategies using Open Next Bar order actions)
    -1 = an error occurred while executing the reserved word
    When used with multi-data charts the data series referenced must be applied to the chart. For example, to use BarStatus (2), a second data series must be applied to the chart.

    #2
    Hello,

    I am not familiar with TS Easy Language, however I think you could use FirstTickOfBar:
    DenNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    59 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    21 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    10 views
    0 likes
    Last Post cre8able  
    Working...
    X