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

Sync issues

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

    Sync issues

    hello,

    I run a number of strategies (around 10) in parallel using mainly separate virtual and IB accounts and a mix of Kinetick and Interactive Brokers connections. At some point I notice that in some accounts the "Sync is FALSE. I "SYNC ALL STRATEGIES" and some times works but on many occasions not. Under "TOOLS" there is the option "Global simulation mode" which I know that in order to run live strategies this needs to be unselected. Do you think this has something to do with that?

    thanks

    #2
    Hello space_trader,

    Thank you for the post.

    The Sync column in the control center would not specifically have to do with the Global Simulation Mode checkbox however it does relate to the live account. Sync true means the strategies virtual position matches the accounts real position. https://ninjatrader.com/support/help...eStrategiesTab

    A situation where you would see that go false would be if you run two strategies on the same instrument. If you are flat and strategy A enters a Long order, Strategy B would not know that to enter into the same position. It would then report as Flat although the account is 1 long. That is where you see sync false on strategy B because it no longer knows the actual position in contrast to what its logic has done.

    In some use cases you will see false, the situation I described above would be one of those cases. If two strategies are being run at once on the same instrument and that was the intended goal/they have correctly been programmed to do that then you can ignore the sync column it will just report false after they start trading.


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

    Comment


      #3
      I run a number of strategies as well but 1 for each instrument (never 2 strategies on the same instrument) about 8 strategies in all. One of those strategies which was fine earlier this morning went out of sync (SYNC=FALSE). This morning, My strategy under SI futures was SYNC=TRUE, but an hour later, I see that SYNC=FALSE. I checked the log and there are no colored lines indicating any errors in connectivity nor orders. I selected 'Sync All Strategies' in hopes to fix this, and it still remains SYNC=FALSE.

      Any thoughts on this or how it may be resolved without disturbing the existing strategy which is currently running?

      Comment


        #4
        Hello wildwex,

        The sync column shows if the strategy position matches the account position and that is all. If there were any changes to the account position which the strategy did not make then the sync should show false. You would otherwise need to compare the account/live orders which resulted in the position against the strategy performance report to see where the mismatch may be.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          Hello wildwex,

          The sync column shows if the strategy position matches the account position and that is all. If there were any changes to the account position which the strategy did not make then the sync should show false. You would otherwise need to compare the account/live orders which resulted in the position against the strategy performance report to see where the mismatch may be.
          Hi, i have exact the same issue as well as wildwex.

          And also as strategy is now out of synch and FALSE it fails to register any new signal inputs from the same strategy.
          ie.
          The stop-loss does not work any longer. New trigger in the opposite direction is not being recognized.
          Apparently the strategy must be in synch as TRUE otherwise all hell breaks loose ?
          It seems that strategy simply turns from TRUE to FALSE on a dime. Without changes to the account position.
          Why ?

          Any other remedies that we can apply to fix this ?

          thank you kindly for your time
          :-)

          Comment


            #6
            I watched the chart as well as the strategy table and I saw that SYNC went from TRUE to FALSE during an order of a single contract on an instrument for which there is only one strategy running. Here is the log of the transactions. You can see a separate transaction for ES which executed about the same time. I don't see any error message nor any issue for which would cause the strategy to go out of sync. Everything was cleared off and reset. When the SYNC=FALSE, the strategy no longer takes further trades. I need to understand this, please. I need to know how this can be rectified.

            Click image for larger version

Name:	Screen Shot 2021-10-14 at 19.17.22.png
Views:	510
Size:	293.8 KB
ID:	1174945

            Comment


              #7
              Hello,

              The Sync column simply tells you if the strategy position currently matches the account position. Without specific details on what orders/positions were on the account while the strategy was running I couldn't say why that would be false other than its expected if the strategies virtual position is not the same as the account position.

              Here is a simple example of how you can see that become false,

              You are running a strategy and it enters long. You additionally enter long manually using the chart trader on the same instrument. The Sync column should now be false.
              Running more than 1 strategy will also cause the sync to be false.

              If your strategy stops taking trades at some point then you need to debug your code to find out why. Focusing on the sync column will not be helpful in knowing why your strategy is not trading. The first step would be to identify where the problem is with the code used. A good place to start is to see if your entry condition are true when you see the sync false, you could use Prints to achieve that. Placing a Print inside the entry condition and then monitoring the output window to observe if that stops printing would let you know if its working or not.

              You would need to otherwise review what trades were placed to your account to see what positions were made. You could compare that against the running strategies performance report. That would let you see what specific situation causes the sync to be false so you can adjust what you are doing or what the strategy is doing.

              JesseNinjaTrader Customer Service

              Comment


                #8
                Two questions here.

                1. What are the specific details on what order/positions were applied do you need? Is there a log that I can provide you in order to get you the information you need since this is reproducible?

                2. Your query with regards to "if your strategy stops taking trades...." seems to indicate that you are suggesting when SYNC=FALSE, trades should still be taking place. Can you Confirm?

                -- Gregory

                Comment


                  #9
                  Hi, thanks for your reply.

                  1. You may send your log and trace files to us, when you send them in, please let me know the last time this happened.

                  You can do this by going to the Control Center-> Help-> Email Support

                  Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.

                  Please reference the following ticket number in the body of the email: 2939211 ATTN ChrisL

                  2. The strategy can still take trades even when it is not in sync with your account position. It will only consider the virtual strategy position as the true position.

                  Best regards,
                  -ChrisL
                  Chris L.NinjaTrader Customer Service

                  Comment


                    #10
                    Hello wildwex,

                    1. What are the specific details on what order/positions were applied do you need? Is there a log that I can provide you in order to get you the information you need since this is reproducible?
                    If you are trading with the sim account you would need to use the Trade Performance window and open that window after the situation you described so it contains the current trades. You could then compare that against the individual strategies performance report to see what specifically is missing from the strategies report compared to the overall account.

                    Based on what you observe you could see why the account position was not in sync with that individual strategies position. The log and trace would not help to see why the strategy was out of sync with the account because we cannot see the running strategies performance report at that point in time when the column shows false in the log. You would have to review this while the strategy is running so you can see its performance report compared to the overall accounts report. For a live account you would instead review your broker trade statement vs the strategies performance report.


                    2. Your query with regards to "if your strategy stops taking trades...." seems to indicate that you are suggesting when SYNC=FALSE, trades should still be taking place. Can you Confirm?
                    That depends on what you coded. The sync column only tells us the state of the strategy position against the account position. That's all it tells us, the column otherwise has no other effect on how your strategy operates. If your strategy stopped placing trades that's a case you need to debug the script. The items you see in the UI can in some cases be helpful to better understand the situation but the sync column really wouldn't be helpful in knowing why it stopped trading. That does let you know the strategy position didn't match the account position at that point in time and that's really all.





                    JesseNinjaTrader Customer Service

                    Comment


                      #11
                      Jesse - thanks for the level of detail. Now I have a better idea what to look at, consider to help identify why it happens. Much appreciated - thank you!

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by RookieTrader, Today, 07:41 AM
                      1 response
                      4 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by kujista, Today, 05:44 AM
                      1 response
                      8 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by elderan, Yesterday, 08:03 PM
                      1 response
                      12 views
                      0 likes
                      Last Post NinjaTrader_BrandonH  
                      Started by samish18, Yesterday, 08:57 AM
                      8 responses
                      25 views
                      0 likes
                      Last Post samish18  
                      Started by DJ888, 04-16-2024, 06:09 PM
                      3 responses
                      10 views
                      0 likes
                      Last Post NinjaTrader_Erick  
                      Working...
                      X