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

COM with Borland RAD C++ 2007 problem

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

    COM with Borland RAD C++ 2007 problem

    Tried to use COM with Borland RAD C++ 2007. Made new package with NinjaTrder Client, got NinjaTrader_Client_OCX.h, NinjaTrader_Client_TLB.h generated and new visual components on ToolPalette: TClient, TQueryInstrument, TCore.
    When I make an instance of TClient, I got available few functions only: Connect(), Disconnect() and some other concerning to COM interface,
    but there is not data and trade functions like: SubscribeMarketData, MarketData, etc.
    What should I do to get them, please?

    Attached generated files.
    Attached Files

    #2
    Unfortunately we are no Borland experts. Thus we would not know what causes the issues you experience.

    Here is a list of functions which should be available as the COM level: http://www.ninjatrader-support.com/H...unctions3.html

    Note: we are aware that some customers experience oddities using the COM interface, which we haven't been able to isolate/resolve. As an alternative you could try the DLL interface:

    Comment


      #3
      Thanks, DLL seems to me works, but could not retrive MarketData for ES 12-09 futures. I got "0" in all cases.
      I guess I might be wrong in instrument name.
      What name should I type for "ES 12-09" in string instrument argument?
      double MarketData(string instrument, int type)

      Comment


        #4
        "ES 12-09" is correct. Note: exchanges are closed right now -> you will not get any realtime market data. Please try again tomorrow as exchanges are open.

        Comment


          #5
          Oh, thanks. I guess that's it, but looked at Friday chart and thought last price will be friday close price. Thank you for your help.

          Comment


            #6
            Great, I got market data, but had one strange thing:
            int Connected(int showMessage) allways returns "-1" i.e. no connection,
            even when I'm getting data. What's wrong?

            Comment


              #7
              Sorry, I would not know. I suggest debugging your application.

              I just tested again the C# sample application we provide in folder <install>/NinjaTradre6.5/bin/AutoTrade. It works as expected and client.Connected(0) would return 0. That sample application might be a good starter for you endeavor.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by benmarkal, Yesterday, 12:52 PM
              3 responses
              22 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by helpwanted, Today, 03:06 AM
              1 response
              18 views
              0 likes
              Last Post sarafuenonly123  
              Started by Brevo, Today, 01:45 AM
              0 responses
              11 views
              0 likes
              Last Post Brevo
              by Brevo
               
              Started by aussugardefender, Today, 01:07 AM
              0 responses
              6 views
              0 likes
              Last Post aussugardefender  
              Started by pvincent, 06-23-2022, 12:53 PM
              14 responses
              244 views
              0 likes
              Last Post Nyman
              by Nyman
               
              Working...
              X