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

Strategy did not make entry after disconnected and reconnected

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

    Strategy did not make entry after disconnected and reconnected

    Hello,

    today we were facing issue. We are running strategy on NQ.
    Strategy got disconnected for about 20 minutes - then it reconnected and kept enabled.
    Hour later we noticed that, there should be entry (after reconnecting) but strategy did not enter.
    After reloading data it showed traded on historical data.

    How does strategy work, when it reconnects - can we set that it reloads data or that it reconnects and keeps making entries.

    Thans a lot Paul

    #2
    Hello kujista,

    Thank you for your post.

    You can adjust your ConnectionLossHandling settings. The default behavior is Recalculate, where the strategy will attempt to recalculate its strategy position when a connection is reestablished - which is why you are seeing it running on historical data upon reconnection.

    If you don't want the strategy to run through the historical data after reconnecting, you can change the ConnectionLossHandling to KeepRunning.

    ConnectionLossHandling.KeepRunning - Keeps the strategy running. When the connection is reestablished the strategy will resume as if no disconnect occurred.



    Please let me know if you have any further questions.
    Gaby V.NinjaTrader Customer Service

    Comment


      #3
      OK I understand, there was another thing - when we get disconnected - we were in position on other market.. position stayed there, but sl and pt disappeared.. how can we change this? We hed strategy set in options to Strategies -> On connectino Loss -> Recalculate. and Cacnecl exit orders - was not checked.

      Comment


        #4
        Hello kujista,

        When using Recalculate, the default action is to cancel all active orders.

        If your strategy retained the entry order, this mostly likely means the strategy recalculated the same position and resubmitted the same order again (but without the sl and pt) to recalculate the strategy position.​

        This also depends on the start behavior your strategy is using. The default behavior is Wait Until Flat which will cancel orders and not submit new orders.

        Syncing account positions - https://ninjatrader.com/support/help..._positions.htm


        Immediately Submit will map orders to the strategy as long as the strategy recreates them in historical:

        "On startup the strategy will begin executing orders immediately.

        •Any active orders on the account previously generated by the strategy that does not match* an active strategy order will be cancelled. Should the strategy be unable to cancel and receive confirmation on the cancellation of these orders within 40 seconds the strategy will not start and an alert will be issued.

        The matching active orders on the account will then be mapped to the active strategy orders"

        Please note that all start behaviors will cancel orders first.

        If you have any further questions, please let us know.
        Gaby V.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,406 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        98 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        8 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        160 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        9 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X