Discussion of article "How to Copy Trading from MetaTrader 5 to MetaTrader 4" - page 7

 

Installed, everything worked!!! I open 3 orders in MT5, in MT4 also opened 3 orders, I close also all closed. I open the history of transactions and I see this picture, the copier in MT4 closed 3 orders with a loss of -2. Help me how to fix !!!!!!! here is a copy of the history:

441844342011.07.27 04:14buy0,10GBPUSD1,64310,00000,00002011.07.27 04:141,64270,000,000,00-4,00
441844362011.07.27 04:15buy0,10EURUSD1,44990,00000,00002011.07.27 04:151,44960,000,000,00-3,00
441844522011.07.27 04:15buy0,10GBPUSD1,64290,00000,00002011.07.27 04:151,64270,000,000,00-2,00
441844592011.07.27 04:15buy0,10EURUSD1,44980,00000,00002011.07.27 04:171,44960,000,000,00-2,00
441844832011.07.27 04:17buy0,10EURUSD1,44980,00000,00002011.07.27 04:171,44960,000,000,00-2,00
441844852011.07.27 04:17buy0,10GBPUSD1,64290,00000,00002011.07.27 04:181,64260,000,000,00-3,00
441844892011.07.27 04:18buy0,10EURUSD1,44990,00000,00002011.07.27 04:181,44960,000,000,00-3,00
441844912011.07.27 04:18buy0,10GBPUSD1,64290,00000,00002011.07.27 04:181,64260,000,000,00-3,00
441845002011.07.27 04:18buy0,10EURUSD1,44980,00000,00002011.07.27 04:181,44970,000,000,00-1,00
441845032011.07.27 04:18buy0,10EURUSD1,44990,00000,00002011.07.27 04:191,44960,000,000,00-3,00
441845072011.07.27 04:19buy0,10GBPUSD1,64290,00000,00002011.07.27 04:191,64240,000,000,00-5,00
441845102011.07.27 04:19buy0,10EURUSD1,44980,00000,00002011.07.27 04:191,44950,000,000,00-3,00

and it went on like that for a while, repeating every second.

 
Palladiam:
Installed, everything worked!!! I open 3 orders in MT5, in MT4 also opened 3 orders, I close also all closed. I open the history of transactions and I see this picture, the copier in MT4 closed 3 orders with a loss of -2. Help me how to fix !!!!!!! here is a copy of the history:
44184331        2011.07.27 04:07        sell    0.10    usdchf  0.8018  0.0000  0.0000  2011.07.27 05:09        0.8024  0.00    0.00    0.00    -7.48
44184412        2011.07.27 04:13        buy     0.10    eurusd  1.4500  0.0000  0.0000  2011.07.27 04:13        1.4498  0.00    0.00    0.00    -2.00
44184417        2011.07.27 04:13        buy     0.10    gbpusd  1.6430  0.0000  0.0000  2011.07.27 04:13        1.6427  0.00    0.00    0.00    -3.00
44184423        2011.07.27 04:13        buy     0.10    eurusd  1.4501  0.0000  0.0000  2011.07.27 04:14        1.4498  0.00    0.00    0.00    -3.00
44184427        2011.07.27 04:14        buy     0.10    gbpusd  1.6430  0.0000  0.0000  2011.07.27 04:14        1.6427  0.00    0.00    0.00    -3.00
44184432        2011.07.27 04:14        buy     0.10    eurusd  1.4499  0.0000  0.0000  2011.07.27 04:14        1.4496  0.00    0.00    0.00    -3.00
44184434        2011.07.27 04:14        buy     0.10    gbpusd  1.6431  0.0000  0.0000  2011.07.27 04:14        1.6427  0.00    0.00    0.00    -4.00
44184436        2011.07.27 04:15        buy     0.10    eurusd  1.4499  0.0000  0.0000  2011.07.27 04:15        1.4496  0.00    0.00    0.00    -3.00
44184452        2011.07.27 04:15        buy     0.10    gbpusd  1.6429  0.0000  0.0000  2011.07.27 04:15        1.6427  0.00    0.00    0.00    -2.00
44184459        2011.07.27 04:15        buy     0.10    eurusd  1.4498  0.0000  0.0000  2011.07.27 04:17        1.4496  0.00    0.00    0.00    -2.00
2011.07.27 04:07        171211  USDCHF  sell    in      0.10    0.80196 647769  0.00    0.00    0.00    9 997.63        
2011.07.27 04:09        171212  EURUSD  sell    in      0.01    1.45009 647770  0.00    0.00    0.00    9 997.63        
2011.07.27 04:09        171213  GBPUSD  sell    in      0.01    1.64284 647771  0.00    0.00    0.00    9 997.63        
2011.07.27 04:11        171214  EURUSD  buy     out     0.01    1.45017 647772  0.00    0.00    -0.08   9 997.55        
2011.07.27 04:11        171215  EURUSD  buy     in      0.10    1.45016 647773  0.00    0.00    0.00    9 997.55        
2011.07.27 04:11        171216  GBPUSD  buy     out     0.01    1.64308 647774  0.00    0.00    -0.24   9 997.31        
2011.07.27 04:11        171217  GBPUSD  buy     in      0.10    1.64307 647775  0.00    0.00    0.00



