how to measure the speed of multichart.. latency topic

Questions about MultiCharts and user contributed studies.
tradersheldon
Posts: 22
Joined: 29 Jul 2010
Has thanked: 1 time
Been thanked: 4 times

how to measure the speed of multichart.. latency topic

Postby tradersheldon » 23 Aug 2010

Hi i would like to know if it is possible to measure the time betwen send the order from multichart and the time that has filled it.. i have seen the code of the multichart with the name from strategy to broker mp synchronization and has interesting lines to add but appear that only has seconds to take it.. is possible to take microseconds??

I have discover there a formula that call the code with the name gettickcount.. somebody know what is that formula... or somebody of multichart can explain the use of that please..

thanks in advanced

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: how to measure the speed of multichart.. latency topic

Postby Dave Masalov » 24 Aug 2010

Dear tradersheldon,

Could you please precise what formula are you talking about?

tradersheldon
Posts: 22
Joined: 29 Jul 2010
Has thanked: 1 time
Been thanked: 4 times

Re: how to measure the speed of multichart.. latency topic

Postby tradersheldon » 24 Aug 2010

I would like to know the time that MC generate the trade and the time that the order filled then substrat both and calculate the complete time to tha latency only that.

Another important topic for all users of MC is to know how can improve the calculations of the trades in the systems, I think that if we compile all systems in one dll will be faster for example or can TSSupport give us some tips..

the formula that i mean is this DEFINEDLLFUNC: "kernel32.dll", int, "GetTickCount";

the second part gettickcount that not idea what means or what it does.. can you explain us how runs.
thanks

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: how to measure the speed of multichart.. latency topic

Postby Dave Masalov » 24 Aug 2010

Dear tradersheldon,

The GetTickCount function retrieves the number of milliseconds that have elapsed since the system was started. It is limited to the resolution of the system timer.

Compiling all systems in one will not eliminate the latency. Please precise if you have a very long strategy? A lot of signals, executed codes? Can you feel the latency? Are they visible to the naked eye?

tradersheldon
Posts: 22
Joined: 29 Jul 2010
Has thanked: 1 time
Been thanked: 4 times

Re: how to measure the speed of multichart.. latency topic

Postby tradersheldon » 24 Aug 2010

ok then that funtion is not for ticks like appears in the original name but how can I plot in the outpot from power editor the total milliseconds that MC takes to send the order and filled it the broker.. can you write the code to measure it please is really helpful for all traders and we need to measure it please...

Is impossible to feel the latency but all the strategies need low latency and we need to optimize the computer and the conection to reduce it that is the question that we need to know some tips to reduce it and optimized the computer.

please if you or somebody can write the code for thsi functions to see the total milliseconds please write here because all of us need it..

thanks

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: how to measure the speed of multichart.. latency topic

Postby Dave Masalov » 24 Aug 2010

Dear tradersheldon,

The strategies and indicators are calculated on a tick-by-tick basis in MultiCharts. So, every new tick runs the calculation on the current bar. It is possible to write a script, which will give you the time form one calculation to another, but not more. These values won't reflect the real time from sending the order until its execution. However, you can see the time of order generation as well as the time when its final status was received in the "Order and Position Tracker" window.

tradersheldon
Posts: 22
Joined: 29 Jul 2010
Has thanked: 1 time
Been thanked: 4 times

Re: how to measure the speed of multichart.. latency topic

Postby tradersheldon » 24 Aug 2010

Can you post that code here please for all users of MC i am interesting to see and measure that we need to see in this time to measure our latency specially the users of trading systems and it would be good if multichart begin to measure all in microseconds but if you can posted here the code to measure the time that take the order to arrived and filled in the broker please that can be a good advanced
thanks

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: how to measure the speed of multichart.. latency topic

Postby Dave Masalov » 24 Aug 2010

Dear tradersheldon,

As I have already written, it is possible to write a script, which will give you the time form one calculation to another, but not more. But it is useless - these values won't reflect the real time from sending the order until its execution. Please use the "Order and Position Tracker" window to compare the time of order generation with the time when its final status was received.

tradersheldon
Posts: 22
Joined: 29 Jul 2010
Has thanked: 1 time
Been thanked: 4 times

Re: how to measure the speed of multichart.. latency topic

Postby tradersheldon » 25 Aug 2010

