Discussion of article "Using MetaTrader 5 as a Signal Provider for MetaTrader 4"

 

New article Using MetaTrader 5 as a Signal Provider for MetaTrader 4 is published:

Analyse and examples of techniques how trading analysis can be performed on MetaTrader 5 platform, but executed by MetaTrader 4. Article will show you how to create simple signal provider in your MetaTrader 5, and connect to it with multiple clients, even running MetaTrader 4. Also you will find out how you can follow participants of Automated Trading Championship in your real MetaTrader 4 account.

Author: Karlis Balcers

 

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

Files:
 

Great work!!  I get error socketserver.dll is not 64 bit version.  Are you able to provide?

 
939211:

Great work!!  I get error socketserver.dll is not 64 bit version.  Are you able to provide?

This should be the one.
Files:
 

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? 

 
can someone fix the script to run micro suffixes? for example the mt5 is EURUSD and the mt4 is EURUSDm.   thanks 
 

I use this for 1 week , there are 2 error, so I give up it.


 
codeidea:

I use this for 1 week , there are 2 error, so I give up it.


Do you have reported that to Service Desk ?
 

No. I think this error cannot be changed

error:129, mean price changed

 

 

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]