| / | Forum |
|
TradeZone
2008.07.23 00:55
Hi, Folks! We developped a dll capable of handling several instances of client terminal MT4 in background, allowing login in several accounts and multiples brokers simultaneously(MAX. 32). Mainly goal, we kept in mind, when developing this API was permit handling orders in MetaTrader brokers from anothers softwares, for example MetaStock. This API has more than 55 functions provindg informations about:
This installation is zipped and available to download at http://www.itevolution.com.br/tz/files/TZMT4API.zip You can use it on any platform you want. There is a text inside installation(<TZAPIFolder>\Developer) describing all functions and its C's header, and also a Delphi's header too. This API can be also used in MT4 like code sample below. #import "tzmt4api.dll" int LogIn_MT4(int login, string password, string server, string proxyserver, string proxytype, string proxylogin, string proxypassword); int LogOut_MT4(int handle); int SymbolsTotal_MT4(int handle); string SymbolGet_MT4(int handle, int index); double AccountBalance_MT4(int handle); double AccountCredit_MT4(int handle); string AccountCompany_MT4(int handle); string AccountCurrency_MT4(int handle); double AccountEquity_MT4(int handle); double AccountFreeMargin_MT4(int handle); double AccountFreeMarginMode_MT4(int handle); int AccountLeverage_MT4(int handle); double AccountMargin_MT4(int handle); string AccountName_MT4(int handle); int AccountNumber_MT4(int handle); double AccountProfit_MT4(int handle); string AccountServer_MT4(int handle); int AccountStopoutLevel_MT4(int handle); int AccountStopoutMode_MT4(int handle); double AccountFreeMarginCheck_MT4(int handle, string symbol, int cmd, double volume); int OrdersTotal_MT4(int handle); int OrdersHistoryTotal_MT4(int handle); int OrderGet_MT4(int handle, int index, int select, int pool); double OrderClosePrice_MT4(int handle, int ticket); int OrderCloseTime_MT4(int handle, int ticket); string OrderComment_MT4(int handle, int ticket); double OrderCommission_MT4(int handle, int ticket); int OrderDelete_MT4(int handle, int ticket); int OrderExpiration_MT4(int handle, int ticket); double OrderLots_MT4(int handle, int ticket); int OrderMagicNumber_MT4(int handle, int ticket); double OrderOpenPrice_MT4(int handle, int ticket); int OrderOpenTime_MT4(int handle, int ticket); double OrderProfit_MT4(int handle, int ticket); double OrderStopLoss_MT4(int handle, int ticket); double OrderSwap_MT4(int handle, int ticket); string OrderSymbol_MT4(int handle, int ticket); double OrderTakeProfit_MT4(int handle, int ticket); int OrderType_MT4(int handle, int ticket); bool OrderClose_MT4(int handle, int ticket, double lots, double price, int slippage); bool OrderCloseBy_MT4(int handle, int ticket, int opposite); bool OrderModify_MT4(int handle, int ticket, double price, double stoploss, double takeprofit, int expiration); int OrderSend_MT4(int handle, string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment, int magic, int expiration); double MarketInfo_MT4(int handle, string symbol, int type); int GetTickCount_MT4(int handle); int GetLastError_MT4(int handle); string ErrorDescription_MT4(int errorcode); bool IsConnected_MT4(int handle); bool IsDemo_MT4(int handle); bool IsTradeContextBusy_MT4(int handle); int TimeCurrent_MT4(int handle); #import Best regards and profitable trade! |
|
Interview with Alexander Egorov (Aver) While writing expert advisors, I knew from practice that trailing stop rarely pays off, one just loses one's profits. Though, it can be related to my experts, not to the real trading. I tried to use trailing stops instead of strictly set profit. It did not pay off. |
|
Mehmet
2008.07.23 16:44
delphi not installed. function AccountCurrency_MT4(handle: integer) : pchar; external 'tzmt4api.dll'; |
|
TradeZone
2008.07.23 17:29
Mehmet wrote >>
delphi not installed. function AccountCurrency_MT4(handle: integer) : pchar; external 'tzmt4api.dll'; Ops! please download again. |
|
Mehmet
2008.07.23 20:12
thank You. please send me a delphi project. |
|
Mehmet
2008.07.23 20:27
i have a Interbank fx demo . how do using in delphi. please a short sample. |
|
forex.sb
2008.07.24 01:23
TradeZone wrote >>
Hi, Folks! We developped a dll capable of handling several instances of client terminal MT4 in background, allowing login in several accounts and multiples brokers simultaneously(MAX. 32). Mainly goal, we kept in mind, when developing this API was permit handling orders in MetaTrader brokers from anothers softwares, for example MetaStock. This API has more than 55 functions provindg informations about:
This installation is zipped and available to download at http://www.itevolution.com.br/tz/files/TZMT4API.zip You can use it on any platform you want. There is a text inside installation(<TZAPIFolder>\Developer) describing all functions and its C's header, and also a Delphi's header too. This API can be also used in MT4 like code sample below. Best regards and profitable trade! I can't get any values after login (handle/result=1) accountbalance returns 8 (real balance=1000) accountcompany returns 16273773 (some number like this) I dont undestand how to use the Dispose_MT4 function. Anyone got this to work? Thanks SB |
|
TradeZone
2008.07.24 18:32
We're building a delphi's short sample soon. |
|
TradeZone
2008.07.24 18:34
forex.sb wrote >>
I can't get any values after login (handle/result=1) accountbalance returns 8 (real balance=1000) accountcompany returns 16273773 (some number like this) I dont undestand how to use the Dispose_MT4 function. Anyone got this to work? Thanks SB We'll provide a short sample in delphi and in mql4 too. Until this try to use GetLastError_MT4() and ErrorDescription_MT4() after get logged, it can give you some clues. |
|
TradeZone
2008.07.24 22:22
We just finished a short delphi sample. Here it's: http://www.itevolution.com.br/tz/files/Short_Sample_Delphi.zip Executable is inside package above. For a quick test:
Best regards and profitable trade! |
|
haitham_elnemr
2008.07.26 17:47
Thank you,
But what about the .SRV files, how could i change its location to my programe location ?? |
|
TradeZone
2008.07.28 17:05
haitham_elnemr wrote >>
Thank you,
But what about the .SRV files, how could i change its location to my programe location ?? Hi, haitham! I think you wanna build a single installation package, Am I right? If yes, you can copy on you own alls files, keeping folder's structure, which is inside <Program Files\TradeZone\TZMT4API> and tzmt4api.dll under <system32>. Another thing you have to do: in register, point Folder under [HKEY_CURRENT_USER\Software\TradeZone\TZMT4API] to your program location Sample: [HKEY_CURRENT_USER\Software\TradeZone\TZMT4API]
|