In this case you can see that there were delays in MT4 connection, but this is not the main thing, the main thing is that the source EA trades with a lot not available to the receiving EA, 0.01 while the copying EA on MT4 has a minimum lot of 0.1. He simply can not copy the situation correctly.

 

Could you please redirect the instrument like this ( EURUSD àEURUSD_t )?

 
shapa91:

Could you please tell me if it is possible to redirect the instrument in the following way ( EURUSD àEURUSD_t )?

Yes, technically it is possible, for this purpose it is enough to cut a symbol to a digestible one before saving data to a file, and in the copier when reading symbols to add the necessary perfixes.
 

If it's not too much trouble, I'd like to give you an example.

Thank you.

MT5  MT4

 

The article is good, but instead of OnTimer() event use OnTrade().

Then, even if you open a position on the other side of the earth, in another terminal, but with the same account, OnTrade()will be triggered on the remote terminal and will multiply the position across several MT4s.

 
Urain:

And there is nothing in the code, for this purpose in the mt4 copier there is an extern variable koeff_lot, which is responsible for scaling.

If you change it to 0.1, then for every 1.0 lot in mt5 0.1 lot will be opened in mt4.

I set the coefficient 0.1, I open 0.1 lot in mt5, but 0.01 lot is not opened in mt4, why?
 
vitya77:
I set the coefficient 0.1, I open in mt5 lot 0.1 but in mt4 lot 0.01 is not opened why?

What is the minimum lot in MT4?

if you set unrealistic conditions you will get unexpected results :o)

 

I might be the unlucky one that that error message still continuously prompt out even I reinstalled MT5 and MT4 for both source codes in English and Russian.  Could any one help on this?  I actually need this function urgently.  Many thanks!

 P.S.  I've already tried to debug this by placing "Translator positions.csv" in every file level but still the file cannot be found with the code 4103.  The only difference between my path and this article is just the drive (mine is E:\).  I did try to put the same csv file in the newly created path in C:\ but same error prompted.  Thus, the  file seemed to be transparent to the copyist program.  :(

 
hftsang:


 P.S.  I've already tried to debug this by placing "Translator positions.csv" in every file level but still the file cannot be found with the code 4103.  The only difference between my path and this article is just the drive (mine is E:\).  I did try to put the same csv file in the newly created path in C:\ but same error prompted.  Thus, the  file seemed to be transparent to the copyist program.  :(

This error 4103 is about chart operations. Don't you confuse something?

Charts

 

 

ERR_CHART_WRONG_ID

4101

Wrong chart ID

ERR_CHART_NO_REPLY

4102

Chart does not respond

ERR_CHART_NOT_FOUND

4103

Chart not found

Documentation on MQL5: Chart Operations / ChartID
  • www.mql5.com
Chart Operations / ChartID - Documentation on MQL5