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

Characteristics of a Line Break Bar

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

    Characteristics of a Line Break Bar

    Help to understand a Line Break Bar on the Current bar in progress

    I am running my conditions OnPriceChange and referencing Close 2 and Close 1, the current bar should be Close 0

    When Setting a stop for example on High[2] (could be referencing any prior bar segment)

    What happens as the current bar is in progress the stop will jump from High[2] to High[1], back and forth as the bar is inprogress

    this occurs if the current bar is inside the body of the prior bar - AT THAT TIME THE BAR THINKS IT IS Close[1] so it then thinks High[1] is High[2]


    #2
    Hello DTSSTS,

    Thank you for writing in.

    The Highs and Lows collections could be used instead of High and Low, such as Highs[0][2] instead of High[2].

    By using Highs and Lows you could get the specific BarsInProgress index for the series you want instead of the index that is updating OnBarUpdate().

    See the help guide documentation below for more information.

    Highs - https://ninjatrader.com/support/help.../nt8/highs.htm
    Lows - https://ninjatrader.com/support/helpGuides/nt8/lows.htm
    PriceSeries - https://ninjatrader.com/support/help...riceseries.htm

    Let us know if we may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      to confirm that method can only be used in an UNLOCKED Code
      thanks

      Comment


        #4
        Hello DTSSTS,

        Thank you for your note.

        That is correct. To use the Highs and Lows collections you would need to have your code unlocked from the Strategy Builder.

        Let us know if we may assist further.
        Brandon H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by helpwanted, Today, 03:06 AM
        0 responses
        0 views
        0 likes
        Last Post helpwanted  
        Started by Brevo, Today, 01:45 AM
        0 responses
        6 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
        384 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X