![]() |
|
|||||||
| Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Aug 2007
Posts: 83
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
1) I'm wondering if you are able to in Ninja Script to Pair Trading / Spread Trading, where you have (2) data feeds of 2 different stocks and are able to say long one and short the other at the same time? 2) NTMarketPosition("") ---> okay say I have a trade station chart on. The symbol is INTC. In order to find out the marketposition of INTC I type NTMarketPosition(""), but say that while I'm on the INTC chart I want to find out the market position of CSCO, can I type NTMarketPosition("CSCO"); Thanks |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
1) Yes, please see SampleMultiInstrument strategy and docs related: http://www.ninjatrader-support.com/H...struments.html
2) No. But you could code your own TS EL function to do that, please check out how NTMarketPosition function is implemented in TS EL and how the symbol is referenced. Note: This is beyond what we can support, you would need to try on your own.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
1) NT 6.5 due out shortly is better equipped to handle this since we will introduce an OnMarketData() method that is fired for every change in market data for the "pair" you are tracking.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#4 |
|
Member
Join Date: Aug 2007
Posts: 83
Thanks: 0
Thanked 0 times in 0 posts
|
excellent,
also are you able to in ninja script run multiple strategies? Thanks |
|
|
|
|
|
#5 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
- you can run multiple NS strategies on different instruments concurrently
- you can not run a NS strategy within a NS strategy
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Jul 2010
Posts: 187
Thanks: 3
Thanked 0 times in 0 posts
|
I am trying to convert a pair trading/spread strategy that I built in WealthLab. I am having a bit of a hard time, starting with the basic of how do I get the price of the second stock, then proceed to use the bar close price of both to go through my calculations. Can you please direct me. As I understand NT7, which is what im using, has some special features for this...can you please explain all.
Thx in advance! |
|
|
|
|
|
#7 |
|
NinjaTrader Customer Service
Join Date: Nov 2009
Location: Denver, CO
Posts: 1,424
Thanks: 0
Thanked 3 times in 3 posts
|
Hi nightriderx,
I have implemented something very similar here - http://www.ninjatrader.com/support/f...d=1&linkid=293 Using a multi-series script - http://www.ninjatrader-support.com/H...ameInstruments
Tim
NinjaTrader Customer Service |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
|
The first link does not seem to be working
|
|
|
|
|
|
#9 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
artov,
Thanks. It has likely been moved to a different location. Believe it is this one: http://www.ninjatrader.com/support/f...d=4&linkid=363
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MB Trading Question | woodside | Connecting | 1 | 10-20-2007 09:05 AM |
| Futures spread trading | flyingeagle | Miscellaneous Support | 1 | 11-21-2006 08:57 AM |
| Orders not going through to MB Trading | rbrow | Connecting | 41 | 05-01-2006 04:59 AM |
| Trading through TradeStation | MtkaTrader | Miscellaneous Support | 2 | 04-07-2006 01:56 PM |
| Clueless at MB Trading | Savage1701 | Miscellaneous Support | 1 | 12-22-2005 07:34 PM |