Spread trading in Meta Trader - page 91

 
rid >>:

Всем привет!

Мне нужно сделать вот что. К примеру, я хочу отобразать в окне индюка линию, кот. отображает средний спред между инструментами за последние N баров.

it was much easier for me to add this line to my indicator


 
rid >>:

Всем привет!

Мне нужно сделать вот что. К примеру, я хочу отобразать в окне индюка линию, кот. отображает средний спред между инструментами за последние N баров.

Делаю так:

Но, отрисовывается - явно что-то не то ! - см. - бирюзовая линия на рисунке.

Какая-то, - слишком ломания она и, кроме того, вообще не реагирует на параметр N_Bars

Пож. подскажите, - где ошибка ?


You have N_Bars not involved in the code because N is constantly being reset. And the sum doesn't accumulate for the same reason. And the rest of the algorithm is not clear to me.

It is better to add one more internal loop:

int k;  
for( k = 0; k < iBars( Symbol_1,Period())- NBars; k++)   
   {
   double Sum=0;           
   
   for(int N=0; N<= NBars; N++)
      {
      Sum += ( iClose( Symbol_1,Period(), k+ N) - iClose( Symbol_2,Period(), k+ N) );
      }

   Avar_spread[ k] = Sum / N;  
   }// for(k = 0; k < iBars
Like this! but it is desirable to make a limit, so the whole history will be recalculated!
 
Thank you.
 
Vitya писал(а) >>

And I have the same crap...

BRNH0 closed at 69.69 with a real price of 73.05.

When I closed I was in the plus, but when the orders closed I had a loss.

What to do next?

You must be looking at the terminal and it shows you the profit at the price of the flipper,

If you look at the real results, you have to look at the bid ask, i.e. the symbol with the prefix "#I".

Broco offers an indicator that shows real profit.

 
nailkin53 >>:

Вы наверно смотрите в терминал, а там отображается прибыль по цене ласт,

реальные результаты надо по бид аск смотреть,т.е. символ с приставкой "#I".

Броко предлагает индикатор, который показывает реальную прибыль.

that's all understandable, but a spread expansion of 370 times two days before expiry, how can you anticipate?

 

See the first post on the page (and subsequent posts, too - it seems that this is why tickers were introduced there! - If you do not know what to do with them, then you should not take them out of your hands, because they are not as good as you think they are. But the more so because they have lots of instruments and 2 or 3 times a week some liquid instrument expires, and then the spread widens "out of the blue", ostensibly - the quote provider says so..... ):

http://www.procapital.ru/showthread.php?t=11265&page=216

 

"Information for thought:

".....With futures-market-futures-market arbitrage, exchange players try to make money on price differences of the same product, such as cocoa, on two exchanges, say LIFFE and NYCSCE, or on price differences between two products, such as Arabica and Robusta coffee ,... " (с)

Coffee - (size 1:4)


 

"Kakawa, - ICE & EURONEXT



 
rid >>:

"Какава", - ICE & EURONEXT




here on different exchanges is exactly what "uncles" in hedge funds do, I think this is one of the most confident options for working on the topic.

 
rid писал(а) >>

See the first post on the page (and subsequent posts, too - it seems that this is why tickers were introduced there! - If you do not know what to do with them, then you should not take them out of your hands, because they are not as good as you think they are. But the more so because they have lots of instruments and 2 or 3 times a week some liquid instrument expires, and then the spread widens "out of the blue", ostensibly - the quote provider says so..... ):

http://www.procapital.ru/showthread.php?t=11265&page=216

The exchange spread is easy to check,

and if there is a deviation - go to technical support.

But if the deposit allows - wellcome to the market!

You will save on commission (depending on the broker) and the execution cannot be compared with MT4.

Reason: