MQL4 - automated forex trading   /  

Forum

MT4 and Visual Basic dll call

Back to topics list To post a new topic, please log in or register

avatar
4
divisie 2006.04.12 07:54 
Hi all,
Anyone using Visual basic dll for interfacing to MT4? How to call it?
Am getting frustated, or is it have to be C++ dll could only run in MT expert / script?
please advise...

Thanks in advance.

vb code (cFunction.cls) -> cFunction.dll

Public Function MergeChar(sFirstChar As String, sSecondChar As String) As String MergeChar = sFirstChar & sSecondChar End Function


mt4 code
#property copyright "Copyright © 2006, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #import "PrjFunctionDll.dll" string MergeChar(string sFirstChar,string sSecondChar); #import //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //---- string a; string b; string c; a="one"; b="two"; c=MergeChar(a,b); Alert(a,":",b,":",c,"working"); //---- return(0); }
Practical Application of Cluster Indicators in FOREX

Practical Application of Cluster Indicators in FOREX

Cluster indicators are sets of indicators that divide currency pairs into separate currencies. Indicators allow to trace the relative currency fluctuation, determine the potential of forming new currency trends, receive trade signals and follow medium-term and long-term positions.


avatar
233
codersguru 2006.04.27 19:36 
I tried visual basic to make a MT compatible DLL but it failed!
I think the only language the MT support is c++.


You can download my dll(s) from:

Forex-tsd .com
metatrader.info

avatar
Moderator
3646
Renat 2006.05.01 13:43 
All DLL functions must be cdecl
Back to topics list  

To add comments, please log in or register