Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

eliminate difference between real trades and backtesting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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!

    #2
    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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mestor, 03-10-2023, 01:50 AM
    16 responses
    389 views
    0 likes
    Last Post z.franck  
    Started by rtwave, 04-12-2024, 09:30 AM
    4 responses
    31 views
    0 likes
    Last Post rtwave
    by rtwave
     
    Started by yertle, Yesterday, 08:38 AM
    7 responses
    29 views
    0 likes
    Last Post yertle
    by yertle
     
    Started by bmartz, 03-12-2024, 06:12 AM
    2 responses
    22 views
    0 likes
    Last Post bmartz
    by bmartz
     
    Started by funk10101, Today, 12:02 AM
    0 responses
    7 views
    0 likes
    Last Post funk10101  
    Working...
    X