couple MetaTrader3API questions

 
- what time does the time field in TickInfo struct represent ?
- is it possible to turn off pump so I can get historical data, then turn pump back on ?
- will MT4 servers be backward compatible w/ MT3 client ?

Thanks,
Chris
 
1. server time
2. no reasons for turning off (and You cannot turn off pumping). see our samples
3. no compatibility
 
I dont understand. If I turn on pump mode, then want to open a new chart. How can I get historical data if call to MtGetRates is not allowed while pumping is on ?

I've tried having two connections open at the same time, one for pump mode and one for MtGetRates, but this is problematic.

Thanks,
Chris
 
you can open up to 10 sockets
open socket, receive rates, close socket
what the problem?
 
What I am doing is opening one socket for pump and one socket for getRates and leaving them both open. One problem seems to be I cant open 2 connections back to back - I get 'too many frequent requests' error. Ok, so I wait a little before I open second connection. The problem that is still occuring is I often fail on MtAddSymbol with MtGetErrorDescription returning "ok". It usually fails right away and continues to fail, so I just restart my app, but that is not a long term solution.

Another question I have. Once I call intial GetRates and start recieving tick info. Is it recommended to save high/low info and just use tick info to calculate new candle at end of a period or to call getRates to get the 'official' candle ?

Thanks,
Chris
 
"to many frequent recuests" error does not depend from opened sockets count.
see our sample 2 how trading processed. with the additional socket.
do not forget that socket without pumping cannot be opened more than 2 minuts, i e you need to open socket, process some request and close socket

2. You need calculate yourself new candle not call GetRates
 
"socket without pumping cannot be opened more than 2 minuts"

Thanks, I wasnt aware of this.

I've looked at sample 2, well - all of the samples, and they all use MetaTraderAPI which just uses one socket. Unless I'm missing something. I've written a Managed C++ object that replaces that and uses 2 sockets.

I've reworked my code so that it does , basically :

login socket 1
put socket 1 in pump mode
login socket 2
for all securites I want data for
GetRates( socket 2)
Add Security(socket 1)
close socket 2

This rids me of the "Cant add security" error i was getting alot.
But now, I still get "too many frequent requests" error pretty often, but works about 70% of the time. I noticed in sample 3 that there were alot of ::Sleep(5000) peppered throughout the code, but the comments are in russian - which i cant read - so I'm not sure of why this is being done.

Do I need to wait some period of time before I open 2 socket ?

Thanks,
Chris
 
between logins 1 sec
Open Demo Account 30 sec
Change Password 60 sec
Refresh Securities 5 sec
Get Trades 5 sec
Get Trade History 5 sec
Get NewsBody 5 sec
Get Prices 5 sec
between trade operations 5 sec
 
another question - when I place an order using SendOrder and it returns RET_OK, am I guaranteed that the order will eventually be placed with the specified price? If so, why does the order take some time before it appears on the trades list? Thanks.
 
please ignore my post above. I have the same question under the thread "Placing orders with MT3 api"

"Placing orders with MT3 api"
Reason: