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

IsFirstTickOfBar with LineBreak barstype. Error

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

  • pjsmith
    replied
    Just for info, came across this when I just realised IsFirstTickOfBar is set to true permanently when using these bar types. Seems silly to me, but I guess some workaround with CurrentBar can be made.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    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.

    Leave a comment:


  • cls71
    replied
    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.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    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.

    Leave a comment:


  • cls71
    replied
    Thanks ChelseaB,

    But then there is no solution in NT8?

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

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    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.


    This will also affect any other bar type (such as Renko bars) if and when it calls RemoveLastBar().
    Last edited by NinjaTrader_ChelseaB; 06-14-2022, 09:50 AM.

    Leave a comment:


  • cls71
    replied
    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.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    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?

    Leave a comment:


  • cls71
    started a topic IsFirstTickOfBar with LineBreak barstype. Error

    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

Latest Posts

Collapse

Topics Statistics Last Post
Started by gentlebenthebear, Today, 01:30 AM
2 responses
13 views
0 likes
Last Post gentlebenthebear  
Started by Kaledus, Today, 01:29 PM
2 responses
8 views
0 likes
Last Post Kaledus
by Kaledus
 
Started by frankthearm, Yesterday, 09:08 AM
13 responses
46 views
0 likes
Last Post frankthearm  
Started by PaulMohn, Today, 12:36 PM
2 responses
16 views
0 likes
Last Post PaulMohn  
Started by Conceptzx, 10-11-2022, 06:38 AM
2 responses
56 views
0 likes
Last Post PhillT
by PhillT
 
Working...
X