TradeStation 8 Solutions   
TradeStation Solutions   
MetaStock Solutions   
Bloomberg Solutions   
Historical data tools   
Trading tools   
Genetic Optimizer   
Real-Time Portfolio Analyzer   
TradeStation to Excel Link   
Wavelet Transform   
TradeStation to MatLab Link   
Buy now!   
Trendiness   
Custom software development   
Customer support   
Our partners   
About us   
Publications   
Discussion Forum   

    RT Soft Trading tools TradeStation to MatLab Link 





TS MATLAB Link Dll for TradeStation

TS Matlab Link TS MATLAB Link Dll allows widening standards of trading industry - trading platform TradeStation to standards of engineering and scientific calculations of MATLAB.

As a result of combining these two powerful programs we get unbeatable advantage in complex mathematical calculations, simplicity, speed and accuracy of analysis, visualization on a level of scientific graphics and programming on scientific language that needs only mathematical type of task.

Buy it now!


It is easy to use TS MATLAB Link Dll.
A user can use commands and functions of MATLAB right in a EasyLanguage code.

There is no need to use "black box" programs if you have formulas
that lay down in calculations.

TradeStation together with MATLAB now can effectively solve tasks in the following fields:

-mathematics and calculations;
-algorithm development;
-modeling;
-scientific and engineering graphics;
-development of any complexity trading systems based on newest scientific methods.


Used with MATLAB TradeStation becomes an interactive system, which general object - array doesn’t require size setting. This helps to perform calculations of vector - matrix based tasks, cutting time that would be necessary to spend for programming in C or FORTRAN.

TS MATLAB Link Dll provides operating environment, programming language and trading platform in the same time. One of the biggest advantages of this system is that you can write specialized functions and programs by yourself. These functions are formed as specialized files (M-files). It's possible to create
a
set of programs to solve certain tasks or problem in trading.

As a matter of fact TS MATLAB Link Dll is more than just a set of functions that are built into MATLAB. Using MATLAB in TradeStation you can exploit any science discoveries and results from all around the world that can be practically used in trading - theory of management, digital processing of signals, identification and etc.

List of functions executed by TS MATLAB Link Dll

TS MATLAB Link Dll

Initialize and open MATLAB Command Window from TradeStation.

Yes

Send commands from TradeStation to MATLAB

Yes

Send data from TradeStation to MATLAB

Yes

Receive and process data in TradeStation from MATLAB

Yes

Simultaneous data sending to MATLAB and reading data from MATLAB

Yes

Number of available MATLAB commands for transferring

Not Limited

Number of received data from MATLAB

Not Limited

Type of receiving data Float (Numeric)

Works on Line

Yes




Description of calling functions TS MATLAB Link Dll

It's necessary to have
a specialized library tsmatlablink.dll to work with the TS MATLAB Link Dll program. tsmatlablink.dll should be placed in the Windows (System32) system directory. For example, if you have system drive «Ñ:\» and operating system Windows XP, then the path should  be: «C:\WINDOWS\system32».

To work with
the
TS MATLAB Link Dll in TradeStation environment the EasyLanguage function TS.MATLAB.LINK. should be used. This function uses tsmatlablink.dll to send commands from TradeStation to MATLAB and receive data back as Float (numeric) values. Code of EasyLanguage function:

if currentbar = 1 then begin
Value1 = TS.MATLAB.LINK("A = ["+ NumToStr(C,4)+" ]");
{create array A to MATLAB and add value}


This function sends
a text line that should contain data and any command for MATLAB or just a command only. The function returns the data that MATLAB has calculated in numeric format Float (numeric).

Example of usage.

First
of all,
you should call TS.MATLAB.LINK on the first bar and send any command to MATLAB. This may be,  for example, the command which creates an «empty» array. Then MATLAB Command Window will open. Example of calling TS.MATLAB.LINK at the first bar in the EasyLanguage code:

if currentbar = 1 then begin
Value1 = TS.MATLAB.LINK("A = ["+ NumToStr(C,4)+" ]");
{create array A to MATLAB and add
a
value}


The f
unction «TS.MATLAB.LINK» opens the MATLAB Command Window at the first bar and creates  «A» array. In other words, calling this function will pass the string «TS.MATLAB.LINK("A = ["+ NumToStr(C,4)+" ]");» directly into the MATLAB Command Window. It is identical to the following command (let 28.66 is the Close price on the first bar):
 A=[28.66] 

Let
you want to calculat
e a mean value in TradeStation using the MATLAB built in formula. For calculation of mean value in MATLAB it's necessary to:

1.
create a MATLAB array ;
2. send
a value on every bar to array created in 1, in a way that the values are stored until set size;
3. displace the array to the right for set length for new incoming data;
4. apply
a
function to the array;
5. send obtained values
back
from MATLAB to TradStation.

Example in EasyLanguage

Input: Length(21);
Vars: MA(0);
                     {create array A and add value}
if currentbar = 1 then begin
    Value1 = TS.MATLAB.LINK("A = ["+ NumToStr(C,4)+" ]");
end else begin
                      {add next value to array}
        Value1=TS.MATLAB.LINK("A=[A "+ NumToStr(C,4) +" ]");
        if currentbar > Length then
                      {if array > our periods (length) then delete first element from array}
          
Value1=TS.MATLAB.LINK("A(1)=[]");
                       {calculating mean}
           MA=TS.MATLAB.LINK("mean(A)");
end;
Plot1(MA, "Mean");


Important notice!
Values of TradeStation need to be converted to string, for example using EasyLanguage function «NumToStr»
, right before exporting to MATLAB.


Other commands of MATLAB are executed in the same way.




All names and trademarks used on these web pages are registered by their respective companies
© 1998-2007 RT Soft, Ltd. All rights reserved.