Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unable to query COM methods via Ninjatrader at

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

    Unable to query COM methods via Ninjatrader at

    Hello ,
    I currently use a COM interface from my charting software and connect to Ninjatrader. Automatic buy/sell works fine with Forex using sim101.

    However whenever I try any of the COM methods, I don't get any response back.


    =========in my Amibroker charting package
    //Create Static COM Object here for NinjaTrader - This will be used for calling various Methods
    NTAT = CreateStaticObject("NinjaTrader.Client.Client");
    RequestTimedRefresh(2);

    AvgEntryPrice = NTAT.AvgEntryPrice(INSTRUMENT, "Sim101");
    openpos = NTAT.MarketPosition(INSTRUMENT, "Sim101");

    However I am able to place orders using
    NTAT.Command("PLACE", "", INSTRUMENT,"Buy", 1, "MARKET", 0, 0, "", "", "", "", "") ;


    Any ideas?. Is this because its a sim101 account.

    Thanks.

    Cheers,Padhu

    #2
    We experienced that the COM interface is not working as expected for some of our customers. If the issues would fail into that ressort then you still could try the DLL interface.

    However: AvgEntryPrice and MarketPosition only work on orders placed through ATI. They will not work on order e.g. placed manually in NT.

    Comment


      #3
      COM interface is not working as expected for some of our customers

      Hello Dierk,

      Thanks for the quick reply. Creating a COM interface was reasonably easy for me in Amibroker.

      I just create a static COM object pointing to Ninjatrader by doing this:
      NTAT = CreateStaticObject("NinjaTrader.Client.Client");

      So I don't know what is involved is calling the methods inside the DLL.

      BTW, these were orders placed via AT not manual.

      Any plans on fixng this issue?. Thanks.

      Placing an order without checking market position via COM is bit dangerous.
      Appreciate any help you can offer.
      Cheers,Padhu

      Comment


        #4
        >> Placing an order without checking market position via COM is bit dangerous.
        Unfortunately you can not check the market position if it was not created by the ATI. Sorry, but we have no ETA on overcoming this ATI limitation.

        Comment


          #5
          Reply to post 'Unable to query COM methods via Ninjatrader at'

          ***************
          >> Placing an order without checking market position via COM is bit dangerous.
          Unfortunately you can not check the market position if it was not created by the ATI. Sorry, but we have no ETA on overcoming this ATI limitation.
          ***************

          Dierk,

          I want to clarify...I was asking for eta for the bugfix ONLY for orders sent via AT not manual.

          So i am curious to know if there are traders out there usung COM for autotrading with Gain forex.

          Thanks.

          Comment


            #6
            I'm using COM to trade currency futures if thats of any interest. I don't do it through Amibroker though, bit directly from my own App in C++.

            I have found problems with the new MarketData() functions so don't use those. I haven't tried MarketPosition(), but that sounds like it has similar problems. Like you I found it works on Sim, but on live often doesn't survive broker reconnects. Either the information gets screwed or Ninja freezes if I call them.

            Basically I don't trust any of the functions that try to get information from Ninja, I only use the new orderid functions to confirm fills, everything else is sending information to Ninja.

            Comment


              #7
              Using COM with NT for automated trading

              Hi Gumphrie,

              thanks for the reply.

              With whatever information you can afford to share,

              could you pls email me([email protected]) the COM functions that are working for you?. also are you implementing any checks on marketpositions before placing a buy order?.

              i.e buylong only if there is no long position already or currently short.

              thanks,Padhu

              Comment


                #8
                >> I want to clarify...I was asking for eta for the bugfix ONLY for orders sent via AT not manual.
                Since you already have been able to submit order via COM you likely are not facing the general COM setup issue which some users experience. This very COM installation appears not to fixable, thus we do not have an ETA for it.

                >> Gumphrie: I have found problems with the new MarketData() functions so don't use those
                What problem did you experience?

                >> I haven't tried MarketPosition(), but that sounds like it has similar problems
                Note: it only works as you have placed an order on this account. It will not work after a fresh reconnect.

                Comment


                  #9
                  Originally posted by NinjaTrader_Dierk View Post
                  >> Gumphrie: I have found problems with the new MarketData() functions so don't use those
                  What problem did you experience?
                  In your email from the 4th June - "Possible Issue with DLL market data subscriptions"

                  Comment


                    #10
                    Sorry, could you please refresh my memory and send me a PM on that issue again? Thanks

                    Comment


                      #11
                      Thanks for PMing me the mail again.

                      As of now there are no known issues regarding the MarketData functions of the ATI.

                      Comment


                        #12
                        Originally posted by NinjaTrader_Dierk View Post
                        As of now there are no known issues regarding the MarketData functions of the ATI.
                        So you reproduced the problem and fixed it?

                        Comment


                          #13
                          I was not able to reproduce it and it works as expected in TradeStation and eSignal environment.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Rapine Heihei, Today, 08:19 PM
                          1 response
                          8 views
                          0 likes
                          Last Post NinjaTrader_Manfred  
                          Started by Rapine Heihei, Today, 08:25 PM
                          0 responses
                          6 views
                          0 likes
                          Last Post Rapine Heihei  
                          Started by f.saeidi, Today, 08:01 PM
                          1 response
                          9 views
                          0 likes
                          Last Post NinjaTrader_Manfred  
                          Started by Rapine Heihei, Today, 07:51 PM
                          0 responses
                          8 views
                          0 likes
                          Last Post Rapine Heihei  
                          Started by frslvr, 04-11-2024, 07:26 AM
                          5 responses
                          98 views
                          1 like
                          Last Post caryc123  
                          Working...
                          X