Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Managing Strategies

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

    Managing Strategies

    Hi,

    I am looking for some tips on how to manage strategies. I am monitoring 3 different strategies. I have attached these to around 20 different charts for different instruments and time frames.

    Problem is when I loose connection or experience some other events I have to set up all the strategies again, and this becomes tedious.

    Some events allow the strategy to be re-enabled from the Control Centre, other events clear the Control Centre of all strategies and the strategies have to be re-enabled from the charts. Other events remove the strategies from the charts and they have to be re-loaded. Some events leave 'old' blank copies of indicators created by the strategies.on the charts, and the chart has to be re-created.

    Is there an easy way to recover from an event without having to set up the work space from scratch?

    Thanks

    #2
    Hello IanC28,

    Thanks for your post.

    ConnectionLossHandling can be used to keep the strategies running in case of connection losses. RealtimeErrorHandling can also be used to detect other errors and keep the strategy running. (For example, if the strategy receives an order rejection, you can set RealtimeErrorHanlding to StopCancelCloseIgnoreRejects or IgnoreAllErrors and handle the order rejection in OnOrderUpdate.)

    ConnectionLossHanlding - https://ninjatrader.com/support/help...sshandling.htm

    RealtimeErrorHandling - https://ninjatrader.com/support/help...orhandling.htm

    There is not any supported out-of-box UI automation that we can offer for automatically re-enabling these strategies, but some clients have discussed some ideas on this forum. I'll provide a link to a related thread below.

    https://ninjatrader.com/support/foru...ation-feasible

    Please let me know if there is anything else we can do to help.
    JimNinjaTrader Customer Service

    Comment


      #3
      Jim thanks for the above information.

      I have implemented the suggestions, but still have the same issues. The strategies no longer stay on the control panel, so have to be re-activated from the chart.

      I get error message "Strategy xxxx lost price connection but will keep running" . . . which is what I want.

      But the error that seems stop everything is "Strategy xxxx lost order connection more than 4 times in the past 5 minutes and will be disabled"

      Is there a way to disable that time limit. Or increase it. All the errors happen within a few seconds so its the 'more than 4 times' that is triggering the disabling of the strategy.

      During testing I really want the strategies to stay active irrespective of loss of connection.

      Thanks

      Ian

      Comment


        #4
        Hello Ian,

        ConnectionLossHandling has 3 additional properties that can be used to tweak it.

        DisconnectDelaySeconds - https://ninjatrader.com/support/help...layseconds.htm

        NumberRestartAttmepts - https://ninjatrader.com/support/help...rtattempts.htm

        RestartsWithinMinutes - https://ninjatrader.com/support/help...hinminutes.htm

        You could increase these values with the ConnectionLossHandling behavior to keep the strategy running longer with more disconnects and longer disconnects. Also to consider, these behaviors can be tweaked across the platform in the Options Menu under Strategies.

        Strategies Options menu reference - https://ninjatrader.com/support/help...riptProperties

        Please let us know if we can be of further help.
        JimNinjaTrader Customer Service

        Comment


          #5
          Jim,

          Thanks for the information. Looks like it is all I need.

          Ian

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by andrewtrades, Today, 04:57 PM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by chbruno, Today, 04:10 PM
          0 responses
          6 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Started by josh18955, 03-25-2023, 11:16 AM
          6 responses
          436 views
          0 likes
          Last Post Delerium  
          Started by FAQtrader, Today, 03:35 PM
          0 responses
          7 views
          0 likes
          Last Post FAQtrader  
          Started by rocketman7, Today, 09:41 AM
          5 responses
          19 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X