Thanks!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
eliminate difference between real trades and backtesting
Collapse
X
-
eliminate difference between real trades and backtesting
Hello, I need to make trading system closer to backtesting results, in reality there is a delay in execution of orders, and it influences the results of trading. System executes orders by close of a candle. I need good decision, may be to execute orders before 200 ms of ending of candle period or something else?
Thanks!Tags: None
-
Hello U0000999,
Thanks for your post.
If your strategy is running with the setting of Calculate.OnBarClose then it would run your strategy once per bar and any orders to be placed would be placed and may be filled on the next bar. This is also the same mode that historical data is processed on.
If you run the strategy with the setting of Calculate.OnEachTick or Calculate.OnPriceChange then the strategy would execute (On live or market replay only, not on historical data) on every tick or every price change that occurs with a bar. This would certainly get you an earlier opportunity but you have to know that in these modes, it is possible to unintentionally place multiple orders and you would need your own additional logic to prevent this. It is also possible that the intrabar conditions may show conditions that favor an entry but when reviewed historically the conditions would not be favorable. An example of the later is a crossover condition that appears intrabar but when the bar finally closes would not show a crossover because of the final price movement. You would need to determine how best you wanted to handle that particular situation.
If you are backtesting with an exotic bar, such as Renko or Heiken-Ashi, please note that you may achieve false positive results as these bars do not reflect that actual price movement that occurred within the bar.Paul H.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Johndc, Today, 04:39 AM
|
0 responses
2 views
0 likes
|
Last Post
by Johndc
Today, 04:39 AM
|
||
Started by johntraderuser2, Today, 02:34 AM
|
0 responses
7 views
0 likes
|
Last Post Today, 02:34 AM | ||
Started by IanS00, 03-27-2024, 11:24 AM
|
2 responses
12 views
0 likes
|
Last Post Today, 02:00 AM | ||
Started by Mariawilcoxi, Today, 01:32 AM
|
0 responses
5 views
0 likes
|
Last Post
by Mariawilcoxi
Today, 01:32 AM
|
||
Started by gleichnerany, Today, 01:17 AM
|
0 responses
5 views
0 likes
|
Last Post
by gleichnerany
Today, 01:17 AM
|
Comment