Multi-instrument strategy - NinjaTrader Programming | futures io social day trading
futures io futures trading


Multi-instrument strategy
Updated: Views / Replies:6,457 / 14
Created: by jnorris Attachments:0

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 100,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

 
 
Thread Tools
 

Multi-instrument strategy

 
Charlotte, NC
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 8 since Jun 2013
Thanks: 2 given, 1 received

Multi-instrument strategy

Hello,

Can someone please point me to a strategy example that uses multiple instruments? More specifically, let's take the example "SampleMACrossOver" that comes with NT7: What if I want to extend this strategy to run against, say 100 different stocks? Is there a way to programmatically approach this? For example, let's say at Time X, 5 of the 100 stocks have potential buy points, I want to process those hits further in code.

The actual strategy here isn't important, rather I'm just looking for a code example that considers many instruments at once.

Thanks

 
 
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
 
Israel
 
Trading Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received


It can be done, but why 100 stocks? Why not 1000?
Seriously, you understand that for this strategy to be profitable it has to be profitable at least on 1 instrument.

 
 
Charlotte, NC
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 8 since Jun 2013
Thanks: 2 given, 1 received


baruchs View Post
It can be done, but why 100 stocks? Why not 1000?
Seriously, you understand that for this strategy to be profitable it has to be profitable at least on 1 instrument.

Agreed, I don't care about the number (I'm sure I'd eventually parameterize it). Rather, I'm just trying to learn how to write a multi-instrument strategy of this structural type, so I'm just making a simple, contrived example that highlights my question. (For this same reason, profitability is not a concern as this is a toy example for learning).

(Eventually, instead of inputting 100 or 1000 stocks to the strategy, the input would be generated by a programmatic "screen").

 
 
Israel
 
Trading Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received

Just add instruments in Initialize.
That's all.

The following user says Thank You to baruchs for this post:
 
 
las vegas
 
Trading Experience: Intermediate
Platform: Sierra Chart
Broker/Data: Velocity/IB
Favorite Futures: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 837 received

I've not tried it, but I'm thinkin NT is not right for that application due to performance issues.

 
 
Charlotte, NC
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 8 since Jun 2013
Thanks: 2 given, 1 received

@baruchs thanks, you may be right - it may be that simple. I suspect I can make my instrument "Add() generators" as simple/complex as the environment (ie: C#) allows.

@vegasfoster I suspect this would be a problem if n got too large; however for my needs n is going to be relatively small. I wonder how many instruments people have successfully Add()'ed to a single strategy?

 
 
Israel
 
Trading Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received


jnorris View Post
@baruchs thanks, you may be right - it may be that simple. I suspect I can make my instrument "Add() generators" as simple/complex as the environment (ie: C#) allows.
Usually I do not speculate when I answer questions.
@vegasfoster I suspect this would be a problem if n got too large; however for my needs n is going to be relatively small. I wonder how many instruments people have successfully Add()'ed to a single strategy?

NT loads all the bars needed. So its not what n is, as how many bars.
So if you load 3 days of daily data, you should be able to load even 10000 instruments.

 
 
Charlotte, NC
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 8 since Jun 2013
Thanks: 2 given, 1 received


baruchs View Post
NT loads all the bars needed. So its not what n is, as how many bars.
So if you load 3 days of daily data, you should be able to load even 10000 instruments.

Each instrument added (ie: n), will have different bar data, therefore 10000 instruments would mean there are 10000 different bar data series to build, no? (However, I agree, more bars (eg: changing from daily -> 1min) is a very significant (maybe more) scaling factor, but it's a different n I think).

 
 
Portland Oregon, United States
 
Trading Experience: Beginner
Platform: Ninjatrader®
Broker/Data: CQG, Kinetick
Favorite Futures: Gameplay Klownbine® Trading of Globex
 
Zondor's Avatar
 
Posts: 1,339 since Jul 2009
Thanks: 1,246 given, 2,690 received

Anything is possible, what do you have in mind?


You can do whatever you want with multiple instruments.

Just to give one example, they can be combined in real time into custom indexes synchronized to the master instrument of a chart.

"If we don't loosen up some money, this sucker is going down." -GW Bush, 2008
“Lack of proof that something is true does not prove that it is not true - when you want to believe.” -Humpty Dumpty, 2014
“The greatest shortcoming of the human race is our inability to understand the exponential function.”
Prof. Albert Bartlett
Follow me on Twitter Visit my futures io Trade Journal

 



futures io > > > > > Multi-instrument strategy
Thread Tools



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

Show us your trading desks and win $1,400 in prizes w/Earn2Trade

November
 

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now
 

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now
 

Mastering TradeStation Programming w/Chris @ ABC Trading Group

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with a Multi-Instrument Indicator ECI Ed NinjaTrader Programming 12 July 31st, 2013 10:22 AM
Instrument multiplier/divider by other instrument, name of that? raffu NinjaTrader Programming 4 August 24th, 2011 03:37 AM
Multi-Timeframe in a strategy max-td NinjaTrader Programming 30 July 22nd, 2010 01:35 PM
Ninja Strategy multi-timeframe issue/Strategy to indicator nw123 NinjaTrader Programming 2 December 20th, 2009 07:24 PM


All times are GMT -4. The time now is 05:13 PM. (this page content is cached, log in for real-time version)

Copyright © 2019 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