Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

strategy lot execute issue on connection loss and reestablished

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

    strategy lot execute issue on connection loss and reestablished

    at 6:05 AM, there was connection issue. so, strategy restarted again when connection was re-established. which is good.

    but then i found, by co-incidence, at the same time 6:05 AM, two SELL signals were generated by running strategy, and those orders did not execute

    Question:

    i want to know the solution, how can we do this? if strategy dissconnected for 5 minute and connection comes back- then i want to make sure that all previous generated signals during that downtime still gets executed when connection is back



    see picture below


    .

    Idea:

    1. do i need to change options/strategies- on connection loss= recalculate?

    2. do i need to change strategy behaviour= immediately submit? (instead of currently I have waituntilflat)
    3. current bars required to trade=1. is that fine?

    4. or do i need to change disconnect delay seconds= 1000 (instead of currently 5 seconds) within options/strategies section




    Please guide me











    Attached Files

    #2
    Hello manitshah915,

    Thanks for your post.

    Please send us your log and trace files to scriptingsupport[at]ninjatrader[dot]com so we may investigate this further. In the subject of your email include ATTN: Brandon H and in the body of the email include a link to this forum post.

    Follow the steps below to manually attach your log and trace files to your response so I may investigate this matter further.
    • Open your NinjaTrader folder under, "Documents" (sometimes called, "My Documents")
    • Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
    • Send the 2 compressed folders as attachments to this email.
    • Once complete, you can delete these compressed folders.
    I look forward to assisting further.​
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Brandon.

      DO NOT WASTE TIME HERE.

      don't ask for logs. I am aware of logs and all. my question is for getting guidance

      don't take it in different direction

      Instead i want some other support person with technical knowledge to pitch in here.

      By giving me guidance.


      Brandon! loop in some other person. when u told me to send u logs, I figured u will be waste of time.

      Chelsea or other folks never answer like this.

      this is not error issue- which needs any logs. OKAY?


      i want guidance on how to achieve this.

      Again, don't waste time and loop in other qualified technical expert. instead of asking me logs.



      please, i am here to solve problem not to waste my time by analyzing logs. again, don't go in logs direction. DID U UNDERSTAND??

      Comment


        #4
        Hello manitshah915,

        Thanks for your notes.

        I requested the Log and Trace files so that I could get a full understanding of the order behavior during the connection loss to investigate how the strategy submitted the order and what status the order was in when the connection loss occurred so that I can give you the best guidance possible on the matter.

        Ultimately, if a connection loss occurs before the strategy submits the order, this order would not be placed by the strategy since there was a lost connection to the data feed. If a connection loss occurs then the strategy cannot submit that order.

        The strategy would then resume or need to be re-enabled when you regain connection to your data feed. Once you are reconnected and the strategy is enabled, the strategy could continue placing orders when a condition to place an order becomes true from the time you regain connection.

        For example, if you lost connection at 6:05 AM and then the condition to place an order became true, the order would not be placed since you are not connected. Once you regain connection and the strategy conditions to place an order become true again, an order will be placed by the strategy.

        If the strategy placed an order prior to the connection loss and you want the strategy to resume a position, you could consider setting the Start Behavior of the strategy to Immediately Submit when re-enabling the strategy once your NinjaTrader platform reconnects to the data feed connection.

        Immediately Submit automatically submits working orders from when the strategy processed historical data, and assumes the strategy position and account position are where you want it when you enable the strategy. This is typically used to have a strategy resume a position after disabling/enabling. If the strategy already had live orders running, the orders will resume with the new enablement of the strategy if they match the historically calculated orders. If the orders calculated from historical data do not match the live working orders, the live working orders will be cancelled and replaced by those calculated from historical data.

        Start Behaviors: https://ninjatrader.com/support/helpGuides/nt8/NT%20HelpGuide%20English.html?syncing_account_posi tions.htm

        If you set the On Connection Loss Handling setting to 'Keep Running' this will keep the strategy running and logs the disconnection. When the connection is reestablished, the strategy will resume as if no disconnection occurred.

        If you set the On Connection Loss Handling setting to 'Recalculate', The strategy will attempt to recalculate its strategy position when a connection is reestablished and held for longer than 10 seconds. Recalculations will only occur if the strategy was stopped based on one of the conditions below. Should the connection be re-established before the strategy is stopped, the strategy will continue running without recalculating as if no disconnection occurred.
        • If data feed disconnects for longer than the time specified in “Disconnect delay seconds”, the strategy is stopped and the disconnection is logged.
        • If the order feed disconnects and the strategy places an order while disconnected, the strategy is stopped and the disconnection is logged.
        • If both the data and order feeds disconnect for longer than the time specified in “Disconnect delay seconds”, the strategy is stopped and the disconnection is logged.
        ​Understanding NinjaScript Properties: https://ninjatrader.com/support/help...strategies.htm
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        109 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        58 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        37 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        39 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        76 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X