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 CortexZenUSA, Today, 12:53 AM
      0 responses
      1 view
      0 likes
      Last Post CortexZenUSA  
      Started by CortexZenUSA, Today, 12:46 AM
      0 responses
      1 view
      0 likes
      Last Post CortexZenUSA  
      Started by usazencortex, Today, 12:43 AM
      0 responses
      5 views
      0 likes
      Last Post usazencortex  
      Started by sidlercom80, 10-28-2023, 08:49 AM
      168 responses
      2,266 views
      0 likes
      Last Post sidlercom80  
      Started by Barry Milan, Yesterday, 10:35 PM
      3 responses
      13 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X