• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IsFirstTickOfBar with LineBreak barstype. Error

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

    IsFirstTickOfBar with LineBreak barstype. Error

    Hello,

    It seems that the "IsFirstTickOfBar" instruction will not work correctly when it is used with the "LineBreak" bar type, and Calculate is not equal to Calculate.OnBarClose. It is running continually.

    You can run the attached indicator in a chart with the next DataSeries configuration to check the bug. (set Calculate = Calculate.OnEachTick or Calculate.OnPriceChange).

    Thanks
    Attached Files

    #2
    Hello cls71,

    Are you testing over historical data or real-time data?

    Are you getting no prints in either historical or real-time?

    Or are you not getting a print on the first update of a bar when Calculate is On price change in real-time data only?

    Or are you getting a print on every update of OnBarUpdate when you are only expecting 1 per bar?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello cls71,

      Are you testing over historical data or real-time data?
      Real-time data

      Originally posted by NinjaTrader_ChelseaB View Post
      Are you getting no prints in either historical or real-time?
      In Historical I get 1 print for each bar (it is correct). In real-time I get a lot of prints.

      Originally posted by NinjaTrader_ChelseaB View Post
      Or are you not getting a print on the first update of a bar when Calculate is On price change in real-time data only?

      Or are you getting a print on every update of OnBarUpdate when you are only expecting 1 per bar?
      In real time when Calculate = Calculate.OnPriceChange, I am getting a print on every update of OnBarUpdate when I am only expecting 1 per bar.

      Comment


        #4
        Hello cls71,

        I was able to research and find an answer on this.

        The LineBreak bar calls RemoveLastBar() internally. IsFirstTickOfBar is true anytime RemoveLastBar is called.

        From the help guide:
        "If a bar type is set up to remove the last bar on a chart, IsFirstTickOfBar will automatically be set to True."

        Below is a public link to the help guide.
        https://ninjatrader.com/support/help...ttickofbar.htm

        This will also affect any other bar type if and when it calls RemoveLastBar().
        Last edited by NinjaTrader_ChelseaB; 06-19-2018, 02:04 PM.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks ChelseaB,

          But then there is no solution in NT8?

          Because in NT7 this error does not occur and it works fine.

          Comment


            #6
            Hello cls71,

            I am not aware of a work around for this. RemoveLastBar() is a new concept for NinjaTrader 8.

            I am happy to submit a feature request on your behalf for IsFirstTickOfBar to not be true when RemoveLastBar() is called if you would like.

            Please note, it is up to the NinjaTrader Development to decide if a request will be implemented.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_ChelseaB View Post
              Hello cls71,
              I am happy to submit a feature request on your behalf for IsFirstTickOfBar to not be true when RemoveLastBar() is called if you would like.
              Yes, thanks.

              Comment


                #8
                Hello cls71,

                I've received tracking ID #SFT-3298 for your request that IsFirstTickOfBar is not set to true when RemoveLastBar() is called.

                Please note it is up to the NinjaTrader Development to decide if or when any request will be implemented.

                Thank you for your suggestion. Please let me know of any other requests you have for NinjaTrader.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by priceisking, Today, 12:51 PM
                1 response
                11 views
                0 likes
                Last Post NinjaTrader_PaulH  
                Started by chartish, Today, 10:33 AM
                3 responses
                18 views
                0 likes
                Last Post chartish  
                Started by casabella, Today, 11:51 AM
                1 response
                7 views
                0 likes
                Last Post NinjaTrader_PaulH  
                Started by Johnny, Today, 11:42 AM
                1 response
                13 views
                0 likes
                Last Post NinjaTrader_Jermaine  
                Started by habibalex, Today, 09:03 AM
                2 responses
                14 views
                0 likes
                Last Post sledge
                by sledge
                 
                Working...
                X