NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 07-21-2008, 09:14 AM   #1
toyogo00
Member
 
Join Date: Apr 2008
Posts: 76
Thanks: 0
Thanked 0 times in 0 posts
Default help on EnterLongLimit

Hi,

the price at 10:00am is 1.5820 and I place a buy limit @1.5800. At 10:08am, the price reaches 1.5798 and it suppose to trigger my buy limit order. I use

OnBarUpdate() /* based on 1min chart */
{
if (cond1) EnterLongLimit(1.5800);
}

I use OnOrderUpdate() to check the status, it changes from
10:00am, State:PendingSubmit
10:00am, State:Accepted
10:00am, State:Working
10:00am, State:PendingCancel
10:00am, State:Cancelled

I don't understand why it is cancelled.

Pls show me how to set the limitprice in EnterLongLimit ?

Regards,
Toyogo
toyogo00 is offline  
Reply With Quote
Old 07-21-2008, 09:46 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

Orders are only active for the bar they are placed unless you re-submit them or, pass in the parameter liveUntilCancelled = true if you use the long version of the EnterLongLimit() method.
NinjaTrader_Ray 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 order mike8943 Strategy Development 3 07-04-2008 01:47 PM
EnterLongLimit and stoploss ct Strategy Development 1 12-31-2007 09:18 PM
Strange Behaviour with EnterLongLimit and Short Position simone Strategy Development 21 12-01-2007 12:48 AM


All times are GMT -6. The time now is 09:36 PM.