• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Terminated

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

    Strategy Terminated

    Hello,

    I am trying to run a strategy on my chart, but after clicking "OK" in the strategy window, nothing happens. My strategy simply prints the state it is currently in (i.e. SetDefaults, Configure, Active, etc). In fact, I copied the SampleMACrossOver strategy and added a single unconditional line Print(State) inside of the OnStateChange() event handler. I can see that it goes through SetDefaults, Terminated, and Configure just fine, but after clicking "OK" in the strategy configuration window, the strategy shows "Terminated" four times in the output window and then (obviously) does nothing. I also added a single unconditional line Print("Bar Update") to the OnBarUpdate() event handler, and it is never called --which verifies that the strategy is indeed terminated.

    I am using NT8 and I do have chart trading disabled (Set to "Off", not hidden) so I am very confused why I'm having so much trouble getting a sample strategy to run properly. Your input is much appreciated.

    Thank you!

    jflaggs
    Attached Files

    #2
    Hello jflaggs,

    Thanks for your post and welcome to the NinjaTrader forums!

    As a general guide, if you apply a strategy and it does not operate as expected, check the strategy name on the chart in the upper left corner, if it shows (D) in front of the name the strategy is or has become disabled. Another check is to examine the "Log" tab of the control center to see if any error messages are shown from run time type errors that would disable the strategy.

    I downloaded and ran your script without any issues. In NT8 you can run the strategy on the chart with the chart trader enabled.

    Please make sure that you check the "enable" check box in the strategy parameters before clicking the OK button.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Ah, rookie mistake, indeed! I didn't realize there is a log to show messages like this. Turns out that the strategy you downloaded was never enabled in my platform. My custom strategy has data loading issue that causes it to be immediately disabled. Thank you for the help, Paul!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by saltminer, Today, 05:19 PM
      0 responses
      3 views
      0 likes
      Last Post saltminer  
      Started by martyn73, Today, 04:18 PM
      0 responses
      2 views
      0 likes
      Last Post martyn73  
      Started by aprendiz, Today, 03:42 PM
      0 responses
      2 views
      0 likes
      Last Post aprendiz  
      Started by 1001111, Today, 09:10 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Started by usero86, Today, 06:02 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Working...
      X