Help Center Blog Open An Account

What is the latency built into the R-Trader SIM?

I am doing some testing using RAPI to run my code, and R-Trader to review / evaluate my orders. I notice that often times there is some latency reporting back my order state.

As an example this is an example of what I see sometimes,

  1. I submit a resting limit order at a bid price of 100.
  2. I receive a message that my order is now open, and resting in the queue at 100.
  3. After my order is in an open state, the market moves down to a bid price of 99. However I do not receive a message that I was filled at 100.
  4. From here, the market moves up to 105. I don’t receive any message at this point.
  5. Finally the market moves back down to 99, and I receive a fill.

It seems that there is either some built in latency in the messaging in the SIM, or I am hitting some blocking in my code, and need to free up my messaging method 100% by putting everything else onto separate threads. Before I get into creating thread pools and doing further optimizing, I just wanted to check and see if there were any known latency settings built into the SIM by design, and if so, if there would be any way to change them.

Thanks in advance!

Ian

1 Like

Hi @Iantg,

Thank you for your question and feedback.

Have you considered switching the Gateway you are connecting to via Rithmic? Rithmic has several gateways to choose from (Chicago, East, West, Hong Kong, etc).

I would suggest trying to connect to several of these gateways in an attempt to see if your latency and execution speed is any better. Typically the one closest to your physical location will give you the best ping.

If you continue noticing latency issues after testing several different gateways, we can escalate this to Rithmic to see if they have any additional advice.

Please give it a try and let us know.
Thanks,
Jake
Optimus Futures

1 Like

Jake, Thanks for your response. For R-Trader I am using the Chicago gateway, and my application that I built doesn’t have a gateway value in plain text as far as I can tell. It has a list of parameters that read like this:
oParams.DmnSrvrAddr =
oParams.DomainName =
oParams.LicSrvrAddr =
oParams.LocBrokAddr =
oParams.LoggerAddr =
oParams.LogFilePath =
Each of these point to various URL’s and ports. I got the values to enter for these from Rithmic directly, and I am not sure if these can be changed or not.

I guess the main point of my question is just to ask if there is any known latency by design in the messaging that comes back from the various API calls to check the order state. As a reference, NinjaTrader has a built in 100 MS of latency from when you first submit your order, to when it posts back a message stating that the order was received and is working in the queue.

I couldn’t find any information about Rithmic’s SIM engine, so I thought I would ask here in case someone here knew it off hand.

Thanks,

Ian

Hi @Iantg,

Thanks for following up and for your clarification about your question.

I am not personally aware of any built in latency to the Rithmic paper trading/SIM environment, but let me look into this with Rithmic for you. I will reach out to their support team for clarification on this topic and update this thread once I have an answer from them.

Thanks,
Jake
Optimus Futures

HI @Iantg,

Following up on our conversation, Rithmic got back with us about your question:

The Rithmic Simulator is designed to simulate real market activity with real market data. You will find that Rithmic provides metrics and information to allow you to examine the latency of events in the Rithmic system. For example, every order has timestamps to the microsecond showing the time the order was received by Rithmic and the time when the order was received by the simulator.

The column in Recent Orders shows the system latency on an order per order basis by comparing the delta between when the order was received and when it was sent to the exchange.
Every market data message has timestamps as well.

To better understand your questions regarding latency, Rithmic asked if you could start by defining which latency you are measuring?

I know you mentioned seeing price fluctuations with your orders, was there something else you were measuring specifically to gauge the latency of Rithmic’s paper trading server?

I hope this helps.
Jake
Optimus Futures

1 Like

Hi Jake,

The specific latency I am inquiring about would be from their SIM. The exchange will send messages notifying you about your order status as it moves from:. Submitted, received by exchange gateway, open pending, open and filled.

With Rithmic’s paper trading SIM I am currently seeing these messages and am wondering how the time stamps of each order status update would compare to the real exchange. Obviously when paper trading these messages are generated by Rithmic’s SIM engine and not the exchange. So my question is around this latency compared to the real exchange latency.

As a reference point Ninja Traders SIM engine adds 150 milliseconds to each simulated order’s latency so as to be “realistic”. I haven’t seen anywhere near that much from Rithmic, but just wondered if there was any at all.

Hope this clarification helps.

Thanks,

Ian

@Iantg jumping in here to assist you with some practical advice to help you complete your testing.

Sim engines reside on sim servers, not production servers, so when some say they had X amount of milliseconds added o the execution, the question is what reference number do they use. Also, Ninja currently uses CQG and Rithmic for their implementation as far as I know, so this addition of 150 Milliseconds is to which data feed?

While adding a fixed number sounds reliable, your numbers, in reality, could be different. For example, your location, internet speed, equipment, programs that you run, among other things, could make your numbers better or worse than the average.

We respect the latency factor when you build a methodology while knowing how fast you can place your targets and whether they have a chance to get filled. But, you will never know this accurately until you start executing. If 10-20 milliseconds matter for your method, you compete with low-end HFTs and on the high-end with subpar milliseconds that 99% of retail can not do. There is a level where one needs an exchange membership lease (save on cost due to execution frequency) and host the equipment in a data center to get the best latency possible.

I highly suggest that we try the latency for you, specifically on a production account using a micro contract. In my opinion, it would be 100% more practical than guessing your latency.

Jake can find out under what assumptions Rithmic works, but I think that would serve as a theoretical value.

Thanks,
Matt Z
Optimus Futures

1 Like

Hi Matt,

Thanks for the follow up. I completely agree with your advice. I plan to start testing with the micros next month using a live account. I am already co-located in Data Center 04 / Aurora via TheOmne.net and do plan to pursue a seat license pending the outcome of the next 30 to 60 days of testing.

Regarding what specific latency I am looking for information about: NinjaTrader has I believe around 150 millisecond latency in their SIM engine for order routing. I.E, they add this delay in between when you submit an order and when it is goes into an “open” state in the queue. This only applied for Live SIM, not market replay. So I was just curious if Rithmic had anything similar, or no delay at all in their SIM order routing.

1 Like