ok but can multichart add a column in tracking center to measure the latency of each trade i think is better for all traders to know what latency we have with aour platforms, is i think really easy is to measure the time when the order is generate for the systems and the time that take to place to the market... for the people of tssupport is possible that in the new platforms...
thanks in advanced...

tradersheldon
Posts: 22
Joined: 29 Jul 2010
Has thanked: 1 time
Been thanked: 4 times

Re: how to measure the speed of multichart.. latency topic

Postby tradersheldon » 25 Aug 2010

But not in micro or miliseconds that the traders need... i only see it in seconds... TJ i have tried to program it with reserve funtions of the dll and in the oputput appear 5900546.00 in the post of multichart said to me that the funtion DEFINEDLLFUNC: "kernel32.dll", int, "GetTickCount"; give us the mili seconds.... i have write a code to print the result and is this adn i think is really big the number that measuere the time that the strategy has a signal and the time to filled the trade and appear this 5900546.00 really not understand how big number is this to be miliseconds.... can somebody of MC what is measure exactly this funtions and how can we read it please

tradersheldon
Posts: 22
Joined: 29 Jul 2010
Has thanked: 1 time
Been thanked: 4 times

Re: how to measure the speed of multichart.. latency topic

Postby tradersheldon » 26 Aug 2010

Ok i have program this code i think runs ok but if somebody can try it and review it ,.. better for all, i think measuere the latency from the multchart since the orders has been generate tuill has filled in the broker... but only measure the first trade that the strategy filled is only a trial but appear in the beginning the number cero then differents ones... we need to calculate the differences till is all time the same... i think as sense put if somebody can use it will be perfect the measure is in millisecond here is the code now in ib has a 850 milliseconds to filled it if the code is ok is really big when in the industry is running with less than one milliseconds ok i need some help of some traders to see if all together we can finished this code and can help us to measure our latency.... this is only to market orders becasue we can not measure the time when the order is place to the broker... ther is no way in multichart to see and measure that another thing that has to improve in these days that the latency is really important when you are running with strategies, if not read the case of janes street prop trading firma that with its models in excel was losing money and then change that models to one dedicated server with a execute software and makes money i think we need to speak more about that here... ok here is the code
[intrabarordergeneration = true];

Code: Select all

DEFINEDLLFUNC: "kernel32.dll", int, "GetTickCount";


variables:
var1(false),
inner_mp(0),
broker_mp(0),

intrabarpersist mp_diff(false),
intrabarpersist mp_diff_time_start(0),

intrabarpersist mp_corrected(false),
intrabarpersist mp_corrected_time_start(0),

intrabarpersist place_correction_marketorder(false),

intrabarpersist _get_tick_count(0);


if getappinfo(airealtimecalc) = 1 and getappinfo(aistrategyauto) = 1 then begin

inner_mp = currentcontracts*marketposition;
broker_mp = MarketPosition_at_Broker_for_The_Strategy;

if inner_mp <> 0 and broker_mp = 0 then begin

_get_tick_count = GetTickCount;
var1 = true;
end;
end;

if broker_mp = 0 and var1 = false then
mp_diff_time_start= _get_tick_count;


print (_get_tick_count - mp_diff_time_start);

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: how to measure the speed of multichart.. latency topic

Postby Dave Masalov » 26 Aug 2010

Dear tradersheldon,

This code won't help you to calculate the latency.
Because the latency calculated by this code will include (between generation and execution of the order) the time between ticks.
The scripts are calculated on a tick-by-tick basis! Ticks can come every second, or faster, or slower.
The time between two ticks is inconsistent.

You can calculate the latency from the Order and Position Tracker window. It only give you seconds at the moment, but you can send a feature request via MultiCharts --> Help --> Feedback -->Feature Request.

tradersheldon
Posts: 22
Joined: 29 Jul 2010
Has thanked: 1 time
Been thanked: 4 times

Re: how to measure the speed of multichart.. latency topic

Postby tradersheldon » 27 Aug 2010

thanks dave i know that this is not a corect latency but like you say i have not choice if MC can not do it, and i adviced to put it becuase is really important for all trader know it and just know is the only thing that i can use to see the currect speed take it and compare in the feature with the new things that i am installing to be sure that is not damage my server or compter and go slower...

please i will send that you say to MC but ask to your boss about it too please is really important to measere the speed in all our trades in mili seconds or micro seconds...

thanks

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: how to measure the speed of multichart.. latency topic

Postby Dave Masalov » 27 Aug 2010

