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 02-16-2010, 11:23 AM   #1
slimm
Junior Member
 
Join Date: Feb 2010
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default Strategy Limit Order Exits

On SIM, some times the strategy triggers order filled when the target price is traded (but not through it). Other times it does not if it does not trade through it. Example: On my SIM account a strategy was running in the ES today. Price trades down to the target but not through it. Strategy does not exit. A few minutes later, it trades down to that exact price again and again does not trade through it but this time strategy exits at that price.(I always have fill type = Default.) In that situation the fill would not happen in a brokerge account since the exit is a limit order at the exchange that would not trigger until it trades through it.


Is the exit treated the same in a live account? If so, the chart and strategy and the live account could get out of sync as the strategy will trigger filled and flat when the price touches, where the actual brokerage account will still be sitting with the target and the stop order until it trades through the price and gets filled. if it does not trade through the price, then there is a problem.

Does Ninja trader treat limit exits the same in live vrs.SIM? Does it know or check that the fill from the brokerage account has or has not occurred? Otherwise it could show filled on the chart and not actually be filled and would not continue to manage the trade?

Thank you.
slimm is offline  
Reply With Quote
Old 02-16-2010, 11:56 AM   #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

Hello Slimm,

Welcome to our forums.

Simulated is not the same as a live account. Please see this article on some expected differences.
http://www.ninjatrader-support.com/H...sBacktest.html

A limit order doesn't necessarily have to "Trade through" the price. When you set the limit order, you're saying "I want to be filled at this price or better." If someone agrees to this price then buyer and seller have met and the trade is made. Your fill isn't determined by what happend historically but rather the current market dynamics.

You can set how NinjaTrader will behave in the event your order is rejected with RealTimeErrorHandling.
http://www.ninjatrader-support.com/H...rHandling.html
NinjaTrader_RyanM is offline  
Reply With Quote
Old 02-16-2010, 12:12 PM   #3
slimm
Junior Member
 
Join Date: Feb 2010
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default

Generally, limits will not get filled if the price does not trade through. (Trading ES) If the limit order does not get filled at the account, will the strategy show the exit on the chart and consider the trade closed?

If so they will be out of sync.

Does it know or check that the fill from the brokerage account has or has not occurred? Otherwise it could show filled on the chart and not actually be filled and would not continue to manage the trade?
slimm is offline  
Reply With Quote
Old 02-16-2010, 12:29 PM   #4
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 Slimm,

The state of the order is reported by the broker. NinjaTrader then interprets this information and determines if there should be a fill. Please see this page which displays the potential order states.

http://www.ninjatrader-support.com/H...V6/IOrder.html
NinjaTrader_RyanM is offline  
Reply With Quote
Old 02-16-2010, 12:40 PM   #5
slimm
Junior Member
 
Join Date: Feb 2010
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default

So given the state of the order condition, the stategy will not consider the positon closed and will contimue to manage the trade until the broker reports the limit order as filled, no matter what has happened to the price?
slimm is offline  
Reply With Quote
Old 02-16-2010, 12:47 PM   #6
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

Slimm,

Yes this is true if you are using strategies in real-time and connected to a live broker account.

It will work differenly during a backtest or on a simulated account.
NinjaTrader_RyanM 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
Strategy Wizard Limit Order Help deltason5 Automated Trading 3 03-09-2009 02:58 AM
help NT Strategy - Limit order suchen ATM Strategies (Discretionary Trading) 2 03-03-2009 05:59 AM
limit order on IB, how about ATM strategy asalada Miscellaneous Support 5 12-31-2008 06:36 AM
Limit Order Exits not working daven Automated Trading 2 08-23-2008 02:17 PM
Exits by Limit in all circumstances Rognvald ATM Strategies (Discretionary Trading) 8 02-08-2005 10:41 PM


All times are GMT -6. The time now is 12:35 PM.