Communication between strategies - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

Communication between strategies
Started:September 28th, 2009 (01:50 PM) by zwentz Views / Replies:1,894 / 4
Last Reply:May 2nd, 2010 (10:15 PM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Communication between strategies

Old September 28th, 2009, 01:50 PM   #1 (permalink)
Austin, TX
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Optimus Futures/Rithmic
Favorite Futures: Futures [ZB]
Posts: 36 since Sep 2009
Thanks: 12 given, 21 received

Communication between strategies

I'm trying to communicate between strategies in NinjaTrader and I don't want to use IO. I'd like something faster and a bit easier to implement in other strategies later. I'm thinking of a parent console application that manages the communication between them all, but I'm wondering what other solutions you've come up with.

To date I've tried communicating via windows messages, which didn't work because of the limitations of NinjaTrader as well as cross thread communication and IPC, but the threads aren't Thread Pool and IPC won't work for the same reasons windows messages won't work.

So before I go balls to the wall with my console manager, I was wondering if anybody had come up with something better or just an alternative, as I'd rather not do this. At this point, it may be my only option though.

Reply With Quote

Old September 28th, 2009, 02:13 PM   #2 (permalink)
Elite Member
Austin, TX
Futures Experience: Advanced
Platform: NT/Matlab
Broker/Data: Interactive Brokers
Favorite Futures: FX majors
sefstrat's Avatar
Posts: 285 since Jun 2009
Thanks: 20 given, 735 received

you could use .net remoting, or any of the open source message bus programs for .net.. there are several of them on codeplex and/or googlecode, most include a console message host, no need to roll your own =)

i use masstransit (not with NT but in some other applications)
masstransit - Project Hosting on Google Code

Reply With Quote
The following 3 users say Thank You to sefstrat for this post:

Old September 28th, 2009, 03:41 PM   #3 (permalink)
Austin, TX
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Optimus Futures/Rithmic
Favorite Futures: Futures [ZB]
Posts: 36 since Sep 2009
Thanks: 12 given, 21 received

Nice sefstrat; precisely what I was looking for. And the ability to make it a background process is awesome!


I am finding it incredibly difficult to get setup with Mass Transit, I can't even get their samples to work. Their documentation is sparse to put it best, and there seems to be no correlation between the documentation they do have and their actual source code available for download. Can you provide an abstract version of how you're doing it? I don't want to steal your code or anything, but maybe just give an idea of how to even get started with it?


I found a better implementation, at least for me, that I seem to be having some luck with. NServiceBus, I was able to get up and running in about 2 minutes compared to the all day event that was Mass Transit. There's another good looking service bus implementation called Rhino. Anyway, just because it didn't work for me doesn't mean it won't work for someone else, I'm just including these others so people will know their options. Thanks again, sefstrat.

Last edited by zwentz; September 29th, 2009 at 12:12 AM. Reason: Added more stuff
Reply With Quote
The following user says Thank You to zwentz for this post:

Old November 16th, 2009, 01:16 PM   #4 (permalink)
Elite Member
London, UK
Futures Experience: Intermediate
Platform: NinjaTrader, Julia
Favorite Futures: Ockham's razor
gregid's Avatar
Posts: 635 since Aug 2009
Thanks: 311 given, 584 received

More light weight approach to communication between strategies:

Data Transfer between Strategies - NinjaTrader Support Forum

For mere mortals

Reply With Quote
The following 2 users say Thank You to gregid for this post:

Old May 2nd, 2010, 10:15 PM   #5 (permalink)
Elite Member
Sydney / Australia
Futures Experience: Intermediate
Platform: NT
Broker/Data: AMP
Favorite Futures: Oil
Posts: 116 since Jun 2009
Thanks: 125 given, 103 received

Futures Edge on FIO

What happens to the S&P 500 when a new President takes office?

Though just what I need, I am finding these programs incredibly difficult to use.

I have been trying to develop a method to run two strategies at once.
One strategy is to calculate the signal. (Calculate on Bar Close = true) It then sends the Close[0] price to the 2nd strategy once the signal = true. The 2nd strategy (Calculate on Bar Close = false) places a limit order 2 ticks +- the Close[0]. So if the price moves away from the order without being filled, a cancel order can be initiated.

Now I have looked at the DataTransfer Class and am completely lost as to how to setup communication. As I recall, it simply calculated PnL figures.
Using these 3rd party programs with VS seems a little difficult.

Any ideas on how to implement this?

Many thanks

Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Communication between strategies

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
SendMail() for strategies dsraider NinjaTrader Programming 34 January 17th, 2015 04:03 PM
NT Matlab communication sefstrat The Elite Circle 16 May 26th, 2014 12:21 PM
NT Strategies - Is it possible???? peter88 NinjaTrader Programming 2 March 26th, 2011 02:21 AM
Bracket Strategies... Jugador Traders Hideout 4 November 24th, 2009 07:01 PM

All times are GMT -4. The time now is 01:24 AM.

Copyright © 2016 by 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 2016-10-24 in 0.11 seconds with 20 queries on phoenix via your IP