Not the Grail, just a regular one - Bablokos!!! - page 216

 
grell:

This screenshot is as of 1am. That is, the indicator is offset by 17 hours.


This "portfolio is similar:

Buy CADCHF 0.1*L

Buy EURCHF 0.9*L

where L - total traded volume.

 
Contender:


Such a 'portfolio is similar:

Buy CADCHF 0.1*L

Buy EURCHF 0.9*L

where L is the total traded volume.


Basically, yes. The load on the deposit is less.
 
Contender:


Such a 'portfolio is similar:

Buy CADCHF 0.1*L

Buy EURCHF 0.9*L

where L is the total traded volume.


This is an idea by the way.
 
_new-rena:

Bablokos idea here. As I see it, no one has started correctly. I.e. First you need to express all pairs via deposit currency, then match them equally (equate) in price. ... Then apply them to one chart, then calculate lots, then make up a portfolio based on "statistical arbitrage" strategy, then look - what we get (I showed the portfolio indicator here from Surgeon), only then try it on a demo-....

The best variant is to write all indicators - pair mapping, spreads, channel, orders, equity for testing in MQL4 or directly in MQL5.


Then USDJPY can be excluded from analysis and spreads of six currencies can be generated (without USD and JPY). I will now try to rewrite the generator.
 

_

Yes. The spreads are different. Version 2 is now normalised to USD. Lot calculation is still the same.... Why actually change it?

 
int init()
  {
//--- indicator buffers mapping
  ObjectCreate ("Start", OBJ_VLINE, 0, 0, 0);// ???????? ???.
  ObjectCreate ("Finish", OBJ_VLINE, 0, 0, 0);// ???????? ???.
  ObjectSet("Start",0,iTime(NULL,0,depth+shift));
  ObjectSet("Finish",0,iTime(NULL,0,shift));
  SetIndexBuffer(0,spread);
  double min=100000000;
  for(int i1=0;i1<6;i1++) 
    {
    for(int i2=0;i2<6;i2++) 
      {
      for(int i3=0;i3<6;i3++) 
        {
        if(i1!=i2&&i1!=i3)
          {
          delta1=iOpen(pair[i1]+prefix,0,shift)/iOpen(pair[6]+prefix,0,shift)-iOpen(pair[i1]+prefix,0,shift+depth)/iOpen(pair[6]+prefix,0,shift+depth);
          delta2=iOpen(pair[i2]+prefix,0,shift)/iOpen(pair[6]+prefix,0,shift)-iOpen(pair[i2]+prefix,0,shift+depth)/iOpen(pair[6]+prefix,0,shift+depth);
          delta3=iOpen(pair[i3]+prefix,0,shift)/iOpen(pair[6]+prefix,0,shift)-iOpen(pair[i3]+prefix,0,shift+depth)/iOpen(pair[6]+prefix,0,shift+depth);
          if(delta3-delta2!=0)
            {
            y=(delta1-delta2)/(delta3-delta2);
            x=1-y;
            if(MathAbs(x)+MathAbs(y)==1)
              {
              for(int i=shift;i<shift+depth;i++)spreadtemp[i]=1*iOpen(pair[i1]+prefix,0,i)/iOpen(pair[6]+prefix,0,i)
                                                           -x*iOpen(pair[i2]+prefix,0,i)/iOpen(pair[6]+prefix,0,i)
                                                           -y*iOpen(pair[i3]+prefix,0,i)/iOpen(pair[6]+prefix,0,i);
              double max=0;
              for(int i=shift;i<shift+depth;i++)if(MathAbs(spreadtemp[shift]-spreadtemp[i])>max)max=MathAbs(spreadtemp[shift]-spreadtemp[i]);
              if(max<min){min=max;pair1=i1;pair2=i2;pair3=i3;x_start=x;y_start=y;}
              }
            }
          }
        }
      }
    }
   return(0);
  }
The selection criterion is the minimum deviation of the spread from the axis within a given range. Can be rewritten to suit.
 

_

Normalised, brought to the deposit currency, with USD in the denominator. I don't think the spread calculation will change much compared to prices. It may turn out to be the same.

Lines accordingly AUDUSD CADUSD CHFUSD EURUSD GBPUSD NZDUSD. I have not added the line (100*JPY)/USD.

 
15 correlation graphs on the bottom line. the only thing left is to find the lot.
 
Trade two spreads against each other. I've got it, I'm off to make some money...
 
grell:
You have to trade two spreads against each other. I've got it, I'm off to make some money...


The main thing in this process is to realise in time that all these "spreads" are nothing more than "the same eggs, but side by side".

;)

Reason: