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

Problems with Add(0 method

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

    Problems with Add(0 method

    It's nice to be able to place additional Barsarray objects onto a chart in the Initialize module using the Add method, but this seems to be a good way to generate indicators that plot flat lines or crash. Usually the method will work, but it's not unusual for the ADDed BarsArray object to have a Count of Zero, causing the indicator to plot a flat line. Then, if Ninjatrader is restarted the ADDed BarsArray objects sometimes will come in and sometimes they won't. Or sometimes Ninjatrader will crash with a stack overflow.

    Because the Add method is used in the Initialize module, where Bars Array properties are not available, there is no way to tell there if the Add() operation was successful, or to do anything about a failure.

    Heaven help you if you try to Dispose() of a BarsArray object in OnTermination(), which will cause a really nasty crash.

    This supposed capability is not living up to reasonable expectations. There seem to be serious under the hood problems with Add().

    "Unfortunately this is beyond the scope...."

    #2
    Hello,

    Thank you for your feedback and sharing your experience with this particular method.

    Would you be able to provide a sample script which illustrates the stack overflow error? I would like to run this on my end to see if we can further explain this behavior, or use this to help improve this method in a potential future version.

    Thanks.
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by pibrew, Today, 06:37 AM
    0 responses
    0 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    12 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    11 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    15 views
    0 likes
    Last Post AaronKoRn  
    Working...
    X