Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy enabled event

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

    Strategy enabled event

    Hi,

    Is there the equivalent of a strategy enabled event? I connect to some external resources via a custom dll and therefore only want to do that when the strategy is first enabled. It turns out the OnStateChange event (State.Configure) is called any number of times when the strategy isn't enabled.

    I do not want to connect to the external resources until the strategy is actually enabled but I cannot find an event that would let me know that nor can I determine how to check the if my strategy has been enabled (ideally an event so I can do one time processing there).

    Thanks,
    Scott

    #2
    Hello Scott,

    If the script reaches the State.DataLoaded state, this indicates that the strategy or indicator was enabled.

    Below is a publicly available link to the help guide on the State property.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Chelsea,

      Thanks for the clarification; I had gone through that link but wasn't sure if DataLoaded was the state I was looking for. I logged the states trying to sort it out but it was a bit confusing because it cycled through so many times, often even before I was even connected.

      I am clear now.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      61 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      39 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      21 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      23 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      51 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X