Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

State.Configure and OnRender

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

    State.Configure and OnRender

    Hi All,

    Hopefully quick question about the sequence of events in the NT lifecycle for an indicator. Would it be true that any logic (like initializing a string array) contained in State.Configure would happen BEFORE the very first call to OnRender() ??

    Thanks.

    #2
    Hello Bidder,

    Thanks for your post.

    Yes, that is correct. State.Configure in the OnStateChange() method will occur before the call to OnRender() occurs.

    This could be seen by adding a print in a condition that checks if State == State.Configure in OnStateChange() and also adding a print to the beginning of the OnRender() method. Then add the indicator to a chart an note a New > NinjaScript Output window to see the prints.

    See this help guide for more information about the NinjaScript Lifecycle: https://ninjatrader.com/support/help...fecycle_of.htm

    Let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Got it. Thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      41 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      27 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      45 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      37 views
      0 likes
      Last Post CarlTrading  
      Working...
      X