Integrate your own custom App with NinjaTrader - NinjaTrader | futures io social day trading
futures io futures trading


Integrate your own custom App with NinjaTrader
Updated: Views / Replies:1,009 / 8
Created: by BMMA14 Attachments:4

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

Integrate your own custom App with NinjaTrader

  #1 (permalink)
Elite Member
Montreal,Quebec/Canada
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: Forex
 
Posts: 17 since Jun 2014
Thanks: 5 given, 15 received

Integrate your own custom App with NinjaTrader

I wanted to create an Application in C# which would communicate with NinjaTrader. Therefore I needed a very stable link in between my application and NT. My approach is to use NT script with minimum code and use class libraries to do what I would like to do. So NT Script is just a front end which provides some basic info to my business model running in the background. I will only post some annotations on NinjaTrader chart display reflecting the computed outcome of the background machine. Please find attached a very preliminary work of my spec. You will find a basic schematic and description + some notes of my experience with NinjaTrader integration work to avoid pitfalls.
I wanted to offer my work to the BigMike forum community as a payback and gratitude, as I used myself some very useful information from the forum contributors. I hope it helps. Feedback and suggestions are welcome.

Attached Thumbnails
Integrate your own custom App with NinjaTrader-ninjatrader-application.pdf  
Reply With Quote
The following 4 users say Thank You to BMMA14 for this post:
 
  #2 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,503 since Sep 2013
Thanks: 1,706 given, 3,715 received
Forum Reputation: Legendary

Loosely coupling


BMMA14 View Post
I wanted to create an Application in C# which would communicate with NinjaTrader. Therefore I needed a very stable link in between my application and NT. My approach is to use NT script with minimum code and use class libraries to do what I would like to do. So NT Script is just a front end which provides some basic info to my business model running in the background. I will only post some annotations on NinjaTrader chart display reflecting the computed outcome of the background machine. Please find attached a very preliminary work of my spec. You will find a basic schematic and description + some notes of my experience with NinjaTrader integration work to avoid pitfalls.
I wanted to offer my work to the BigMike forum community as a payback and gratitude, as I used myself some very useful information from the forum contributors. I hope it helps. Feedback and suggestions are welcome.

Very interesting topic !

Depending on the data to be exchanged with the external application and NT you might consider loosely coupling ?

I have been working on both types of projects :

1. a class library (that is even NT independant/neutral), for which the objects can be instantiated both inside and outside NT. Same binary is used in NT strategies and same binary (DLL) is used in brute force stand-alone application. Still this is tightly coupled, that stategy will load the class libary in its address space and needs to be able to call the right method with the correct parameters, otherwise an exception will be thrown.

2. a stand alone application (using the encog neural network library of heaton research as an example). the problem being that 1) it is .NET 4.0 so not possible to instantiate it in NT which is .NET 3.5 and 2) it doesn't like very much to run into the NT address space. I implemented an stand alone application and my strategy talks over a TCP/IP socket to the program that acts as a listening service. making it even completely technology, hardware, instance agnostic...

I am happy to share bits of code and exchange architecture ideas

warm regards
Ron

Reply With Quote
 
  #3 (permalink)
Elite Member
Montreal,Quebec/Canada
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: Forex
 
Posts: 17 since Jun 2014
Thanks: 5 given, 15 received



rleplae View Post
Very interesting topic !

Depending on the data to be exchanged with the external application and NT you might consider loosely coupling ?

I have been working on both types of projects :

1. a class library (that is even NT independant/neutral), for which the objects can be instantiated both inside and outside NT. Same binary is used in NT strategies and same binary (DLL) is used in brute force stand-alone application. Still this is tightly coupled, that stategy will load the class libary in its address space and needs to be able to call the right method with the correct parameters, otherwise an exception will be thrown.

2. a stand alone application (using the encog neural network library of heaton research as an example). the problem being that 1) it is .NET 4.0 so not possible to instantiate it in NT which is .NET 3.5 and 2) it doesn't like very much to run into the NT address space. I implemented an stand alone application and my strategy talks over a TCP/IP socket to the program that acts as a listening service. making it even completely technology, hardware, instance agnostic...

I am happy to share bits of code and exchange architecture ideas

warm regards
Ron

hi

It's nice to hear people working on similar ideas. Thanks for the feedback. You are correct about loose coupling. I will change it. Thanks for pointing out. I am developing a third party adds on for NinjaTrader (also can be used for Metatrader etc.). It will be a very interesting project, as it will employ concepts like fractals and tools like fuzzy logic. Some of those concepts and prototypes have been developed over the course of the past 10-15 years. I will post more work ideas/template code and more about the progress of this project in the future.


Last edited by BMMA14; August 29th, 2014 at 10:54 PM.
Reply With Quote
 
  #4 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,354 given, 83,235 received

If your work is not 100% free, or if you have plans to make it commercial or for profit, you are not allowed to use futures.io (formerly BMT) to promote it or discuss it.

Sent from my LG Optimus G Pro

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #5 (permalink)
Elite Member
Montreal,Quebec/Canada
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: Forex
 
Posts: 17 since Jun 2014
Thanks: 5 given, 15 received


