NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

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.

Reply
 
Thread Tools Display Modes
Old 08-24-2010, 07:10 PM   #1
Oil_Trader
Senior Member
 
Join Date: Aug 2010
Location: http://twitter.com/Oil_Trader
Posts: 141
Thanks: 0
Thanked 0 times in 0 posts
Default Default Quantity for each instrument

Example I am trading 2 stocks,

I want 1 stock to trade 500 shares, the other one i want 700 shares in a multi-instrument backtest.

How do we assign each stock their specific fixed quantity?
Oil_Trader is offline  
Reply With Quote
Old 08-25-2010, 03:14 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,547
Thanks: 261
Thanked 1,012 times in 993 posts
Default

Oil_Trader, you would need to assign the qty for the various instruments used then directly in your code.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 08-25-2010, 04:10 PM   #3
Oil_Trader
Senior Member
 
Join Date: Aug 2010
Location: http://twitter.com/Oil_Trader
Posts: 141
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi Bertrand,

Can you please give an example code snippet for:

If (Signal.Instrument == XXXX)
EnterLong( QtyA)

If (Signal.Instrument == YYYY)
EnterLong( QtyB)

I cannot find the proper syntax in your help index.
Oil_Trader is offline  
Reply With Quote
Old 08-25-2010, 04:16 PM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

Oil_Trader,

You have to specify what exactly your signal is. There are no prebuilt "signals" for any instrument.

What you would do is create a multi-series strategy, check the particular instrument you are interested in for your particular signal and then place the trade to that instrument. Please see here for information on multi-series strategies: http://www.ninjatrader-support.com/H...ameInstruments
NinjaTrader_Josh is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to save default quantity in Chart Trader JoeStein Charting 1 09-08-2009 03:33 AM
Default Quantity designer General Programming 4 05-27-2009 05:40 AM
Forex Default Quantity Order Entry JamesF Automated Trading 1 04-29-2009 02:19 AM
Default Quantity on Strategy wrong Thalamus Automated Trading 2 02-24-2009 09:14 AM
Default quantity per symbol NinjaTurtle Suggestions And Feedback 5 12-14-2007 02:24 PM


All times are GMT -6. The time now is 01:12 AM.