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 freezing after 'ERROR: Received position for unkown symbol 'CMEMNQZ3''

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

    Strategy freezing after 'ERROR: Received position for unkown symbol 'CMEMNQZ3''

    Hi all,
    I'm having trouble with a strategy and would like to know a few things. It would be great if someone could give me an answer to this.

    Connection: APEX Rithmic


    The problem is not always, but in many cases the chart freezes and NT has to be restarted when this happens. I would like to know the following:
    1. Who is sending this error, who is responsible for that?
    2. What exactly does this message mean?
    3. How can such an 'error' arise?
    4. How can it be prevented?
    I set up a Tradovate connection for testing purposes, and I had no problems with it. The problem only exists with Rithmic and only with live trades. There are no problems with SIM or Tradovate
    Tested instruments: NQ/MNQ/ES/MES
    sidlercom80
    NinjaTrader Ecosystem Vendor - Sidi Trading

    #2
    Hello sidlercom80,

    Position updates are sent from the account so in this case it would be the apex rithmic account. The error mentions that the position event that was received was for an unknown symbol, that may be due to the symbol name that apex is sending out. I would be unsure what the reason for that would be, I would suggest to contact apex for that account to make sure everything is configured correctly on the account in addition to the settings in the platform for that account connection.

    I am not sure if that error would be related to the chart freezing, are you seeing any errors in the log when the freeze happens or if you try to close the chart window? Does the chart freeze if you do not apply the strategy on the chart but instead apply it directly to the control center?

    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello sidlercom80,

      Position updates are sent from the account so in this case it would be the apex rithmic account. The error mentions that the position event that was received was for an unknown symbol, that may be due to the symbol name that apex is sending out. I would be unsure what the reason for that would be, I would suggest to contact apex for that account to make sure everything is configured correctly on the account in addition to the settings in the platform for that account connection.

      I am not sure if that error would be related to the chart freezing, are you seeing any errors in the log when the freeze happens or if you try to close the chart window? Does the chart freeze if you do not apply the strategy on the chart but instead apply it directly to the control center?
      Hi Jesse,

      Thanks for your answer. The fact that the chart freezes and NT has to be restarted definitely has something to do with the problem. The chart freezes before this error message appears. This message only comes after I clicked on the x in Rithmic Trader to close the still open position. No errors visible in the log except this error.
      I can't test the strategy directly via the control center because I need a chart so I can place the orders.
      sidlercom80
      NinjaTrader Ecosystem Vendor - Sidi Trading

      Comment


        #4
        Hello sidlercom80,

        Based on the additional details that message is likely not specifically related to the freeze, if that only happens when you manually close the position in R trader the unknown symbol may be related to that. You could have the strategy enter a position, disable the strategy and then manually close the position in the same way to see if that message appears again.

        To better understand the freeze situation we would need to know if some code in the strategy is causing the chart to freeze.

        If you need a chart because you are making custom buttons or using custom actions in the chart that would make testing more difficult. The best way to approach this would be to make a way in the strategies logic that it can place trades on its own so it can be applied to the control center. That would remove any graphical items the strategy is doing and also if you are doing any UI modification that would remove that as well. If the chart no longer freezes when running the strategy that would point to something being done in its logic.

        One possible way to have the strategy place trades without the chart would be to use a text file to provide whatever price or value is needed to trigger an order. The strategy could read that file every so often and place trades based on what you put in the file. That would let you test it using the control center.

        JesseNinjaTrader Customer Service

        Comment


          #5
          Hi Jesse,

          As always, I opened a position using the strategy, ended the strategy and then canceled the position using x in the Rithmic trader. No error message.

          The other thing you suggested will be difficult, and I need time to test it.

          However, I'm surprised that the error only occurs with Rithmic and only in live. No problems with SIM (Rithmic and Tradovate) and Tradovate (Live), which I tested. How do you explain to me that it can be a graphical problem, I would be very interested in that?
          Last edited by sidlercom80; 11-17-2023, 11:03 AM.
          sidlercom80
          NinjaTrader Ecosystem Vendor - Sidi Trading

          Comment


            #6
            NinjaTrader_Jesse I have to withdraw my statement that the error message only comes after the chart has frozen, and I have pressed the x button in RTrader.
            The current situation here was the following. I pressed my close button, which is normally not a problem, and closes the still open position. The chart froze, see picture, and after a few seconds the error message appeared. Then I ended the position in RTrader using the x button.

            Click image for larger version  Name:	i_view64_vNlYVEXKFn.jpg Views:	0 Size:	293.7 KB ID:	1278498
            sidlercom80
            NinjaTrader Ecosystem Vendor - Sidi Trading

            Comment


              #7
              Hello sidlercom80,

              I wanted to clarify the details here.

              You said you clicked your close button, do you mean that your strategy adds its own close button? Or was that the close button in the chart trader?

              If you have custom buttons and the chart froze after clicking the custom button that may be able to be explained based on the code being used. If you are creating a custom button I would need to see a sample of that buttons logic to get a better idea of what may be causing the freeze. One specific reason that would happen would relate to using dispatchers incorrectly.

              JesseNinjaTrader Customer Service

              Comment


                #8
                Hi Jesse, Yes I have my own button that I use. I have a very simple question for you. You say it could be a wrong dispatcher and not used correctly, that's how I understand it. Please explain to me why there are NO problems with the same application in SIM mode or in the Tradovate account. If the problem is supposed to be a dispatcher, or if the problem is generally to be found in the UI, the problem should always occur and not just sometimes and only in connection with Rithmic.
                sidlercom80
                NinjaTrader Ecosystem Vendor - Sidi Trading

                Comment


                  #9
                  Hello sidlercom80,

                  I couldn't explain that because I don't know how the internals of each connection works. There are specific requirements when using dispatchers though which if used incorrectly can lead to deadlock situations that would cause the control being dispatched to to freeze. When using dispatchers to add to the UI or perform updates to UI controls you need to make sure to use the correct parent objects dispatcher and also ensure you are always using InvokeAsync for any code being invoked. For any NinjaScript based property or method being used in the buttons event handler you need to ensure you are using a TriggerCustomEvent around that code.




                  JesseNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by DJ888, Today, 10:57 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by MacDad, 02-25-2024, 11:48 PM
                  7 responses
                  158 views
                  0 likes
                  Last Post loganjarosz123  
                  Started by Belfortbucks, Today, 09:29 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post Belfortbucks  
                  Started by zstheorist, Today, 07:52 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post zstheorist  
                  Started by pmachiraju, 11-01-2023, 04:46 AM
                  8 responses
                  151 views
                  0 likes
                  Last Post rehmans
                  by rehmans
                   
                  Working...
                  X