Weekend evening - page 51

 
Vitaly Muzichenko:

Well, I kind of suggested the TS that has been tested in practice, and mind you, just suggested it, not pointed it out.

I agree, I got it)) what you say about how to trade and about hedging I agree! Please advise which signals you use to open deals so that the averaging is not necessary?) About the pair selection I want to add, that it is not enough to choose it once, the K correlation is changing constantly and it is important to constantly control the K coefficient and use the specified values as a filter for opening deals. Do you agree?

 
Valentin Petukhov:

I agree, I get it)) what you say about how to trade and about hedging I agree! Tell me please, what signals do you use to open deals, so the averaging is not required?) About the pair selection I want to add, that it is not enough to choose it once, the K correlation is changing constantly and it is important to constantly control the K coefficient and use the specified values as a filter for opening deals. Do you agree?

The first selection to avoid repeats

 int CountSymbol=ArraySize(CurrencyPairs);
 for(int x=0; x<CountSymbol; x++) {
  for(int y=x+1; y<CountSymbol; y++) {
   xSymbol=CurrencyPairs[x]+SuffixSymb;
   ySymbol=CurrencyPairs[y]+SuffixSymb;

   if((StringSubstr(xSymbol,0,3)==StringSubstr(ySymbol,0,3)) || (StringSubstr(xSymbol,3,3)==StringSubstr(ySymbol,3,3))
    ||(StringSubstr(xSymbol,0,3)==StringSubstr(ySymbol,3,3)) || (StringSubstr(xSymbol,3,3)==StringSubstr(ySymbol,0,3)) ) continue;

   xSymbol=CurrencyPairs[x]+SuffixSymb;
   ySymbol=CurrencyPairs[y]+SuffixSymb;

The correlation is calculated using Pearson's method; if the pair is mirror, the opening goes in the direction of the one being hedged.

If we get a loss again we look for the next hedge to the symbol with which we last hedged. As a result, we can open up to 6 positions in one trade, but without locks, averages and pyramiding = one symbol - one position.

Fortunately, the MT5 tester knows how to work with such Expert Advisors.

 
Vitaly Muzichenko:

First selection so that there is no repetition.

The correlation is calculated according to Pearson, if the pair is mirror, then the opening is to the hedged side, unfortunately the code is very stretched, so I cannot show it.

If we get a loss again we look for the next hedge to the symbol with which we last hedged. As a result, we can open up to 6 positions in one trade, but without locks, averages and pyramiding = one symbol - one position.

Fortunately, the MT5 tester knows how to work with such Expert Advisors.

If we simplify things - make pairs in advance? After all, the dependencies in pairs last for years? Then search for new pairs online?

 
Vladimir Karputov:

If you keep it simple - make pairs beforehand? After all, do addictions in couples last for years? Then do an online search for new pairs?

It won't work that way, the correlation changes, you need to track in real time, over different periods, that's important.

 
Valentin Petukhov:

it doesn't work that way, the correlation changes, you need to track in real time, over different periods, it's important.

Online catching the correlation is a flea trap. It is swept away at the root.

 
I will add averaging. Let's see how it works when working independently on each pair ...
 
Vladimir Karputov:
I'll add averaging. Let's see how it works when working independently on each pair ...

Yes, the elephant will be eaten in pieces)) Have a good evening!

 
Vladimir Karputov:

If you keep it simple - make pairs beforehand? After all, do addictions in couples last for years? Then do an online search for new pairs?

It is complicated, or rather there will be several pairs and crosses are preferable. So, we should use them, the correlation is changing, may even change duringthe trading session, so we make a list with ~12 pairs and we have to search constantly online. Logic is like this: opened, got loss in N-points, went through selected symbols and chose maximal suitable, went in plus - all closed, and if in minus N-points*2, then we again look for the best and so on in a circle. Most often closing takes place on the 3rd pair. For the commercial version it is possible to close 1 pair if it has passed a big distance, to wait for the other 2 pairs to come to a small profit and to close them too.

There are many manoeuvres on hedging strategies.

 
Valentin Petukhov:

Yes, the elephant will be eaten in pieces)) Have a nice evening!

The averaging still works - to see it you need to disable Stop Loss, Take Profit and Trailing, set'Only one positions' parameter to'false' and set'Close opposite' parameter to 'true'.


This closes the project.

 
Vladimir Karputov:

The averaging still works - to see it, disable Stop Loss, Take Profit and Trailing, set the'Only one positions' parameter to'false' and set the'Close opposite' parameter to'true'.


And the project is now closed.

Vladimir, thank you! We can continue offline, I have such a willingness))

Reason: