[R-SIG-Finance] R and Metatrader

Daniel Cegiełka daniel.cegielka at gmail.com
Tue Jun 22 11:29:16 CEST 2010


W dniu 22 czerwca 2010 10:39 użytkownik Gentil Homme
<jantiom at gmail.com> napisał:
> Hello Daniel,
>
> Thanks a lot.
> Very interesting !
> I'll try to compile it on V C++ 2008 Express E.
>
> Do you have experience with it ?

No, I work with linux, so MT4 isn't what I prefer.

It should be easy to work witch R and MT4 via socket. You can use
socketConnection(), readBin(), writeBin() functions. Time-series
objects from messages you can build with XTS package and endpoints()
function.

Some high quality code for broker connection you can find in IBrokers package.

http://r-forge.r-project.org/projects/xts/

http://code.google.com/p/ibrokers/

and for strategy you must to test blotter package:

https://r-forge.r-project.org/projects/blotter/

regards,
daniel


>
> Rgds,
>
> Pierre
>
>
> 2010/6/22 Daniel Cegiełka <daniel.cegielka at gmail.com>
>>
>> http://mt4tools.svn.sourceforge.net/viewvc/mt4tools/
>>
>> regards,
>> daniel
>>
>>
>> 2010/6/21 jondollar <jantiom at gmail.com>:
>> >
>> > I would be interested also in interfacing R and Metratrader.
>> >
>> > I've already made similar interface with Matlab.
>> >
>> > I see two possibilities :
>> >
>> > - through a database : interface as MySQL DLL for MT4
>> > - through a socket on the local address 127.0.0.0
>> >
>> > I think that the second choice will be faster but there we need to
>> > define
>> > message structure for data exchange, while the database tables are easy
>> > to
>> > build, using timestamp as primary key
>> >
>> > Using the database also provides easy management of historical data.
>> >
>> > Are you looking for work at tick level or timeframe ?
>> >
>> > I would not use the DDE server to get quotes from MT4 as it allows only
>> > one
>> > way, so that R could not send data to MT4.
>> >
>> > I'm new to R, so I would need to dig in, but I'm very interested to
>> > access
>> > the nice stats libraries,
>> >
>> > and contribute to such nice project ..
>> >
>> > Rgds.
>> > --
>> > View this message in context:
>> > http://r.789695.n4.nabble.com/R-and-Metatrader-tp1693168p2262676.html
>> > Sent from the Rmetrics mailing list archive at Nabble.com.
>> >
>> > _______________________________________________
>> > R-SIG-Finance at stat.math.ethz.ch mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> > -- Subscriber-posting only. If you want to post, subscribe first.
>> > -- Also note that this is not the r-help list where general R questions
>> > should go.
>> >
>
>



More information about the R-SIG-Finance mailing list