Thanks in advance.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Errors in backtesting
Collapse
X
-
Errors in backtesting
When I run a backtesting for a strategy I have detected some errors in specific situations.For example, if there is a bar which close above its open and my strategy have openned long postion by "stop order", the backtesting registers this operation like loser, but isn't correct because the bar price doesn't back to my level stop. How can I configurate the backtesting for solve this mistakes in the backtesting?
Thanks in advance.Tags: None
-
Jason, in real-time the strategy enter long at 1.3104 but the stop is not trigered because the price at 1.3099 was reached before (at the beginning of this bar). So his operation was finalized with 5 ticks of benefit but the backtesting say that was 5 ticks of loss.
Comment
-
Unfortunately backtests only use OHLC data per bar - intra day data is unknown. Such discrepancies can be as expected when comparing a backtest and a real-time test. Please see the link below for more information.
Getting Filled on an Order
• During a backtest you can select conservative or liberal fill algorithms which will produce different results. Fills are determined based on 4 data points, OHLC of a bar since that is the only information that is known during a backtest.
• During simulation using real-time live market data or Market Replay, the fill algorithm is dynamic in that it uses incoming market data (both price and volume) to determine if an order should be filled or not.
• During real-time live brokerage trading, orders are filled according to market dynamics.
As you can see, there are three distinctly different models for how and when an order may be filled. This is why you may see orders NOT fill in real-time that you may otherwise expect to see filled based on your backtesting results.JasonNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by stafe, 04-15-2024, 08:34 PM
|
7 responses
31 views
0 likes
|
Last Post Today, 11:19 AM | ||
Started by adeelshahzad, Today, 03:54 AM
|
4 responses
30 views
0 likes
|
Last Post
by adeelshahzad
Today, 10:51 AM
|
||
Started by merzo, 06-25-2023, 02:19 AM
|
10 responses
823 views
1 like
|
Last Post Today, 10:38 AM | ||
Started by frankthearm, Today, 09:08 AM
|
5 responses
17 views
0 likes
|
Last Post Today, 10:19 AM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
43 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
Comment