(This post is for the MatLab experts only) Can anybody help me with connecting MetaTrader3 API to MatLab? Some basic steps I can solve: loadlibrary('mtapi.dll','mtapi.h'); Now I can call some library functions: example: verzeion=calllib('mtapi', 'MtGetVersion');% socket1=calllib('mtapi', 'MtCreate'); return_code=calllib('mtapi', 'MtConnect',socket1,'217.74.44.14',1950); %alpari demo Now I can login in proviously (in metatrader) created account: return_code=calllib('mtapi', 'MtLogin',socket1,656816,'my_password') I can also make pounters to receive actual prices: bid_ptr=libpointer('doublePtr',0); ask_ptr=libpointer('doublePtr',0); and then: return_code=calllib('mtapi','MtGetPrices',socket1,symbol_ptr,100,bid_ptr,ask_ptr) However, I do not know how to deal with remaining functions returning pointers to structures: For example, the functions:MtGetRates, MtGetTradeHistory,MtDeleteOrder, MtSetPumpingMode, MtGetUpdatedTickInfo , etc I don't know how to deal with. Could anybody help me with this functions? Regards F.
You may want to check the following link out. http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f42650.html PM me if you are interested in trading with Interactive Brokers and MATLAB. I have a working AUTOMATED trading system connecting matlab and IB. (NOT FROM GLORIOSIA.com)