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

Object Lifecycle of hosted child indicator, Calc.OnEachTick

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

    Object Lifecycle of hosted child indicator, Calc.OnEachTick

    Hi,
    I ran into a confusing scenario yesterday.

    My parent ind script has calc.OET
    My hosted child ind script also has calc.OET

    In my child ind script, I was debugging to Log() during the State=Config, to determine if Period property was set below a minimum value when called from the parent.


    My understanding on Obj Lifecycle was that config is only called when the config dialog box / window is displayed / submitted...

    But my log quickly filled up and a chart refresh ran for over an hour before I pulled the plug.

    So it appears when the parent makes a call to a hosted child ind script, that child script triggers the state=config on each call (i.e. on each tick ) ?

    Is this accurate? Does it also trigger the state = dataloaded on each call?
    Since I have series being instantiated during the state=DL, are these series being created on each instance all and then destroyed after the child script has finished and returns to the parent?

    I'm asking bcuz I could not find any description or explanation of this in documentation or the forum search.

    Thanks

    #2
    Hello balltrader,

    Thank you for your post.

    I'm not seeing the same occur in my testing - while State.Configure can be reached multiple times, it shouldn't be triggering every time the script makes a call to the hosted script.

    Would you be able to provide a reduced example that displays this behavior so we may test on our end to see what may be occurring?

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Rapine Heihei, Today, 08:19 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by Rapine Heihei, Today, 08:25 PM
    0 responses
    5 views
    0 likes
    Last Post Rapine Heihei  
    Started by f.saeidi, Today, 08:01 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by Rapine Heihei, Today, 07:51 PM
    0 responses
    6 views
    0 likes
    Last Post Rapine Heihei  
    Started by frslvr, 04-11-2024, 07:26 AM
    5 responses
    98 views
    1 like
    Last Post caryc123  
    Working...
    X