Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy getting out of sync

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

    Strategy getting out of sync

    Hello,

    My strategy is enabled and there is no connection loss or any new log that been created, and my strategy keeps getting out of sync (Sync: False) and I need to disable and re enable the strategy to make her re start. Today I lost 2 trades because of that.

    BR

    #2
    Hello fafichuli,

    Welcome to the NinjaTrader support forums.

    The Sync column simply shows if the strategy position is the same as the account position at that time.

    Are you placing any manual trades on the same account and instrument or do you have more that 1 strategy running on the same instrument/account? Each strategy instance has a virtual position separate from the real account position which is what the sync reports. That may or may not report true depending on what you are doing at the time and if the strategy currently matches what the actual account position is. If you place manual trades or if you have other strategies that place trades on the same instrument those would be cases where this strategy does not know about those orders to be in sync so it would report false.



    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hey Jesse,

      I didn't touched nothing (no manual trades or any changes made, and only one strategy is enabled in the live account), the strategy running since the start of the day and everything worked perfectly but there was 5 entery and exit points (or 3 trades) that it was ignored from them.

      Comment


        #4
        Images attached

        Comment


          #5
          Hello fafichuli,

          If you compare your live account statement do you see more or less trades than the strategy had placed in realtime during that time? The account sync column would indicate a difference in position, the specific definition is: Compares the strategy position to the current real-world account position relative to the configured instrument. A value of true indicates the strategy position is currently in sync with the account position

          If for any reason the account had a change on it that the strategy did not produce it would not be in sync.

          I could otherwise suggest to test this using the Sim101 account or the Playback connection to see if you can reproduce this happening, if so that would be helpful to better understand what is happening there.

          I look forward to being of further assistance.
          JesseNinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_Jesse View Post
            Hello fafichuli,

            If you compare your live account statement do you see more or less trades than the strategy had placed in realtime during that time? The account sync column would indicate a difference in position, the specific definition is: Compares the strategy position to the current real-world account position relative to the configured instrument. A value of true indicates the strategy position is currently in sync with the account position

            If for any reason the account had a change on it that the strategy did not produce it would not be in sync.

            I could otherwise suggest to test this using the Sim101 account or the Playback connection to see if you can reproduce this happening, if so that would be helpful to better understand what is happening there.

            I look forward to being of further assistance.
            If you compare your live account statement do you see more or less trades than the strategy had placed in realtime during that time? YES
            When I noticed that its missed 4 trades, I saw in the Strategies window that the strategy is enabled but under the Sync column it was FALSE
            I just run the strategy in playback and the 4 trades that got missed in the live account worked in the playback.


            Comment


              #7
              And for the first question: "If you compare your live account statement do you see more or less trades than the strategy had placed in realtime during that time? "
              I meant Yes, I saw less trades in my live account than the strategy had placed in the Chart

              Comment


                #8
                Hello fafichuli,

                I meant Yes, I saw less trades in my live account than the strategy had placed in the Chart
                Are you including the strategies historical trades at all or did you view the realtime performance report specifically? The sync would start from the starting of realtime when the strategy is in sync with the account so only realtime trades are included with that. In the strategies realtime performance report do you see different trades than the live account statement?

                Are you seeing any log information in the control center log pertaining to the times for when the missing orders should have been placed such as warnings or rejections?

                Please let me know if I may be of additional assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_Jesse View Post
                  Hello fafichuli,



                  Are you including the strategies historical trades at all or did you view the realtime performance report specifically? The sync would start from the starting of realtime when the strategy is in sync with the account so only realtime trades are included with that. In the strategies realtime performance report do you see different trades than the live account statement?

                  Are you seeing any log information in the control center log pertaining to the times for when the missing orders should have been placed such as warnings or rejections?

                  Please let me know if I may be of additional assistance.
                  I can't see the realtime performance because I restarted the strategy as soon I noticed the dead time frame.
                  And I attached log file screen shot there was no errors or rejections in the dead time frame that missed the 4 trades (that is what I don't understand what happened in this dead time frame)

                  Comment


                    #10
                    I run another session of the strategy one on my live account and one on my Sim101 account. First trade was fine and executed in both accounts, the second trade was only execute in the Sim101 account.

                    Comment


                      #11
                      Hello fafichuli,

                      In your new test test how are you confirming the condition to trade is becoming true for the live account strategy at that time? Are you using Prints or just visually comparing the two strategies? Adding the Sim101 test will only help if you can confirm that both scripts logically worked the same between tests, that would generally involve using Prints to confirm that the entry condition happened at a specific time or bar.

                      If you can see by using a Print or other debugging means that the logic was called at the same time but the entry did not get submitted for some reason you could try using TraceOrders to see if the order was ignored or cancelled. You can additionally check in the NinjaScript output window or log to see if anything was noted for the missing trade when TraceOrders is enabled.




                      Please let me know if I may be of additional assistance.

                      JesseNinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by BarzTrading, Today, 07:25 AM
                      2 responses
                      27 views
                      1 like
                      Last Post BarzTrading  
                      Started by devatechnologies, 04-14-2024, 02:58 PM
                      3 responses
                      20 views
                      0 likes
                      Last Post NinjaTrader_BrandonH  
                      Started by tkaboris, Today, 08:01 AM
                      0 responses
                      6 views
                      0 likes
                      Last Post tkaboris  
                      Started by EB Worx, 04-04-2023, 02:34 AM
                      7 responses
                      165 views
                      0 likes
                      Last Post VFI26
                      by VFI26
                       
                      Started by Mizzouman1, Today, 07:35 AM
                      1 response
                      11 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Working...
                      X