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 > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 05-20-2009, 04:38 PM   #1
zooinek
Member
 
Join Date: Mar 2009
Posts: 99
Thanks: 0
Thanked 0 times in 0 posts
Default EnterLongLimit

Hi,

i have question..
when i am already in long position it is possible to enter to next long position?
So to be in position with 2 contracts but to enter into these two position in different time.

For example:
i have signal for entering to long, so i will enter to long.
I used EnterLongLimit(1, price);
Few minutes later i will recive next signal to enter to long position, so i will use
EnterLongLimit(1, price);
And 10 minutes later i will recive to enter to short position, so i will use
{
ExitLong();
EnterShortLimit(1, priceTwo);
}


Am i really in two long positions. Had i really two contracts for long?
Or the secong enter long was just ignored?

Thank you
zooinek is offline  
Reply With Quote
Old 05-20-2009, 07:41 PM   #2
roonius
Certified NinjaScript Consultant
 
Join Date: Oct 2008
Location: Chicago, IL
Posts: 523
Thanks: 0
Thanked 3 times in 3 posts
Send a message via Skype™ to roonius
Default

Quote:
Originally Posted by zooinek View Post
Hi,

i have question..
when i am already in long position it is possible to enter to next long position?
So to be in position with 2 contracts but to enter into these two position in different time.

For example:
i have signal for entering to long, so i will enter to long.
I used EnterLongLimit(1, price);
Few minutes later i will recive next signal to enter to long position, so i will use
EnterLongLimit(1, price);
And 10 minutes later i will recive to enter to short position, so i will use
{
ExitLong();
EnterShortLimit(1, priceTwo);
}


Am i really in two long positions. Had i really two contracts for long?
Or the secong enter long was just ignored?

Thank you
It depends on your EntriesPerDirection setting.
If it is set to 1 then second entry will be ignored
roonius is offline  
Reply With Quote
Old 05-21-2009, 03:53 AM   #3
zooinek
Member
 
Join Date: Mar 2009
Posts: 99
Thanks: 0
Thanked 0 times in 0 posts
Default

and where could i modify the entries per direction setting?
zooinek is offline  
Reply With Quote
Old 05-21-2009, 03:58 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 973 times in 956 posts
Default

It can be either set in the strategy Initialize() - http://www.ninjatrader-support.com/H...Direction.html

or when you start up your strategy (look under OrderHandling) -

http://www.ninjatrader-support.com/H...romAChart.html
NinjaTrader_Bertrand 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
EnterLongLimit() ltemme Automated Trading 17 04-15-2010 04:56 PM
Backtesting with EnterLongLimit() stefy Strategy Development 1 08-06-2008 09:50 AM
help on EnterLongLimit toyogo00 Strategy Development 1 07-21-2008 09:46 AM
EnterLongLimit order mike8943 Strategy Development 3 07-04-2008 01:47 PM
EnterLongLimit and stoploss ct Strategy Development 1 12-31-2007 09:18 PM


All times are GMT -6. The time now is 02:19 PM.