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 01-12-2008, 05:56 AM   #1
Bubss
Junior Member
 
Join Date: Jan 2008
Posts: 8
Thanks: 0
Thanked 0 times in 0 posts
Default Order entry question

I don't seem to understand the order entry in NT. In order to get a better understanding, I downloaded the "Monitoring For & Trading a breakout" strategy from the Reference samples.

That strategy is supposed to place an order immediately when a break of a 15-bar range occurs. The order should be placed immediately, not waiting for the current bar to close as I understand the description.

However, when I run it on a 2-min chart in Strategy Analyzer I get the attached result. What appears to happen is that when the 15-bar range gets broken, the buy happens at the open price of the following bar.

Is the result on the chart expected or is there a bug in the sample code or an incorrect setting?

Many thanks
Attached Images
File Type: jpg STW 01-08 09_01_2008 (2 Min).jpg (86.5 KB, 22 views)
Bubss is offline  
Reply With Quote
Old 01-12-2008, 08:50 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

Yes, that is how backtesting works.

- Entry condition occurs on bar 100 (for example)
- Order is filled on bar 101
NinjaTrader_Ray is offline  
Reply With Quote
Old 01-14-2008, 07:19 AM   #3
Bubss
Junior Member
 
Join Date: Jan 2008
Posts: 8
Thanks: 0
Thanked 0 times in 0 posts
Default

Thank you, Ray, that helps.

Regards
Bubss 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
Entry order placed . . . has been ignored whitmark General Programming 1 11-19-2007 11:57 AM
Sim limit order entry bug? Json Miscellaneous Support 1 12-01-2006 03:38 AM
Submit Limit Entry Order and Stop Loss Order at same time? aspTrader Miscellaneous Support 2 10-04-2006 02:40 AM
wait for entry order fill before placing stoplimit order ratherBgolfing Automated Trading 2 03-27-2006 01:59 AM
order entry/exit Vin Miscellaneous Support 1 06-29-2005 12:10 AM


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