Spread trading in Meta Trader - page 164

 

I came across a way of comparing not the MAs of two pairs, but their Stochastics on an English forum. In general, it is the same eggs, but from the side.

Attached is the indicator itself... I don't know, maybe somebody will be interested in it.

 
I also compared linear regression angles (also in a separate window):
//+------------------------------------------------------------------+
//| Расчет угла линейной регрессии методом наименьших квадратов (МНК)|
//+------------------------------------------------------------------+
double AngLR(int k)
  {
//----
  double sX=0;  // summ X
  double sY=0;  // summ Y
  double sXY=0; // summ X*Y
  double sX2=0; // summ X2 (Х в квадрате)
  int CB=CountBars+k; 
  for(int i=k;i<CB;i++) 
    {
    sX+=i;
    sY+=Price(i);
    sXY+=i*Price(i);
    sX2+=MathPow(i,2);
    }
//---- расчет коэффициентa b 
  double b=((CountBars*sXY)-(sX*sY))/((CountBars*sX2)-MathPow(sX,2));
//----  
  return(b);
  }
Of course, Price(i) is also a function - you can replace it with Close[i] etc.
 
leonid553:

Well, here's a little present for those in attendance.

..... ...!


Also just in time.

Multiyear seasonal lines I have plotted for the SIH1-GCJ1=1^3 size ratio

Current situation, M30, (SIH1-GCJ1=1^3):

 
Stochastics are probably even better to analyse, as 0 to 100 works for any instrument at any price.
 
ZZZEROXXX:
Stochastics are probably even better to analyse, as 0 to 100 works for any instrument at any price.

Not quite better - the MAs are more accurate. But stochastics often begin to show convergence and divergence faster than MAs. This is an observation.
 

Stochastic is too "fussy" for these purposes (in my opinion)

It is easier to set shorter periods of slow and fast MA in Ind_2Line+1, for example 13 and 4 (instead of 21 and 8 by default) and it will be a faster entry.

Or, generally speaking, you may set fast МА=1. Then MA lines will almost copy price charts, - see the window of the bottom most tip - how much faster...

BRNH1 - CLH1

.

 
Are you using the triple spread?
 
leonid553:

Stochastic is (in my opinion) too "fussy" for this purpose


If you lengthen the parameter, it's pretty good.
 
leonid553:

Stochastic is too "fussy" for these purposes (in my opinion)

It is easier to set shorter periods of slow and fast MA in Ind_2Line+1, for example 13 and 4 (instead of 21 and 8 by default) and it will be a faster entry.

Or, generally speaking, you may set fast МА=1. Then MA lines will almost copy price charts, - see the window of the bottom most tip - how much faster...

BRNH1 - CLH1

.

And I liked one pair to count as zero, and the other kind of walks around it.... the gaps are visually better seen. It's like this

extern string Simbol1="EURUSD";
extern string Simbol2="GBPUSD";
Bid1=(MarketInfo(Simbol1,MODE_BID)-MarketInfo(Simbol2,MODE_BID)+iMA(Simbol2,1,200,0,MODE_SMMA,PRICE_MEDIAN,0)-iMA(Simbol1,1,200,0,MODE_SMMA,PRICE_MEDIAN,0));
   ExtMapBuffer1[0]=NormalizeDouble(Bid1,5);
 
 
hrenfx:
Are you using the triple spread?


Yeah, here's a curious, rather profitable short term currency tactic on tf=m15 (and I quote myself):

The "fundamental" rationale for this spread :

Originally, the intention was to match the currency instruments 6E(euro) and RP(euro pound) for paired counter entries by spread indicators and price lines. However, in doing so, it turned out that here we are, in fact, single-trading a synthetic instrument very close to the currency pair GBPUSD. Clearly, it makesno much sense in such "arbitrage"! Then an idea appeared - to artificially "dilute" one of the instruments, for example the euro-pound RP (or the pair EURGBP of the same name ), with some third instrument, for example the dollar index DX. When you open multidirectional positions in these two instruments RP & DX we get a curious synthetic instrument! In which the "Euro share" increases and at the same time the "Pound share" decreases. Thus, we get a new syntheticinstrument "pseudo-Euro", which can be safely opposed to the currency futures 6E (or the currency pair EURUSD) to create an artificial short-term arbitrage situation, which is what we actuallyneed !

It turns out that this triple spread will only ever be traded in "6E (euro) vs (RP-DX)"mode . In doing so, the euro pound position RP (or EURGBP) is always strictly to one side and both DX and 6Epositions are always strictly to the other! This should be firmly remembered! Therefore, we will refer to this spread as follows for convenience:

RP (or EURGBP) - (6E+DX). ( end of quote)

==========================================================

So, EURGBP is (Euro + DX).

I will continue a little later. Distracted by domestic matters.

Reason: