NexusFi: Find Your Edge


Home Menu

 





Order fills on real time vs market replay


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 1 posts (6 thanks)
    2. looks_two calhawk01 with 1 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 RichardHK with 1 posts (0 thanks)
    1. trending_up 4,451 views
    2. thumb_up 6 thanks given
    3. group 3 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Order fills on real time vs market replay

  #1 (permalink)
 calhawk01 
baltimore marylnd
 
Experience: Beginner
Platform: ninja
Trading: es
Posts: 91 since May 2013
Thanks Given: 5
Thanks Received: 11

hello, need some opinion/help on how i can solve my problem

problem:

i've created and tested a system on market replay, and now i am doing testing on real time data. my system enters on a limit order when XYZ happens. Most of my orders on market replay data is filled, however, on real time (still simulation) my orders are not filled and then cancelled.

Any idea how i can find a solution to this? i do know that market replay data is compiled 1/4 of a second?

thank you in advance!

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
How to apply profiles
Traders Hideout
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
 
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103



calhawk01 View Post
hello, need some opinion/help on how i can solve my problem

problem:

i've created and tested a system on market replay, and now i am doing testing on real time data. my system enters on a limit order when XYZ happens. Most of my orders on market replay data is filled, however, on real time (still simulation) my orders are not filled and then cancelled.

Any idea how i can find a solution to this? i do know that market replay data is compiled 1/4 of a second?

thank you in advance!

The market replay data is Zenfire data and should be more or less identical with Zenfire live data. However, if you use broker feeds (for example Interactive Broker's snapshot data) you will get something entirely different. If you use a different real-time feed such as Kinetick, there also may be minor differences.

Now let us assume that you use the NinjaTrader simulator with Zenfire data. The main difference between market replay and simulation on live data is

market replay -> the simulator settings do NOT apply
replay on live data -> the simulator settings do apply

This means that real-time data simulation takes into account latency, market replay does not. In particular there are three different delay periods

(1) transmission of trade data from the exchange to your PC (this is not simulated but real)
(2) order transmission to exchange (default value is 75 msec)
(3) execution of order and confirmation (default value is 150 msec)

That said, if you trade in Europe and access an exchange in the US, the default values of the order transmission time (2) and the execution and confirmation time (3) need to be increased. But let us assume that the default values for the simulator are sufficient.

If you trade with real money, your limit order will be sitting in an order queue, possibly at the exchange. Whether you get a fill or not when the limit price is touched depends on your rank in the order queue. In a simulation environment, whether market replay or live simulation, it is near-impossible

-> to estimate your rank in the order queue
-> how your orders would have impacted the order book and market prices

This means that there are limitations as to what can be simulated. The impact of your trading on the market is usually neglected. The fill algorithms of the simulation machine will only fill you order once the limit price has been penetrated, not if it has been touched. This is a conservative setting, but better than a too aggressive setting for the simulation, as it should keep you out of trouble once you are going live.

NinjaTrader allows you to change the simulation settings under Tools -> Options -> Simulator. You can check "Enforce immediate fills", and you will get better fills for limit orders. Not sure though that those fills are realistic.

If the system that you have developed does not work with the real-time simulation, then it is probably not worth to develop it any further.

Reply With Quote
  #4 (permalink)
nourozi
New Zealand
 
Posts: 92 since Jun 2013
Thanks Given: 52
Thanks Received: 30


Fat Tails View Post
The market replay data is Zenfire data and should be more or less identical with Zenfire live data. However, if you use broker feeds (for example Interactive Broker's snapshot data) you will get something entirely different. If you use a different real-time feed such as Kinetick, there also may be minor differences.

Now let us assume that you use the NinjaTrader simulator with Zenfire data. The main difference between market replay and simulation on live data is

market replay -> the simulator settings do NOT apply
replay on live data -> the simulator settings do apply

This means that real-time data simulation takes into account latency, market replay does not. In particular there are three different delay periods

(1) transmission of trade data from the exchange to your PC (this is not simulated but real)
(2) order transmission to exchange (default value is 75 msec)
(3) execution of order and confirmation (default value is 150 msec)

That said, if you trade in Europe and access an exchange in the US, the default values of the order transmission time (2) and the execution and confirmation time (3) need to be increased. But let us assume that the default values for the simulator are sufficient.

If you trade with real money, your limit order will be sitting in an order queue, possibly at the exchange. Whether you get a fill or not when the limit price is touched depends on your rank in the order queue. In a simulation environment, whether market replay or live simulation, it is near-impossible

-> to estimate your rank in the order queue
-> how your orders would have impacted the order book and market prices

This means that there are limitations as to what can be simulated. The impact of your trading on the market is usually neglected. The fill algorithms of the simulation machine will only fill you order once the limit price has been penetrated, not if it has been touched. This is a conservative setting, but better than a too aggressive setting for the simulation, as it should keep you out of trouble once you are going live.

NinjaTrader allows you to change the simulation settings under Tools -> Options -> Simulator. You can check "Enforce immediate fills", and you will get better fills for limit orders. Not sure though that those fills are realistic.

If the system that you have developed does not work with the real-time simulation, then it is probably not worth to develop it any further.

Actually the fill algorithms in live simulation and I am pretty sure, in Market Replay both may fill your order on touch. Also, I am pretty sure the simulator settings DO apply to Market Replay. I do find that Market Replay and the live simulation both fill limit orders too easily/quickly on the touch.

Reply With Quote
  #5 (permalink)
 RichardHK 
Hong Kong
 
Experience: Intermediate
Platform: NinjaTrader, TWS
Broker: IB/Kinetick
Trading: ES
Posts: 236 since Jan 2012
Thanks Given: 132
Thanks Received: 340


calhawk01 View Post
hello, need some opinion/help on how i can solve my problem
problem: i've created and tested a system on market replay, and now i am doing testing on real time data. my system enters on a limit order when XYZ happens. Most of my orders on market replay data is filled, however, on real time (still simulation) my orders are not filled and then cancelled.
Any idea how i can find a solution to this? i do know that market replay data is compiled 1/4 of a second?
thank you in advance!

An easy solution to get better correlation between Market Reply and Live is to simply add one tick to your profit target orders. Normally, not always of course, you need to move one tick past limit order to fill. So instead of using a 4 tick target on MR, use a 5 tick one. For 8t use 9t. And so on...

My Market Replay does delay its target execution a little, but not back testing so no sweat.

Richard
Hong Kong
Reply With Quote




Last Updated on November 16, 2013


© 2024 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 - Privacy Policy - Downloads - Top
no new posts