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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      181 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      334 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      258 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      358 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      187 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X