Big Mike View Post
If your work is not 100% free, or if you have plans to make it commercial or for profit, you are not allowed to use futures.io (formerly BMT) to promote it or discuss it.

Sent from my LG Optimus G Pro

Thanks for feedback. When I joined the forum a while ago, my purpose was to exchange ideas first and foremost on Ninjatrader integration in terms of software coding such as csharp. The technical Indicators, market analysis tools and systems that I have developed over the many years, I consider an intellectual property and proprietary. Be rest assured that they will neither be disclosed nor promoted in this forum or any other. /Regards.

Reply With Quote
 
  #6 (permalink)
Elite Member
Montreal,Quebec/Canada
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: Forex
 
Posts: 17 since Jun 2014
Thanks: 5 given, 15 received

Following are the highlights of the architecture:
• Loosely coupled MVVMP architectural design, which enables easy code maintenance, highly organized and factored coding and robust performance immune to crash. The NinjaScript is kept very simple and being the View component, merely used for annotation deliverance on NinjaTrader chart. The architecture provides double layer of abstraction. First being the MVVM of the NTCL and secondly the loose coupling between NTCL and CACL. In practical terms, it means the least interference into NinjaTrader chain and ecosystem, whilst being capable of highly complex trading concept design for the background machine, running in own memory space. The exchange between the CACL and NTCL is done via a single channel of interface event handling using an encoded communication protocol. Thus, NTCL can obtain any process data from ANCL through encoded commands, providing state information in return back to CACL via another layer of interface abstraction.

Attached Thumbnails
Integrate your own custom App with NinjaTrader-ninjatoapp.pdf  
Reply With Quote
The following 2 users say Thank You to BMMA14 for this post:
 
  #7 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,503 since Sep 2013
Thanks: 1,706 given, 3,715 received
Forum Reputation: Legendary

nice..


BMMA14 View Post
Following are the highlights of the architecture:
• Loosely coupled MVVMP architectural design, which enables easy code maintenance, highly organized and factored coding and robust performance immune to crash. The NinjaScript is kept very simple and being the View component, merely used for annotation deliverance on NinjaTrader chart. The architecture provides double layer of abstraction. First being the MVVM of the NTCL and secondly the loose coupling between NTCL and CACL. In practical terms, it means the least interference into NinjaTrader chain and ecosystem, whilst being capable of highly complex trading concept design for the background machine, running in own memory space. The exchange between the CACL and NTCL is done via a single channel of interface event handling using an encoded communication protocol. Thus, NTCL can obtain any process data from ANCL through encoded commands, providing state information in return back to CACL via another layer of interface abstraction.

I did something similar (but more basic) to call a service for trade signal scoring with Encog neural network library. I open a socket in my strategy and ask the service listening on a certain port to 'score' the signal, in real-time it gives a thumb up or down. Besides that i did develop and document how to invoke class library in NT.

I like the component based approach in your solution.

Reply With Quote
The following 2 users say Thank You to rleplae for this post:
 
  #8 (permalink)
Elite Member
Montreal,Quebec/Canada
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: Forex
 
Posts: 17 since Jun 2014
Thanks: 5 given, 15 received


rleplae View Post
I did something similar (but more basic) to call a service for trade signal scoring with Encog neural network library. I open a socket in my strategy and ask the service listening on a certain port to 'score' the signal, in real-time it gives a thumb up or down. Besides that i did develop and document how to invoke class library in NT.

I like the component based approach in your solution.

thanks. It was your previous remark about loose coupling, which brought me to re-think the design. I used Interface event to handle this. Besides, I guess I saw your document on this forum the other day. Mine follows basically the same initial steps, except I added some more salt and pepper into it by MVVM and abstract layering./Regards

Reply With Quote
 
  #9 (permalink)
Elite Member
Montreal,Quebec/Canada
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: Forex
 
Posts: 17 since Jun 2014
Thanks: 5 given, 15 received

some more study notes

find attached some personal notes that I've created a while back, when I was trying to use Visual Studio with NinjaTrader. This information is basically a collection of info I've found here and there and also some personal notes to avoid pitfalls. Also find attached the final copy of the block level diagram of NT Script-Class Library integration with more detail info.

Attached Thumbnails
Integrate your own custom App with NinjaTrader-nt-vs-info.pdf   Integrate your own custom App with NinjaTrader-ninjatoappfinal.pdf  
Reply With Quote
The following user says Thank You to BMMA14 for this post:

Reply



futures io > > > > Integrate your own custom App with NinjaTrader

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
NinjaTrader Optimizer Types (Custom Fitness) Big Mike Elite Automated NinjaTrader Trading 39 August 7th, 2017 09:42 PM
NinjaTrader vs custom solution for backtesting and strategy optimization dominikos Elite Automated Trading 4 March 27th, 2014 07:10 PM
Custom T & S Aggregation Indicator for Ninjatrader rounder8 The Elite Circle 65 October 30th, 2013 01:47 PM
Custom Instrument development for NinjaTrader IamDeveloper NinjaTrader Programming 1 September 26th, 2013 04:18 PM


All times are GMT -4. The time now is 09:13 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, 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
Page generated 2017-12-16 in 0.14 seconds with 20 queries on phoenix via your IP 54.83.122.227