NexusFi: Find Your Edge


Home Menu

 





Backtest fill algorithm


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 1 posts (1 thanks)
    2. looks_two MarkG with 1 posts (0 thanks)
    3. looks_3 Koepisch with 1 posts (0 thanks)
    4. looks_4 artemiso with 1 posts (2 thanks)
    1. trending_up 3,589 views
    2. thumb_up 3 thanks given
    3. group 4 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 Koepisch 
@ Germany
 
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: FDAX
Posts: 568 since Nov 2011
Thanks Given: 440
Thanks Received: 518

Where can i find some information about the fill algorithm in ninjatrader backtests (slippage at order type?). Because i don't use the integrated backtester i want build a similar fill behavior in my own test suite. Has the integrated backtester bid/ask data too or is it simulated via some "Last" value calculations?

Thanks!


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Irans Answer Due Today: Peace Surges to 33.5%, Invasion …
Prediction Markets & Event Contracts
Weekend Update: First Qatari LNG Transit Attempted -- IR …
Traders Hideout
The 50/50 Paradox: Peace and Invasion Each at 20% -- Ira …
Prediction Markets & Event Contracts
South Korea Suspends Bithumb for Six Months Over AML Fai …
Cryptocurrency
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


Koepisch View Post
Where can i find some information about the fill algorithm in ninjatrader backtests (slippage at order type?). Because i don't use the integrated backtester i want build a similar fill behavior in my own test suite. Has the integrated backtester bid/ask data too or is it simulated via some "Last" value calculations?

Thanks!

The integrated backtest does not use historical bid and ask data. NinjaTrader cannot record synchronized bid and ask with the exception of the market replay files.

Historical data, which is used for backtests always comes as single tick data. That means that you will not get intra-bar fills for market orders. Market orders will be executed at the open price of the following bar. Limit and stop orders will be executed at the limit price or stop price. You can manually add slippage.

For some bar types, such as Renko bars, the backtest produces complete nonsense, because the open of those bar types does not reflect the first tick. The NinjaTrader Renko bars are therefore not backtestable.


Reply With Quote
Thanked by:
  #3 (permalink)
 MarkG 
Switzerland
 
Experience: Advanced
Platform: NinjaTrader
Broker: Kinetick, CQG
Trading: CL, FDAX, Forex
Posts: 18 since Jun 2012
Thanks Given: 23
Thanks Received: 26


Hi Fat Tails,
Thanks for your useful informed answer.
Just wondering whether there is any other platform out there that's better than NinjaTrader for backtesting?
Perhaps MultiCharts?
Mark


Reply With Quote
  #4 (permalink)
 artemiso 
New York, NY
Vendor shill
 
Experience: Beginner
Platform: Vanguard 401k
Broker: Yahoo Finance
Trading: Mutual funds
Posts: 1,152 since Jul 2012
Thanks Given: 784
Thanks Received: 2,687

@Koepisch:

This answer is 1 year late, but I think there's a @DefaultFillType.cs in the NT folder that is responsible for the logic.


Reply With Quote
Thanked by:




Last Updated on June 16, 2013


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts