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


Multi-instrument strategy
Updated: Views / Replies:4,908 / 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 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
 

Multi-instrument strategy

  #1 (permalink)
Elite Member
Charlotte, NC
 
Futures 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

Reply With Quote
 
  #2 (permalink)
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.

 
  #3 (permalink)
Elite Member
Israel
 
Futures 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.

Reply With Quote
 
  #4 (permalink)
Elite Member
Charlotte, NC
 
Futures 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").

Reply With Quote
 
  #5 (permalink)
Elite Member
Israel
 
Futures 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.

Reply With Quote
The following user says Thank You to baruchs for this post:
 
  #6 (permalink)
Elite Member
las vegas
 
Futures Experience: Intermediate
Platform: Sierra Chart
Broker/Data: Velocity/IB
Favorite Futures: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 836 received

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

Reply With Quote
 
  #7 (permalink)
Elite Member
Charlotte, NC
 
Futures 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?

Reply With Quote
 
  #8 (permalink)
Elite Member
Israel
 
Futures 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.

Reply With Quote
 
  #9 (permalink)
Elite Member
Charlotte, NC
 
Futures 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).

Reply With Quote
 
  #10 (permalink)
Elite Member
Portland Oregon, United States
 
Futures Experience: Beginner
Platform: Ninjatrader®
Broker/Data: CQG, Kinetick
Favorite Futures: Gameplay Klownbine® Trading of Globex
 
Zondor's Avatar
 
Posts: 1,327 since Jul 2009
Thanks: 1,246 given, 2,635 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
Reply With Quote

Reply



futures io > > > > > Multi-instrument strategy

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

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 07:44 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-11 in 0.13 seconds with 19 queries on phoenix via your IP 54.226.132.197