Dear tradersheldon,

I have discussed your question with the developers. Indeed, it is a good idea to add miliseconds in Order and Position Tracker. We will consider the implementation of this feature in the future.

For your information, our engineers have measured the time between order generation and sending it to the broker. It can be up to 0.6 seconds.

tradersheldon
Posts: 22
Joined: 29 Jul 2010
Has thanked: 1 time
Been thanked: 4 times

Re: how to measure the speed of multichart.. latency topic

Postby tradersheldon » 30 Aug 2010

ok like you can see all of us need that measures, and you need to show us the time that take multicharts to send the order to the broker and the latency of the net that two thinhgs we need .. the latency of the net we can solve with colocation services that ther is with rithmic of zen fire but i am not worried about the time that take multichart to generate and order 600 miliseconds... THAT IS TOO MUCH.. all algotrading firms are in 1 miliseconds and if we use multichart always will be the last to filled our orders and that is just that has to solve tssupport indead if you sell multichart like a solution for automated the systems like we are or we planning to use it.

thus topic PLEASE is so important that i would like that all users that are reading me now , join with me to solve this problem or give us some tips to improve the performace of multichart to sen the order faster, if not is not that useful tool like we think.

Please i ask to tssupport how we can improve the speed of multichart we need pecasue is really high the performace and how we can measure it now like the engeniers have done just now dave please, is really important for our strategis i invited to everyone that they find out about the story of janes street a prop trading firm that in the past used excel to trade and lost money and then move all to a different own software and the same systems made a lot of money... the technology in trading makes the difference and like a custumers we need a solution of this please.

thanks in advantage...

tradersheldon
Posts: 22
Joined: 29 Jul 2010
Has thanked: 1 time
Been thanked: 4 times

Re: how to measure the speed of multichart.. latency topic

Postby tradersheldon » 30 Aug 2010

for example we need to see an information like this that is showing other aplications for real trading;

Tick Engine¶
BarList runtime: 0.28sec, versus: 0.6sec expected.
BarList 196,486 ticks/sec
Execution runtime: 0.49sec, versus: 0.8sec expected.
Execution 113,962 ticks/sec. 2,048 fills/sec
Raw runtime: 0.18sec, versus: 0.6sec expected.
Raw speed: 306,350 ticks/secTick Database¶
write speed (ticks/sec): 101,833
read speed (ticks/sec): 862,069Live Link¶
InterOpSpeed elap: 0.2 rate: 662 orders/sec
protocol performance (tick/sec): 28,446

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: how to measure the speed of multichart.. latency topic

Postby Dave Masalov » 31 Aug 2010

Dear tradersheldon,

Please tell us what "other aplications for real trading" are you talking about? What you request is very close to high frequency trading. Please name some examples of applications in the price range of MultiCharts that have such options.

We do not plan to implement these features at the moment. If you are interested in purchasing the Pro version with such features,please contact Stan Bokov at 1-614-569-0345 (Direct) or 1-888-340-6572 ext.1002.

tradersheldon
Posts: 22
Joined: 29 Jul 2010
Has thanked: 1 time
Been thanked: 4 times

Re: how to measure the speed of multichart.. latency topic

Postby tradersheldon » 01 Sep 2010

this is http://code.google.com/p/tradelink/ and is free and faster than multichart tht is my question... i will contact with you to speak about this topic... but is not a question of high frecuency is a question of the speed of the software for trading strategies and i would like to know where i can read the differences becuase is so expensive specially when there are free platforms than now is using all traders everywhere, then we need plus in multichart to continue using it... logically.

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: how to measure the speed of multichart.. latency topic

Postby Dave Masalov » 01 Sep 2010

Dear tradersheldon,

The example that you gave is not an application, but a do-it-yourself kind of stuff. If you think that the comparison of MultiCharts and this program is correct, then you can use it. Showing the quantity of ticks in second is the only feature that it has. It is easy to work at super fast speed when you do not have any functionality. MultiCharts is a user-friendly complex application which consists of multiple subsystems and each of these has its own latency. If you want hyper speed and you are a programmer, the best way for you is to wrtite your own application or to use the one as you mentionned. MultiCharts is designed for traders, who are not necessarily programmers. If you are looking for milisecond timeframes, you may want to have a look at Complex Event Processing systems - http://www.tibco.com/products/business- ... efault.jsp.


Return to “MultiCharts”