Interact with NinjaTrader through c# windows form - futures io
futures io



Interact with NinjaTrader through c# windows form


Discussion in NinjaTrader

Updated
    1. trending_up 963 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 2 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Interact with NinjaTrader through c# windows form

(login for full post details)
  #1 (permalink)
Aziz
delhi india
 
 
Posts: 13 since Aug 2017
Thanks: 2 given, 1 received

Are there any sample code which suggests how to interact with ninja trader i.e. without ninja script. I have a windows form and I want to send the bid/ask values to ninja trader in c# form. I have added the NinjaTrader.Client.dll in my project so what would be the next step?

Reply With Quote

Can you help answer these questions
from other members on futures io?
MacdBB V402 NT804 + gradient + pullback not working on N …
NinjaTrader
For the experts of Metastock
Platforms and Indicators
1 min chart v-shape scan help please
ThinkOrSwim
Is there inherently more opportunity in smaller markets?
Traders Hideout
TD Sequential for NT or MW?
Platforms and Indicators
 
 
(login for full post details)
  #2 (permalink)
 rleplae 
Gits (Hooglede) Belgium
 
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
 
rleplae's Avatar
 
Posts: 2,991 since Sep 2013
Thanks: 2,437 given, 5,804 received


Aziz View Post
Are there any sample code which suggests how to interact with ninja trader i.e. without ninja script. I have a windows form and I want to send the bid/ask values to ninja trader in c# form. I have added the NinjaTrader.Client.dll in my project so what would be the next step?

You will have to call the functions :

int Connected(int showMessage)

Returns a value of zero if the DLL has established a connection to the NinjaTrader server (application) and if the ATI is currently enabled or, -1 if it is disconnected. Calling any function in the DLL will automatically initiate a connection to the server. The parameter showMessage indicates if a message box is displayed in case the connection cannot be established. A value of 1 = show message box, any other value = don't show message box.


int Ask(string instrument, double price, int size)
Sets the ask price and size for the specified instrument. A return value of 0 indicates success and -1 indicates an error.


int Bid(string instrument, double price, int size)
Sets the bid price and size for the specified instrument. A return value of 0 indicates success and -1 indicates an error.

int AskPlayback(string instrument, double price, int size, string timestamp)
Sets the ask price and size for the specified instrument for use when synchronizing NinjaTrader playback with an external application playback. A return value of 0 indicates success and -1 indicates an error. The timestamp parameter format is "yyyyMMddhhmmss".

int BidPlayback(string instrument, double price, int size, string timestamp)
Sets the bid price and size for the specified instrument for use when synchronizing NinjaTrader playback with an external application playback. A return value of 0 indicates success and -1 indicates an error. The timestamp parameter format is "yyyyMMddhhmmss".

and at the end of the process

int TearDown()
Disconnects the DLL from the NinjaTrader server. A return value of 0 indicates success and -1 indicates an error.



Don't forget to enable ATI interface inside NT

good luck !

Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to rleplae for this post:
 
(login for full post details)
  #3 (permalink)
yawaniga
chennai/india
 
 
Posts: 155 since Sep 2015
Thanks: 111 given, 147 received



Aziz View Post
Are there any sample code which suggests how to interact with ninja trader i.e. without ninja script. I have a windows form and I want to send the bid/ask values to ninja trader in c# form. I have added the NinjaTrader.Client.dll in my project so what would be the next step?

Hello Aziz,
Happy to see u here from India. As a NT User, very eager to learn automate our trade thru NT, If Possible Pls Share the Possibilities, BTW I 'm trying to trade on Indian MCX Segment, and no idea about programming knowledge of NT and Any API. But active PI Chart from concern broker.

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Interact with NinjaTrader through c# windows form


Last Updated on August 9, 2017


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Our 12-year anniversary w/ $$,$$$ prizes (check soon)

August
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
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.
no new posts