![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Apr 2010
Posts: 1,058
Thanks: 33
Thanked 2 times in 1 post
|
I read in the Help how limit orders are filled in backtests, and the options to choose from - especially that limit orders with the default option are only considered filled if they are penetrated and not just touched.
I can't see any reference for the same info regarding market orders (presumably the open of the next bar?) and stop orders (presumably filled if price touched?) Please could you confirm the processing that's done for mkt & stop orders, along with any points of interest, or provide a link to where I can it? Thanks |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
Please review this link: http://www.ninjatrader-support.com/H...AStrategy.html Look at the Default and Liberal settings. In a live situation, it will depend on your broker since the order should be working in the market. Market orders are filled at the next available price, where ever that is.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Apr 2010
Posts: 1,058
Thanks: 33
Thanked 2 times in 1 post
|
That documentation is specifically the documentation that I was referring to which doesn't mention market or stop orders - even if it is quite useful to have the option to choose the algorithm, there's no info on these 2 order types and their handling by the Analyzer in backtests.
It covers only limit orders (and stop-limit orders). So, market orders and stop orders in historical backtest execution. How does the strategy analyzer do it? Which price does it take from the OHLC bar? How about trading through the price in the case of stops? Is that decided by the Default / Liberal / custom algorithms? |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 978 times in 961 posts
|
adamus, market orders are filled on the next bar open which is the next possible location after the signal was generated to act upon it, stop orders are just market orders if triggered, for stop limit orders the same limit order consideration as explained in the doc's would apply.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Apr 2010
Posts: 1,058
Thanks: 33
Thanked 2 times in 1 post
|
OK, but are stop orders triggered when touched, or triggered when the price is traded through, or is it dependent on choosing the Default or Liberal backtest fill algorithm?
Thanks |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 978 times in 961 posts
|
They would be triggered when touched - the fill algorithm choice is relevant for stoplimit / limit orders.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strategy Position - Any way to stop a strategy processing historical data? | ScoobyStoo | Strategy Development | 7 | 04-10-2012 06:09 AM |
| Profit target and stop loss bracket orders - fill behaviour in backtesting | adamus | Strategy Development | 9 | 06-17-2010 07:25 AM |
| Backtesting Timestamp/Order Fill Bug | DanielB | Version 7 Beta General Questions & Bug Reports | 12 | 05-28-2010 09:13 PM |
| Req: Access to number of historical bars processing | tazatek | Suggestions And Feedback | 2 | 11-17-2009 01:34 AM |
| Quick Questions regarding strategy historical processing | bridenour | Automated Trading | 16 | 02-24-2009 04:54 AM |