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

Unmanaged Mode with partialFilled Orders and Trailingstop

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

    #16
    Hello sildercom80,

    I could not give any recommendations for specific companies that can give out a free Rithmic demo. I wouldn't be able to advise further over private message either.

    You could check Rithmic's website for some options for companies that may be able to offer one for you. You may also wish to contact Rithmic directly to see if they can provide some options.

    Rithmic Contact page (publicly available) - http://yyy3.rithmic.com/?page_id=17

    Let me know if there is anything else I can share insight on.
    JimNinjaTrader Customer Service

    Comment


      #17
      Hello alidercom80 and others reading,

      Rithmic uses separate feeds for Order Execution and Position events. While NinjaTrader makes an effort to ensure that Executions happen after Order events, it cannot always ensure this ordering. This is a limitation of NinjaTrader when using Rithmic.

      A workaround can be used like that is attached in the post below for the case where the Execution for an order that is part filled comes before the final order update for the filled order.

      good day together, i have now spent 2 days on this and other forums looking for a solution to my problem and hope to get an answer to my question here ;-) the following scenario in unmanaged mode: -----------------------------------------------------------------------------------------------------------------------------------


      We look forward to assisting.
      JimNinjaTrader Customer Service

      Comment


        #18
        Hello _Jim and others,

        i finally got a rithmic data feed to test and it looks like everything is working properly. i will continue to test this extensively.
        Now I've noticed a new problem: in simulation mode everything is ok, but when using rithmic, the account position and the strategy position is not updated correctly. when i trade a contract, the account position is shown with 1, but the strategy position is shown with 0, when the position is closed, the account position is set to 0, but the strategy position is set to 1. what could be the reason, somebody has an idea?
        sidlercom80
        NinjaTrader Ecosystem Vendor - Sidi Trading

        Comment


          #19
          the following scenario:

          (wrong in live account)
          account position flat == strategy position flat
          strategy buy 1
          account position 1 / strategy position 0
          strategy sell1
          account position 0 / strategy position 1

          (right in sim account)
          account position flat == strategy position flat
          strategy buy1
          account position 1 / strategy position 1
          strategy sell1
          account position 0 / strategy position 0

          i don't understand this, how is it possible that an account position is 1, but the strategy position is 0 (live)? if it was the other way around, i could understand it ;-)
          sidlercom80
          NinjaTrader Ecosystem Vendor - Sidi Trading

          Comment


            #20
            Hello sidlercom80,

            Thanks for your replies.

            The Strategies grid updates based on Position Updates, and since the Order/Execution/Position updates come in an irregular order from NinjaTrader's Connection Adapter, the same limitation impacts this case as well.

            The Account Position is updated when a position update is seen for the account, and the Strategy's Position object is based upon Execution events for the strategy/instrument. The Position Update also triggers the refresh of these columns in the Strategies grid.

            At this time, this would be an expected limitation of the NinjaTrader platform.

            I may suggest using Draw.TextFixed in the strategy's OnExecutionUpdate method to have the strategy display its position on the chart.

            I have also tracked your impact in our internal Change Request ticket to improve the ordering of these events coming out of the Rithmic Connection Adapter. The ticket ID is SFT-3467. This is an internal number, but for anyone else wishing to have their interest tracked, please let our support staff know that you would like a vote added for this request.

            We receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing.

            When new features or changes are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number will be different than the internal request tracking ID, but the description of the change will let you know if it has been implemented.

            Release Notes - https://ninjatrader.com/support/help...ease_notes.htm

            I look forward to assisting.
            Last edited by NinjaTrader_Jim; 03-25-2020, 10:45 AM.
            JimNinjaTrader Customer Service

            Comment


              #21
              Hi _Jim, thank you very much for the answer. thank you very much for the answer. if i understood it correctly, only the strategy position is not displayed correctly, so it is not possible that the wrong strategy position triggers a real account position? I can live with the wrong advertisement as long as no involuntary order is placed ;-)
              sidlercom80
              NinjaTrader Ecosystem Vendor - Sidi Trading

              Comment


                #22
                Hello sidlercom80,

                The discrepancy seen here is that the Strategy position shown in the Strategies tab is not consistent with the actual Strategy position because the column is updated visually on Position updates. We aren't looking at an issue where an unexpected position is being opened or left unprotected.

                Drawing the strategy position from OnExecutionUpdate would be wise to add for visual sanity.

                If there is another item that comes up with Rithmic and strategy operations, I'll be happy to help.
                JimNinjaTrader Customer Service

                Comment


                  #23
                  Hi _Jim thanks a lot for your answer, now I understand everything ;-)
                  sidlercom80
                  NinjaTrader Ecosystem Vendor - Sidi Trading

                  Comment


                    #24
                    Jim, please add my vote for ticket ID SFT-3467.

                    Comment


                      #25
                      Thanks for your feedback caveat_lector.

                      Your vote has been added.
                      JimNinjaTrader Customer Service

                      Comment


                        #26
                        Jim, would it be best to use the approach in your UnmanagedTemplate or in your UnmanagedOnOrderUpdate alternative with a Continuum data feed?
                        Last edited by caveat_lector; 11-08-2020, 12:41 AM.

                        Comment


                          #27
                          Hello caveat_lector,

                          UnmanagedTemplate would work fine. There is no need to work around order/execution/position ordering in connections that are not Interactive Brokers or Rithmic based.
                          JimNinjaTrader Customer Service

                          Comment


                            #28
                            Thanks. That was what I had thought, but I wanted to be sure there isn't a similar issue with Continuum.

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by jclose, Today, 09:37 PM
                            0 responses
                            5 views
                            0 likes
                            Last Post jclose
                            by jclose
                             
                            Started by WeyldFalcon, 08-07-2020, 06:13 AM
                            10 responses
                            1,414 views
                            0 likes
                            Last Post Traderontheroad  
                            Started by firefoxforum12, Today, 08:53 PM
                            0 responses
                            11 views
                            0 likes
                            Last Post firefoxforum12  
                            Started by stafe, Today, 08:34 PM
                            0 responses
                            11 views
                            0 likes
                            Last Post stafe
                            by stafe
                             
                            Started by sastrades, 01-31-2024, 10:19 PM
                            11 responses
                            169 views
                            0 likes
                            Last Post NinjaTrader_Manfred  
                            Working...
                            X