![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Aug 2011
Posts: 25
Thanks: 9
Thanked 0 times in 0 posts
|
Greetings,
I am wondering how I could use one of my existing strategies, developed to be used on 1 particular instrument but have it trigger entries/exits on a completely different instrument, hopefully without changing too much. Is there a way to specify the instrument in the entry/exit methods? Thank you, hbmiles2000 |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
hbmiles2000, yes what you look for here is a MultiInstrument strategy, a working example is preinstalled with NT and it's named 'SampleMultiInstrument' strategy.
The framework used is explained in depth here in our helpguide : http://www.ninjatrader.com/support/h...nstruments.htm
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Aug 2011
Posts: 25
Thanks: 9
Thanked 0 times in 0 posts
|
Thanks Bertrand-one more question that I cannot find the answer to in the documentation - where & how do you define the signal name you can use to enter/exit various instruments within the context of bars updates for other instruments?
Thx again, hbmiles2000 |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
Please take as example this Market order entry overload we have :
EnterLong(int barsInProgressIndex, int quantity, string signalName) The barsInProgressIndex is the bars series you submit to, if you Add() for example MSFT to your strategy and enter 1 as the index (the second instrument, it starts counting from 0) then you would submit to MSFT instead. The signalName is just a string you could configure to your liking and potentially add the instrument name here as well to differentiate.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Bertrand for this post: |
|
![]() |
| Tags |
| instrument |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strategy Session template = <Use instrument settings> but fired trade in pre-market | shodson | Strategy Development | 6 | 03-03-2011 11:42 AM |
| Entering trade on instrument not in Strategy | spinalwiz | Version 7 Beta General Questions & Bug Reports | 5 | 02-12-2010 10:35 AM |
| conditions and action for 1 trade a day | tradmech | General Programming | 3 | 01-03-2010 08:05 PM |
| strategy executes trade when conditions are wrong | paschall | Strategy Development | 1 | 10-30-2009 03:02 PM |
| Strategy: Halting a Strategy Once User Defined Conditions Are Met | NinjaTrader_Josh | Reference Samples | 0 | 01-04-2008 12:09 AM |