NexusFi: Find Your Edge


Home Menu

 





Do you know your latency?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one pardo127 with 3 posts (0 thanks)
    2. looks_two endian675 with 2 posts (0 thanks)
    3. looks_3 sam028 with 2 posts (1 thanks)
    4. looks_4 treydog999 with 2 posts (0 thanks)
    1. trending_up 5,977 views
    2. thumb_up 1 thanks given
    3. group 10 followers
    1. forum 12 posts
    2. attach_file 1 attachments




 
Search this Thread

Do you know your latency?

  #11 (permalink)
 
TradingTech's Avatar
 TradingTech 
Chicago, IL
 
Experience: Master
Platform: X_TRADER, TT
Trading: ES, NQ, ZN, CL, 6E
Posts: 167 since Feb 2016
Thanks Given: 72
Thanks Received: 122

TT posts latency metrics in Audit Trail so you have those numbers in front of you at all times. Our CTO recently posted a blog and referenced our numbers.

"Autospreader hedge latencies as low as 25 microseconds with a median in the mid-50s and re-quote latencies of 22 mics with a median in the mid-30s."

https://www.tradingtechnologies.com/blog/2016/10/19/what-to-expect-from-tt-at-fia-expo-2016/

If you have any questions about the products or services provided, please send me a Private Message or use the futures.io " Ask Me Anything" thread
Follow me on Twitter Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
What broker to use for trading palladium futures
Commodities
How to apply profiles
Traders Hideout
Better Renko Gaps
The Elite Circle
About a successful futures trader who didnt know anythin …
Psychology and Money Management
 
  #12 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


pardo127 View Post
For order execution.

MC to IB(broker) and IB to exchange.

The first thing is to find out where your IB account is hosted, usually zdc1.ibllc.com for European clients, or cdc1.ibllc.com (Chicago), gdc1.ibllc.com (Connecticut), ...



If you ping the server where your account is hosted this will give you some clues.
Then depending on the instruments traded the data will come from other location (eufarm, usfarm, usfuture, ...). You can
find out their IP addresses with a "netstat -n" or on Windows with the Resource Monitor, and then ping these servers.

That's the quick & easy method.
A more precise method will be to write a strategy which will send limit orders, far from the price for not being executed, then cancel them, and check how long it takes. The code itself will depends if it's the .Net or the EL.
For the data itself a good method is to check the received data timestamp but with IB filtered data I don't think it will give accurate results.

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
Thanked by:
  #13 (permalink)
pardo127
madrid spain
 
Posts: 5 since Oct 2016
Thanks Given: 0
Thanks Received: 0



sam028 View Post
The first thing is to find out where your IB account is hosted, usually zdc1.ibllc.com for European clients, or cdc1.ibllc.com (Chicago), gdc1.ibllc.com (Connecticut), ...



If you ping the server where your account is hosted this will give you some clues.
Then depending on the instruments traded the data will come from other location (eufarm, usfarm, usfuture, ...). You can
find out their IP addresses with a "netstat -n" or on Windows with the Resource Monitor, and then ping these servers.

That's the quick & easy method.
A more precise method will be to write a strategy which will send limit orders, far from the price for not being executed, then cancel them, and check how long it takes. The code itself will depends if it's the .Net or the EL.
For the data itself a good method is to check the received data timestamp but with IB filtered data I don't think it will give accurate results.

Thank for the information.

I'm trying to measure accurately and I have this Easylanguage code but dont compile in Multichart because It programmed with objects :


{
JJ Log Generator
---------------------------
Based on Code from Mathemagician
Added ideas from AndroidMarvin
Modded by Honza K.
---------------------------

Purpose: Logs order state infos with milisecond difference calculation between events



}

// DefineDLLFunc: "JJLogger.dll", int, "LogMessage", lpstr, lpstr;

Using tsdata.trading;
Using elsystem;

input:
EnableLogging(true),
LogFileName("C:\JJ_LogFromTS.txt");

var:
Intrabarpersist MessagesLogged(0),
Intrabarpersist Order ord(null),
Intrabarpersist tmpString(""),
StopWatch sw( Null ), // to get msec resolution
OrdersProvider op(null),
Intrabarpersist lastElapsed( 0.0 ); // record previous msec value to count diff

Method override void InitializeComponent()
begin
op = New OrdersProvider;
op.Realtime = true;
op.Updated+=opUpdated;
op.Load=true;
sw = New StopWatch; // AndroidMarvin idea - adding stopwatch to count latencies directly
sw.Start();
end;

Method void opUpdated (Objectsender, OrderUpdatedEventArgs args)
begin
if EnableLogging and args.Reason.ToString()<>"initialupdate" then begin
MessagesLogged+=1;
If args.Order<>null then begin
ord = args.Order;
tmpString =
Formatdate("yyyy/MM/dd", ComputerDateTime()) // date
+ "," + FormatTime("HH:mm:ss", ComputerDateTime()) // time
+ "," + numtostr( sw.ElapsedMilliseconds - lastElapsed, 0 ) // milisecond difference from previous event
+ "," + args.State.ToString()
{ + "," + args.Message
+ "," + args.Reason.ToString()
+ "," + ord.AccountID
+ "," + ord.Action.ToString()
+ "," + ord.AvgFilledPrice.ToString()
+ "," + ord.EnteredQuantity.ToString()
+ "," + ord.EnteredTime.ToString()
+ "," + ord.FilledQuantity.ToString()
+ "," + ord.FilledTime.ToString()
+ "," + ord.OrderID.ToString()
+ "," + ord.Originator.ToString()
+ "," + ord.Route.ToString()
+ "," + ord.State.ToString()
+ "," + ord.StateDetail.ToString()
+ "," + ord.StopPrice.ToString()
+ "," + ord.Symbol.ToString()
+ "," + ord.SymbolExtension.ToString()
+ "," + ord.Type.ToString()
} ;

end else begin
tmpString =
args.State.ToString()
+ "," + args.AccountID
+ "," + args.Message
+ "," + args.OrderID
+ "," + args.Reason.ToString()
+ "," + args.Symbol
;
end;

Fileappend(LogFileName, tmpString + newline);
lastElapsed = sw.ElapsedMilliseconds;

end;
end;

// Once (EnableLogging) begin Fileappend(LogFileName, newline + "Logging Active" + newline); end;
plot1(MessagesLogged, "Log Messages");

Thread Starter

Reply With Quote




Last Updated on October 25, 2016


© 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