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

OANDA TIF = GTC Rejected

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

    OANDA TIF = GTC Rejected

    First of all, I am very pleased to have the OANDA connection now available to NinjaTrader users. Thank you for making that happen.

    I realize this connection is brand new and not vetted for very long but with regard to order execution:

    Both my strategy orders and manual orders are being rejected with TIF = GTC.
    "Error: TimeInForce <59> = 1 not supported. affected Order: Buy 1000 Market"

    It's very important there be a working order TIF type that persists orders for at least one week, preferably a true Good-Till-Cancel.

    I will inform NT Brokerage as well as OANDA about this. Would appreciate a solution as quickly as possible.

    cheers
    Attached Files
    Last edited by CDXTrader; 05-14-2018, 04:06 PM.

    #2
    Hello CDXTrader,

    Thank you for your patience.

    I am receiving the same message when orders are set to a Time In Force of GTC. I am checking with our development team and I will follow up here when I have details.

    Comment


      #3
      The connection technology used in NinjaTrader for Oanda shows the option for the GTC Time In Force due to the connection being used for the NinjaTrader Continuum connection as well. However, the Time In Force of GTC is not supported for the Oanda connection in NinjaTrader and thus the error is seen when you use the GTC Time In Force for the Oanda account.

      Please let me know if you have any questions.

      Comment


        #4
        Additional clarity:

        Oanda's FIX connection which CQG/Continuum uses does not support GTC. Oanda plans to introduce support for this in their next FIX server upgrade. They currently do not have an ETA for this. Alternatively, GTD is supported and can be used as a replacement for GTC albeit, not as convenient.
        RayNinjaTrader Customer Service

        Comment


          #5
          Thank you for the reply.

          I will look forward to the server update from Oanda. It seems crazy that a trade server would not support GTC orders.

          With regard to strategy order settings, I see that the TimeInForce = GTD is not exposed in the strategy parameters. Is there some way to expose this? Or is there some way to dynamically set this GTD(date) parameter through NinjaScript? If so, a sample or reference would be appreciated.

          Thanks

          Comment


            #6
            Hello CDXTrader,

            Thank you for your response.

            Setting TimeInForce to GTD in the strategy does not expose an option to set the date. I will look into this with development and follow up here when I have further details.

            I look forward to assisting you further.

            Comment


              #7
              Hello CDXTrader,

              Thank you for your patience.

              The TimeInForce for the strategy will not give the needed DateTime settings for the Date that the order will be good until for the GTD setting.

              However, in NinjaScript you can in fact use the Account.CreateOrder() to submit the order using a DateTime for the Date of the GTD. You can find more details at the following link: https://ninjatrader.com/support/help...reateorder.htm

              The use of Account.CreateOrder() would mean the order is not submitted through the strategy technically and therefore will not trigger OnPositionUpdate() for the strategy. You would then need to implement checking of the Account itself for the position, execution, and order update. Please find these items detailed at the following link in our Help Guide: https://ninjatrader.com/support/help...ount_class.htm

              Please let me know if you have any questions.

              Comment


                #8
                Patrick,

                It seems your recommended option could work as described but requires me to completely redesign my order entry and order management handling. It would also seem to require a 'unmanaged' approach and lose the benefits of a 'managed' approach connected with the strategy. Am I correct about that?

                Comment


                  #9
                  Hello CDXTrader,

                  Thank you for your response.

                  That is correct. This would require the Unmanaged Approach and thus require a re-design of your strategy based on the Unmanaged Order Approach as detailed in our Help Guide at the following link: https://ninjatrader.com/support/help...d_approach.htm

                  Please let me know if you have any questions.

                  Comment


                    #10
                    does anyone know what the specified date is for GTD for oanda brokerage? is it end of day?

                    Comment


                      #11
                      Originally posted by staycool3_a View Post
                      does anyone know what the specified date is for GTD for oanda brokerage? is it end of day?
                      apparently it's 1 week by default. but reading the above post.. there isn't a way to set this in ninjatrader without having to recreate my entire strategy???
                      Last edited by staycool3_a; 10-10-2018, 03:02 AM.

                      Comment


                        #12
                        Hello staycool3_a,

                        Thank you for your post.

                        You are correct. There is currently no option to use GTD through the strategy.

                        Please let me know if you have any questions.

                        Comment


                          #13
                          Originally posted by NinjaTrader_PatrickH View Post
                          Hello staycool3_a,

                          Thank you for your post.

                          You are correct. There is currently no option to use GTD through the strategy.

                          Please let me know if you have any questions.
                          just a suggestion... b/c there is no way to add time and date to GTD.. why not set the default to 1 week as most brokerages use 1 week for this order. you guys may want to update your connection guide to reflect this, b/c it says, "GTC is not available with oanda but GTD is available"

                          is there a way around this? what if I connect using a different data provider but submit orders to oanda. i think I read somewhere that if the brokerage doesnt support a particular order type.. the orders are held with the data provider?

                          Comment


                            #14
                            Hello staycool3_a,

                            Thank you for your response.

                            I will forward a request to update the documentation for the connection specific to NinjaScript strategies.

                            There is no means around this. Data providers don't hold orders, only brokerage technologies can process orders.

                            Please let me know if you have any questions.

                            Comment


                              #15
                              Originally posted by NinjaTrader_PatrickH View Post
                              Hello staycool3_a,

                              Thank you for your response.

                              I will forward a request to update the documentation for the connection specific to NinjaScript strategies.

                              There is no means around this. Data providers don't hold orders, only brokerage technologies can process orders.

                              Please let me know if you have any questions.
                              for what it's worth I did have a conversation with my account liaison at oanda. he said later this month they are fixing this issue (GTC order and various other issues) via an update for the NT-Oanda API.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by funk10101, Today, 12:02 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post funk10101  
                              Started by gravdigaz6, Yesterday, 11:40 PM
                              1 response
                              7 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by MarianApalaghiei, Yesterday, 10:49 PM
                              3 responses
                              10 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by XXtrader, Yesterday, 11:30 PM
                              0 responses
                              4 views
                              0 likes
                              Last Post XXtrader  
                              Started by love2code2trade, 04-17-2024, 01:45 PM
                              4 responses
                              28 views
                              0 likes
                              Last Post love2code2trade  
                              Working...
                              X