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 usazencort, Today, 01:16 AM
      0 responses
      1 view
      0 likes
      Last Post usazencort  
      Started by kaywai, 09-01-2023, 08:44 PM
      5 responses
      602 views
      0 likes
      Last Post NinjaTrader_Jason  
      Started by xiinteractive, 04-09-2024, 08:08 AM
      6 responses
      22 views
      0 likes
      Last Post xiinteractive  
      Started by Pattontje, Yesterday, 02:10 PM
      2 responses
      20 views
      0 likes
      Last Post Pattontje  
      Started by flybuzz, 04-21-2024, 04:07 PM
      17 responses
      230 views
      0 likes
      Last Post TradingLoss  
      Working...
      X