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

 
Urain:

There will be no difference neither at reversal nor at cutting, the difference appears only on the difference of quotation levels at the current moment and execution lag.

Ideally, if the quotes between MTs are equal and the lag is 0, the trade will bring the same profit.


Not for all trading strategies (as it was written above I mean if you do not adapt MT4 trading methods to MT5).

I am not talking about the differences in the results of R2 and MT5 (but Rumus is really out of life, we will not take it into account).

Those who really want to manage trading in MT4 with MT5 should think about the reverse process.

At the same time, use more in the strategy exactly flips and cuts (in conditions of multicurrency).

It would also be great to synchronise all trading processes and balance information by GMT or local time of terminals (if they are in the same time zone).

PS

It's not about the "rate", and not even about the load on the deposit. It's about what you will have to give up and how to change the strategy.

The only convenience in this sense is that all MT4 trading processes can be adjusted to netteng with 100% results.

Of course an important point is that such phenomena as flipping and cutting are very rare in most trading strategies.

Urain:

On dll, it is unlikely that MQ will dig into every third-party code checking its safety, and not everyone has a delphi or srp compiler. You can post the code of one bible and substitute the compiled file with another one. So for now only ex5.

Unfortunately, MQL5 will not soon provide at least half of the possibilities that can be obtained with the help of DLLs.

A DLL that allows you to get out of the "sandbox" and is not very bulky can be implemented in many development tools.

As an option you can apply MQL-library tied to WinAPI.

 
Interesting:

Not for all trading strategies (as it was written above, I mean if you do not adapt MT4 trading methods to MT5).

I am not talking about the differences in the results of R2 and MT5 (but Rumus is really out of life, we will not take it into account).

I am reading this statement for the n-th time, and for the n-th time I would like to ask you to cite at least one sequence of orders/transactions, when transferring it from MT5 to MT4 (or vice versa) its financial result will change. Not the list of orders/transactions in the history will change, not the display of the current open position will be different, but the financial result will change.

I argue that if trading conditions are identical (quotes/spreads/swaps/stop levers, etc.) the result on MT5 will be the same or better than on MT4 (better - due to swaps, if there are 2 counter positions on MT4).


Yes, it is a difficult task to organise accounting of all nuances when copying trades. But this is another task, and it has nothing to do with the theoretical part of the netting issue.

 
komposter:

Indeed, OnTrade is an ideal place to handle changes in the list of positions. You just need to make sure that existing trades are copied immediately at startup (and not at the next trade event).

Filtering events is very simple - check the list of positions, and continue processing only if something has changed in it.

I'm not talking about this filtering, in OnTrade event appears not only about the executed trade but also about the placed order, and it in turn will not necessarily be implemented.
 
Urain:
I'm not talking about this filtering, in OnTrade the event appears not only about the executed deal, but also about the placed order, and it, in turn, will not necessarily be implemented.
That's what we are talking about - you don't need to react to placing/cancelling/executing orders. To do this, you need to check if the position has changed.
 

Good idea. Great copier.! tried to do a long time ago but it did not work out, and here I looked at what was my mistake.


To the author RESPECT. !!!

 
komposter:
That's what we are talking about - you don't have to react to placing/cancelling/executing orders. To do this, you need to check if the position has changed.

Well, then make a copy of OnTimer and rename it like this:

void OnTimers()
  {
//--- get the position 
   get_positions();
//--- if positions are not equal, save new data
   if(compare_positions())saves_positions();
  }
//+------------------------------------------------------------------+
//||
//+------------------------------------------------------------------+
void OnTrade()
  {
//--- get the position 
   get_positions();
//--- if positions are not equal, save new data
   if(compare_positions())saves_positions();
  }

//EventKillTimer() and then comment out the destruction of the timer in OnDeinit;

and in OnInit instead of EventSetTimer(1); put

OnTimers();

ZY actually the whole rework, but I will be able to check it only on Monday.

 
Urain:

Well, then make a copy of OnTimer and rename it like this:

Well that's what I mean, it's simple ;)


Urain:

and in OnInit instead of EventSetTimer(1);; put

And this is what I was trying to warn you about - if initialisation "fails" (for example, when starting the terminal, the data will not be loaded in time), the copier will "sleep" until the next trade event. In this case we should provide either an infinite loop or the same on-timer, which will work until successful initialisation.

 
Urain:

As for libraries, I am not against ex5 libraries, but I don't want to use dll because it discourages the end user.

And installing an additional copy of MT4 is also not very convenient for the end user ;-). Most likely the user has MT4 already installed for a long time, and not in MT5 files at all. Maybe we should recommend using subst as a trick?
 
marketeer:
Well, installing an additional copy of MT4 is also not very convenient for the end user ;-). Most likely the user has MT4 already installed for a long time, and not in MT5 files at all. Maybe you should recommend using subst as a trick?
I had a similar idea. But subst has some pitfalls (at least in XP): access to the physical disc(\\.\PHYSICALDRIVEx) stops working.
 
marketeer:
Well, installing an additional copy of MT4 is also not very convenient for the end user ;-). Most likely the user has MT4 already installed for a long time, and not in MT5 files at all. Maybe you should recommend using subst as a trick?

I didn't aim to write an article about signal transmission channels, I found the simplest and most understandable solution.

I think signal transmission is the topic of a separate article.

And about not very convenient to put a second MT here I think you are wrong, as far as I know and personal correspondence many users keep on the machine up to a dozen MT, and no problems. Besides MT4 can be easily transferred by simple copying. Moreover, my code does not have magik protection, so it will not be possible to use the account simultaneously by copying and manually.