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 2,217 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 9 posts
    2. attach_file 4 attachments




 
Search this Thread

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

  #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?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
MC PL editor upgrade
MultiCharts
ZombieSqueeze
Platforms and Indicators
REcommedations for programming help
Sierra Chart
 
  #3 (permalink)
 
xplorer's Avatar
 xplorer 
London UK
Site Moderator
 
Experience: Beginner
Platform: CQG
Broker: S5
Trading: Futures
Posts: 5,982 since Sep 2015
Thanks Given: 15,511
Thanks Received: 15,436



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: 5,982 since Sep 2015
Thanks Given: 15,511
Thanks Received: 15,436


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: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863

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 Twitter 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: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


Follow me on Twitter 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: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


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 Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on August 10, 2017


© 2024 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 - Privacy Policy - Downloads - Top
no new posts