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 > 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 07-20-2011, 04:12 PM   #1
RogBear
Junior Member
 
Join Date: Apr 2011
Posts: 11
Thanks: 4
Thanked 0 times in 0 posts
Default Change Limit Price

I am having an issue getting limit price changes to take effect. My initial order looks like this:

workingOrder = EnterLongLimit(0, true, quantity, GetCurrentBid(), "pL");

When it does not fill, I try to adjust the order by only changning the limit price like this:

EnterLongLimit(NewLimitPrice);

Since this should operate on the existing order, I should not have to specify the other fields, right? I am concerned that if I issue the full command again, and already have a partial fill, that it will try to buy more quantity than I want.

Also I assume that I do not need to set "workingOrder = " for the adjustment order since I already have a handle to the Iorder object.

Where am I going wrong?
Thanks.


RogBear is offline  
Reply With Quote
Old 07-20-2011, 04:41 PM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hi RogBear,

Since you provide a signal name "pL" to your original order, any price changes to the order must reference the same signal name. Otherwise, NT thinks it's a new order and allows or not based on EntryHandling and EntriesPerDirection properties.

If you are working with IOrders, it's best is to assign the object with its new values.

workingOrder = EnterLongLimit(0, true, quantity, GetCurrentBid(), "pL");

//Some price change condition:
workingOrder = EnterLongLimit(NewLimitPrice, "pL");
NinjaTrader_RyanM is offline  
Reply With Quote
Old 07-20-2011, 08:57 PM   #3
RogBear
Junior Member
 
Join Date: Apr 2011
Posts: 11
Thanks: 4
Thanked 0 times in 0 posts
Default

Thank you very much for the clarification!
RogBear 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
Cannot enter a limit price for a limit order on orders tab cunparis Version 7 Beta General Questions & Bug Reports 7 07-09-2010 07:01 AM
can you change limit order price of pending order? ct Strategy Development 1 10-29-2009 03:58 AM
change default stop limit Futures_Shark ATM Strategies (Discretionary Trading) 3 04-14-2008 07:24 AM
Change existing limit order ydnic123 Strategy Development 3 02-17-2008 10:28 PM
How to make the price ladder stop moving when no change in price Trinity Miscellaneous Support 1 08-02-2006 07:41 PM


All times are GMT -6. The time now is 08:05 AM.