New API MetaTrader 4 AVAILABLE - page 16

 
alimiri:

would u pls send me ur price list including stand alone and enterprise package

email: alimiri@yahoo.com

Hi alimiri!


Check your email!


Regards,

Tradezone's team.

 

hi,TradeZone,

main.cpp(123) : error C2065: 'PERIOD_M1' : undeclared identifier

how to use the period in HistoryGet_MT4()?

PERIOD_M1,PERIOD_M5,...PERIOD_W1,PERIOD_month1,not defined?

 
wxf6981:

hi,TradeZone,

main.cpp(123) : error C2065: 'PERIOD_M1' : undeclared identifier

how to use the period in HistoryGet_MT4()?

PERIOD_M1,PERIOD_M5,...PERIOD_W1,PERIOD_month1,not defined?

Hi wxf6981!


We'll check this.

To work around use 1, 5...


Regards,

Tradezone's team.

 
TradeZone wrote >>

Hi wxf6981!

We'll check this.

To work around use 1, 5...

Regards,

Tradezone's team.

thank you,

i got it,

------------------------------------------------

and another problem:

//

tickGetSymbol=(TickGetSymbol_MT4)GetProcAddress(DLLInstance,"TickGetSymbo_MT4");
.
.
.
tickGetSymbol(handle,"GBPJPY"); //handle==1

/* an error message pop out:
"Unhandled exception at 0x00000000 in Short C++.exe" 0xC0000005:
Access violation reading location 0x00000000"
*/

i don't know what's wrong with it.

would you help me out?

 

Hi TradeZone,


The latest version 4.0.0.7 causes a "Software Exception (0x0eedfade)" error upon exiting the application. (see below)





Then displays this...



Previous versions of your TZMT4API.dll didn't do this. You'll be able to replicate the bug by running your own C# sample application. I've been able to reproduce it with other languages as well.


QM

 
TradeZone:

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:

  • Symbols and History;
  • Accounts, including support to AccountFreeMarginCheck();
  • Orders, reading historical/opened orders, sending any kind of them(buy/sell, limit/stop, ...), and changing take profit, stop loss, etc.;
  • Market Info, used mainly to retrieve Bid/Ask;
  • Errors occurred in each account;
  • and some checkup functions.

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!

You DLL does not work without terminal MT4 which you have put in your package, and have hidden it. C:\Program Files\TradeZone\TZMT4API\Source\terminal_. exe
 


Hello Guys, 


Where can I find the documentation about this API and what are the costs?

I would like to connect to the API and retrieve real-time prices, and be able to place a orders straight from my application.



Regards, 

Jaguar

 

I have a problem with function HistoryGet_MT4. 

HistoryGet_MT4 returns NULL when i'm setting period _from and _to. I have tested on different periods and values of _from and _to

But it works when i'm using next call:

HistoryGet_MT4(handle,"USDJPY",0, 0, 5, 0); 

My 

Configuration: last version of API -  4.0.0.7

server: TeleTrade-Demo

WinXP sp2. No firewall 

Regards

 
dsunegin:

I have a problem with function HistoryGet_MT4. 

HistoryGet_MT4 returns NULL when i'm setting period _from and _to. I have tested on different periods and values of _from and _to

But it works when i'm using next call:

HistoryGet_MT4(handle,"USDJPY",0, 0, 5, 0); 

My 

Configuration: last version of API -  4.0.0.7

server: TeleTrade-Demo

WinXP sp2. No firewall 

Regards


Hi dsunegin,


_from and _to are integer values consistent with MT4's date format.


This means how many seconds passed from 1970.01.01 until respective date.

In your sample, you are asking history from 1970.01.01.


If you're using delphi, this should do the trick:

function DateTimeToMetaTrader(Data: TDateTime) : integer;

begin

  result := trunc(SecondSpan(Data, EncodeDateTime(1970, 1, 1, 0, 0, 0, 0)));

end;


C#:

int DateTimeToMetaTrader(DateTime Data)

{return Convert.ToInt32(((new TimeSpan(Data.Ticks)).TotalSeconds) - ((new TimeSpan(new DateTime(1970, 1, 1).Ticks)).TotalSeconds));}


Regards,

Tradezone.


 

I think, my _from and _to are consistent with MT4's date format.

------------------------

C++ code:


int tm=MarketInfo_TM4(handle,"USDJPY",5);

char *hst=HistoryGet_TM4(handle,"USDJPY",tm-50,tm, 1, 0);


,or next code:

 char *hst=HistoryGet_TM4(handle,"USDJPY",tm-50,tm, 1, 40);


--------------------------

,and another question : How can i get an Order Close Time?

In API I've fond only function OrderOpenTime_MT4.


Regards

Reason: