Small updates for DealClient:
- If multiple orders are open and request for closure comes, then client will first close orders with profit;
- Better error handling added to fix issues when orders wasn't opened due to bad connection. New function was added to check if retransmit is necessary:
//+------------------------------------------------------------------+ //| Check if another try will fix the problem | //+------------------------------------------------------------------+ bool bCanRetryFixTheProblem(int error) { switch(error) { case ERR_NO_ERROR: case ERR_NO_RESULT: case ERR_COMMON_ERROR: case ERR_SERVER_BUSY: case ERR_NO_CONNECTION: case ERR_TRADE_TIMEOUT: case ERR_INVALID_PRICE: case ERR_PRICE_CHANGED: case ERR_OFF_QUOTES: case ERR_BROKER_BUSY: case ERR_REQUOTE: case ERR_TOO_MANY_REQUESTS: case ERR_TRADE_CONTEXT_BUSY: return(true); default: return(false); } }
/tsaktuo
Great work!! I get error socketserver.dll is not 64 bit version. Are you able to provide?
Great work!! I get error socketserver.dll is not 64 bit version. Are you able to provide?
Hi,
I'm running the server EA and the client script and they are communicating with each other except I get the following type of error in the MT4 log and need some help getting it fixed.
MT5 (Build 597) log:
2012.03.08 01:17:55 TsaktuoDealServer (EURUSD,H1) DEAL:<955492;EURUSD;SELL;IN;0.01;1.31080>
MT4 (Build 409) log:
2012.03.08 01:17:55 TsaktuoDealClient EURUSD,H1: Invalid order received:"4444EEEESSSSEEEEIIII....11110000"
Any thoughts?
Have updated MT4 to Build 416 with no change.
Also, this is what I get when compiling the script in MT4
Compiling 'TsaktuoDealClient.mq4'...
Function "struct2int" is not referenced and will be removed from exp-file
Function "str2struct" is not referenced and will be removed from exp-file
Function "htonl" is not referenced and will be removed from exp-file
Function "ntohl" is not referenced and will be removed from exp-file
Function "ntohs" is not referenced and will be removed from exp-file
0 error(s), 5 warning(s)
Anyone know what's going on?
I use this for 1 week , there are 2 error, so I give up it.
I use this for 1 week , there are 2 error, so I give up it.
Hello!
MT4 does not open the file, I can not be attached chart.
Not is TsaktuoDealClient.ex4, only TsaktuoDealClient.mql4 file.
Why is that?
2014.05.22 12:36:32.413 Cannot open file 'C:\Users\gyurc\AppData\Roaming\MetaQuotes\Terminal\F8B0CF1E1FEED3B00D2D7E193237B799\MQL4\Experts\Scripts\TsaktuoDealClient.ex4' [2]

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Using MetaTrader 5 as a Signal Provider for MetaTrader 4 is published:
Author: Karlis Balcers