mt4api looks nice, but a little bit expensive :-(

I've been looking as well at StatConn/Dcom.
It is very good package and free, for interfacing Excel and R, and could be
used as well to interface MT4 with R or Excel, or any COM/DCOM server.
Of course, one needs to write the DLL for MT4, and master the nice Microsoft
COM technology.
As the MT4 DLL are native C/C++, the Statconn wrapper should be in C/C++ as
well.
This is a little bit hard to do because Statconn is not so well documented
for C/C++, so I keep this when I have more time.

Today, I'm interfacing MT4 with Matlab or R, through MySQL database.

I defined one table per security and time frame, for instance EURUSD5, with
DateTime as primary key + OHLCV.
Then I add 8 more empty columns for indicators, ie. Buf0 to Buf7.

These indicators can be calculated in Matlab, R, ..
In MT4, I implemented a custom indicator that reads the Buf0, ... Buf7 from
MySQL and display on the MT4 chart.
Finally, strategies based on this indicator can be tested directly in MT4.
Some trade results can then be stored back by MT4 in MySQL for further
analysis in Matlab or R.

In this way, it's possible to do the long and complex computation outside
MT4, like regression, stat modelling, etc ...
and avoiding to code everything twice for final MT4 code.

Hope that helps ...

PL


2010/7/25 Johnson, Cedrick W. <cedrick@cedrickjohnson.com>

> Just looking around, I thought of something that *may* be of some help to
> you:
>
> http://www.mt4api.net MetaTrader4 .NET api. You can use StatConn/RCom to
> interface .NET with R. (http://rcom.univie.ac.at/download.html)
>
> I have a C#/R sample implementation that I can dig up this weekend that
> *may* be able to get you started, but that is one way I can think of to
> interface MT4/R programmatically for some things. My current environment is
> Java, so I am using RServe to interface my java components with R for
> intraday stats/etc.
>
> HTH,
> C
>
>
> On 07/25/2010 03:26 AM, yoda55 wrote:
>
>>
>> Thanks everyone for the usefull insigths.
>> I actually decided to change the way I do things. Research&  Optimization
>> stay in R and only the final product get coded in MT4. It makes my life
>> easier
>>
>
> _______________________________________________
> R-SIG-Finance@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.
>

	[[alternative HTML version deleted]]

