Spread trading in Meta Trader - page 120

 
And here's a humble gift for you - a chart of seasonal trends on the sugar spread, supply contracts - May2010-March2011:


 
rid >>:

Почему же наглость ?

Вовсе нет! Как раз такая тактика считается оч. результативной! Но тут абсолютно нечего делать без графиков сезонных тенденций, иначе можно влететь. А эти графики, к сож., - в большистве - платные....

It's cheeky because such tactics are easy to calculate, and it's a guaranteed return with zero risk. And since it is, it has long been calculated by the guys sitting closer to the deal window, and they lick everything off the plate long before that plate reaches you. You're only left with risky strategies. That is, strategies where you take some risk. If you assess this risk correctly, you will find yourself on the plus side. Don't hope to find a risk-free strategy, which is arbitrage. There is no such thing as arbitrage because it is all eaten up before us.

 
It's cheeky because such tactics are easy to calculate, and it's a guaranteed return with zero risk. And since it is, it has long been calculated by the guys sitting closer to the deal window, and they lick everything off the plate long before that plate reaches you. You're only left with risky strategies. That is, strategies where you take some risk. If you assess this risk correctly, you will find yourself on the plus side. Don't hope to find a risk-free strategy, which is arbitrage. Arbitrage doesn't exist as it is all eaten up before us. <br / translate="no">.
My opinion is similar. The bicycle has already been invented and has been ridden for a long time. Where we should look for arbitrage is not in seasonal trends, but in their deviation from the historical scenario: by evaluating the factors that determine them and making appropriate decisions. It is said not in vain that arbitrage is not an eternal cash cow but a temporary earner.
 
Is the code correct?
//+------------------------------------------------------------------+
int start()
  {
   //int    counted_bars=IndicatorCounted();
//----
   int k;
   if (pretime == 0) k = MinBars;
   else k = iBarShift(Symbol_1,Timeframe,pretime,true);
   pretime = iTime(Symbol_1,Timeframe,0);
   while (k >= 0)
   {
    int symb2Shift = iBarShift(Symbol_2,Timeframe,iTime(Symbol_1,Timeframe,k),true);
    Spread[k] = iClose(Symbol_1,Timeframe,k) - iClose(Symbol_2,Timeframe,symb2Shift);
    AvSpread[k] = CalculateAvarageSpread(Symbol_1, Symbol_2, Timeframe, NBars, k);
    k--;
   }
//----
   return(0);
  }
//+------------------------------------------------------------------+
double CalculateAvarageSpread(string Symbol_1, string Symbol_2,
                              int Timeframe, int NBars, int Shift)
{
   int k;
   double N = 0;
   double Sum = 0;
   for(k = Shift; k < iBars(Symbol_1,Timeframe); k++)
   {
      if(N == NBars)
         break;

      int symb2Shift = iBarShift(Symbol_2,Timeframe,iTime(Symbol_1,Timeframe,k),true);
      if(symb2Shift != -1)
      {
         Sum += iClose(Symbol_1,Timeframe,k) - iClose(Symbol_2,Timeframe,symb2Shift);
         N++;
      }
   }
   double avarageSpread = Sum / N;
   return(avarageSpread);
}
//+------------------------------------------------------------------+

 
rid >>:

Если исходить из такой идеи, то сейчас нужно купить 0.54 лота EURJPY (зел.) и продать

каждую из составляющих пар по 0.1 лоту.

Сейчас перед пейроллсами попробую так сделать на демо.



Had completely forgotten about these positions ! (Opened on the daily 5.03 - see page 116)
This is the situation with these open positions now:

 
yuripk >>:
Правильно ли код составил?


Doesn't this code slow down the processor?
(instead of Timeframe - I put Period() everywhere )
 
rid писал(а) >>

Quickly, this is how it looks like (the yellow line is the combined average line of all seven JPY pairs)

CADJPY is red

EURJPY - green

USDJPY - blue

GBPJPY - aqua

NZDJPY - brown

AUDJPY - fillet

CHFJPY - orange




Based on the picture, they should have bought cadjpy instead of eurjpy, and I do not understand why they sold 0.1 of eurjpy?
 
I have found an interesting indicator that shows profit or loss in dollars if you opened a position some time ago. If you put two indicators,
you can observe how spread changes between pairs, and you can create a synthetic tool consisting of several separate ones.
Files:
 
HELLO TO ALL!
It is well known that the russ. The FR is mostly following the oil price.
At the moment - the oil price line(CL - blue line on the chart) has diverged from the Rosneft share price line (green).
And the Delta spread line has deviated downwards.
There is a rationale to enter BUY ROSN + SELL BRN (Brent) .
The ratio of the position sizes was calculated as 3 : 0.03, but I am not sure about the correctness of this calculation.
If somebody is interested in this situation - please give your opinion on sizes of these positions
(I remind you that only whole "lots" can be placed on shares in Broco)

 
rid писал(а) >>
HELLO ALL!
It is well known that the russ. The FR is mostly following the oil price.
At the moment - the oil price line(CL - blue line on the chart) has diverged from the Rosneft share price line (green).
And the Delta spread line has deviated downwards.
It would now be sensible to enter BUY ROSN + SELL BRN (Brent) .
The ratio of the position sizes was calculated as 3 : 0.03, but I am not sure about the correctness of this calculation.
If somebody is interested in this situation, - please give your opinion on the sizes of these positions
(I remind you that only whole "lots" can be placed on shares in Broco)


I have also calculated 1:10, now I will try to calculate by hand.