NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 07-18-2012, 08:03 AM   #1
gg80108
Senior Member
 
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
Default Limit number of contracts

I want to limit the number of contracts per direction.. I tried:

protected override void Initialize()
{
EntriesPerDirection = 4;
}
but does not limit my position to 4..
Is there something that can override this?
gg80108 is offline  
Reply With Quote
Old 07-18-2012, 08:10 AM   #2
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

gg,

What is your EntryHandling set to? Do your order's have signal names?

Here is more information on Entry handling and EntriesPerDirection : http://www.ninjatrader.com/support/f...37&postcount=2
NinjaTrader_AdamP is offline  
Reply With Quote
Old 07-18-2012, 08:47 AM   #3
gg80108
Senior Member
 
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
Default

Quote:
Originally Posted by NinjaTrader_AdamP View Post
gg,

What is your EntryHandling set to? Do your order's have signal names?

Here is more information on Entry handling and EntriesPerDirection : http://www.ninjatrader.com/support/f...37&postcount=2
Think I was confusing "entry" with "quanity". txs.
gg80108 is offline  
Reply With Quote
Old 07-18-2012, 08:54 AM   #4
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

gg,

No problem.

Please feel free to contact us any time.
NinjaTrader_AdamP 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
Changing number of contracts traded pandyav Automated Trading 3 10-05-2012 02:21 AM
number of contracts exceeding settings. mainstream Automated Trading 5 06-15-2011 01:16 PM
Number of contracts with ATM ssg10 Strategy Development 1 06-17-2009 05:58 AM
Total Number of Contracts Trades pivot44 Miscellaneous Support 4 05-23-2007 03:53 PM
Number of contracts is bumped up deanldavis475 SuperDOM and other Order Entry Windows 2 05-14-2007 09:17 PM


All times are GMT -6. The time now is 10:20 PM.