NexusFi: Find Your Edge


Home Menu

 





The type or namespace name 'NinjaTrader' could not be found


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Aziz with 4 posts (0 thanks)
    2. looks_two rleplae with 3 posts (1 thanks)
    3. looks_3 xplorer with 2 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,797 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 9 posts
    2. attach_file 4 attachments




 
Search this Thread
  #1 (permalink)
Aziz
delhi india
 
Posts: 13 since Aug 2017
Thanks Given: 2
Thanks Received: 1

I have downloaded Ninja Trader 8 and added the reference in my windows app from
C:\Program Files (x86)\NinjaTrader 8\bin64\NinjaTrader.Client.dll
I have added
using NinjaTrader.Client; on form.
But still it give me error - Error 1 The type or namespace name 'NinjaTrader' could not be found (are you missing a using directive or an assembly reference?)
I even tried adding it from C:\Program Files (x86)\NinjaTrader 8\bin\NinjaTrader.Client.dll
Any idea what am I doing wrong?


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
I Have a Thing Called Iran -- Trump Stays in DC as Airsp …
Prediction Markets & Event Contracts
Peace Deal Forward Curve: May 22%, June 51%, December 81 …
Prediction Markets & Event Contracts
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
Thursday May 28: GDP + Core PCE + Jobless Claims All at …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
xplorer's Avatar
 xplorer 
London UK
Site Moderator
 
Experience: Beginner
Platform: CQG
Broker: S5
Trading: Futures
Posts: 6,233 since Sep 2015
Thanks Given: 15,885
Thanks Received: 16,118



Aziz View Post
I have downloaded Ninja Trader 8 and added the reference in my windows app from
C:\Program Files (x86)\NinjaTrader 8\bin64\NinjaTrader.Client.dll
I have added
using NinjaTrader.Client; on form.
But still it give me error - Error 1 The type or namespace name 'NinjaTrader' could not be found (are you missing a using directive or an assembly reference?)
I even tried adding it from C:\Program Files (x86)\NinjaTrader 8\bin\NinjaTrader.Client.dll
Any idea what am I doing wrong?

Are you trying to start NinjaTrader 8 by referencing a .dll file as opposed to its .exe file?


Reply With Quote
  #4 (permalink)
Aziz
delhi india
 
Posts: 13 since Aug 2017
Thanks Given: 2
Thanks Received: 1

I am adding the DLL reference in vs2012 windows application.


Reply With Quote
  #5 (permalink)
 
xplorer's Avatar
 xplorer 
London UK
Site Moderator
 
Experience: Beginner
Platform: CQG
Broker: S5
Trading: Futures
Posts: 6,233 since Sep 2015
Thanks Given: 15,885
Thanks Received: 16,118


Aziz View Post
vs2012 windows application.

Sorry, I have no idea what that is.


Reply With Quote
  #6 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,947 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,860

1. In the beginning of your source file you need :

using NinjaTrader.Cbi;
using NinjaTrader.Client;
using NinjaTrader.Data;

2. In your project you need to add the DLL in the references



3. In your code you will call a function from the DLL like this

 
Code
  public class Orders
    {
        static NinjaTrader.Client.Client NTClient;

        static Object _ATILock = new Object();

        static int sequenceNumber;


        // this is a static construcor
        // we establish once a pipe to NinjaTrader
        public  Orders ()
        {
            //init
            if (NTClient == null)
            {
                NTClient = new NinjaTrader.Client.Client();
                sequenceNumber = 0;
            }
            
        }

        // this should only be done once, when we quite the windows app
        public static void TearDown ()
        {
                NTClient.TearDown();
                NTClient = null;
        }
}


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #7 (permalink)
Aziz
delhi india
 
Posts: 13 since Aug 2017
Thanks Given: 2
Thanks Received: 1

rleplae,
I am following the same steps but still it gives me error.


Reply With Quote
  #8 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,947 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,860


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #9 (permalink)
Aziz
delhi india
 
Posts: 13 since Aug 2017
Thanks Given: 2
Thanks Received: 1


Reply With Quote
  #10 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,947 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,860


For what .NET version are you building your windows form ?

NT 8 would be .NET version 4.5
are you also building for that version ?


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on August 10, 2017


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts