Spread trading in Meta Trader - page 42

 
rid >>:

График движения ( ZC+ZW+ZS)

(КОРН-СИН) + (ПШЕНИЦА-ЗЕЛ) + (БОБЫ-КРАСН)

Перспективы для торговли (ручной и автоматич), вроде бы неплохие !


There are plenty of tools for gap trading, just need to find the most effective ones

 
timbo >>:

Гугл тебе в помощь.

Кратко, коинтеграция не считается, для неё нет числового показателя. Можно только попытаться оценить её наличие/отсутствие. Простейший вариант для двух ассетов: регрессия одного ряда Х на другой ряд У, получаем слоп B и интерсепт A. Строим спред процес типа Z = Y - X*B - A. Тестируем полученный процесс на стационарность. Если Z стационарен, то можно считать, что Х и У коинтегрированные, а процесс Z можно успешно торговать.


Holy Grail! That's a great idea.

 
forex-k >>:

добавил


Question: The index2-V4udemo.ex4 indicator, if there are other indicator windows before it, displays information in the first window after the price chart. Is it only me? For example, when two (or more) such indicators are displayed, the information of the last one (the bottom one) clogs the information of other...


 
skv. >>:

Вопрос: индикатор index2-V4udemo.ex4, если перед ним есть окна других индикаторов, выводит информацию в первое окно после графика цены. Это только у меня? Например, при выводе двух (или более) таких индикаторов информация последнего (нижнего) забивает информацию остальных...


can be refined to avoid this problem, but why display two indicators

 
forex-k >>:

можно доработать чтобы такой проблемы не было, но зачем выводить два индикатора

I have an idea, I want to experiment... But this is with any window indicators that are displayed above this, sometimes other information overlaps

 
skv. >>:

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

I have significantly improved the indicator, gaps on currencies + oil and gold are used

Now it is possible to attach several indicators to one chart without losing information, instruments only futures (euro, pound, chif etc.), I check in dc B.


 

and that's without gold and oil


Files:
 
forex-k >>:

существенно доработал индикатор, используются разрывы на валютах+ нефть и золото

теперь можно прикреплять несколько индикаторов на один график без потери информации, инструменты только фьючерсы (евро, фунт,чиф и др.), проверяю в дц Б.


Respect! Question: What is the reason for not displaying the information on the lower display?


 
skv. >>:

Респект! Вопрос: по какой причине не выводится информация на нижнем индикаторе:


Fixed it, in general there is a strange way of working with objects in indicators.

Files:
1.rar  22 kb
 

Good afternoon, everyone. I'm confronted with a confusing issue.

In a 2 character indicator I write a condition :

(if bars are missing/fail to match, we do not calculate and do not draw this section)

int symb2Shift = iBarShift( Symbol_2,Period(),iTime( Symbol_1,Period(), k),true);
if( symb1Shift!= -1)  { 
       Symbol1[ k]=....... ;
       Symbol2[ k]=......; 
Everything is working fine and correct. For example, Dax starts before Footsie and the turkey does not render this section - it waits for Footsie to start !



However, when I started experimenting with 3-character variant - I immediately felt "something wrong" !

For example, if we take the above condition and rewrite it


int symb2Shift = iBarShift(Symbol_2,Period(),iTime(Symbol_1,Period(),k),true); like this

int symb1Shift = iBarShift(Symbol_1,Period(),iTime(Symbol_2,Period(),k),true);


It would seem - what difference does it make? If we compare the first symbol with the second or the second with the first, - "head-on as well as head-on"? But no, ....!

The condition:

int symb1Shift = iBarShift( Symbol_1,Period(),iTime( Symbol_2,Period(), k),true);
  if(/*symb2Shift != -1 */ symb1Shift!= -1)  { 
ceases to work, and the graph clearly shows that there is a shift of one line in relation to the other and "historical" analysis is not possible.



At the same time, if we move the indicator from the Dax chart to the Footsie chart, everything works fine again and the missed bars are not drawn!

That's not all! When combining both conditions -

for( k = 0; k < iBars( Symbol_1,Period()); k++)   {  
   int symb2Shift = iBarShift( Symbol_2,Period(),iTime( Symbol_1,Period(), k),true);
   int symb1Shift = iBarShift( Symbol_1,Period(),iTime( Symbol_2,Period(), k),true);
  if( symb2Shift != -1 || symb1Shift!= -1)  { 

The situation does not improve... - The incorrect LINE SHIFT is still there...

With this kind of work it turns out that the inductor must necessarily be put on the chart of the first symbol! But then, for 3-character version - it is not clear how to "synchronize" bars ...

What is the problem here? Who can tell me ?

Reason: