Spread trading in Meta Trader - page 7

 

Hello all. Interesting observation on commodity contracts.

(Brent and LightSweet).

Just on the topic of arbitrage.

Below is the indicator - made by me by analogy with Sem Sem Semenych's complex turkeys.

Green line - LightSweet.

Sin line - Brent (BRN).

You can see - that (often) they even move in opposite phase. Although (most likely) it is necessary to trace the price with such indices on the tickers of these instruments.

 
rid писал(а) >>

Hello all. Interesting observation on the commodity contracts.

(Brent and LightSweet).

Just on the topic of arbitrage...

Below is an indicator - made by me by analogy with Sem Semyonych's complex indices.

Green line - LightSweet.

Blue line - Brent

It is visible that (often) they even move in the opposite direction. But (most likely) those symbols should be based on their tickers.

Smooth on the paper, but they forgot about the ovga.

 

Yes - of course. I am not guaranteeing a sure profit here at all. I am merely offering "information to think about".

You would do better to offer a similar constructive option.

 
Interesting observation, though!
 

Here's a more illustrative drawing.


 

If you catch the spread (arbitrage) on M1, imho the costs will never be covered.

 

Если ловить спред (арбитражный) на М1, то имхо издержки не покрыть никогда.

I think so too.... But in general the idea is not a bad one - to automate "catching" discrepancies in price...

I tried a similar, but came to the following - I need instruments, where the gap between normal symbols and symbols with #I is minimal. (it's clear which broker I'm talking about, I think) As one of the options I tried a spot futures


Here is the same chart, only in TOS, its advantage is that it is built in form of candlesticks, not lines...


р

Entry at extremums, deviations from the central, averaged spread. Exit at a return to this average, or even a departure of the spread in the opposite direction... Unfortunately, in TOC the candlesticks are huge, you can say it seems to cut the cabbage-nothing to bother... In real life the candlesticks' shadows are big just because of large deviations of bids and Asks; in short, the candlestick shows a large shadow, but if you try to close the position, it will close at a completely different price. But there is still profit, but not on 1-minute data, sometimes you have to wait for a day. Unfortunately, I'm having hard time with programming, so I just took an EA, which closes all positions when it reaches a certain profit (for example, KIM's one) and when the profit reaches, say, +150 dollars (1 lot positions), it closes, leaving about $100. (once though after closing +150 there is 0 left). Ideally, I would need to correct the Expert Advisor, so it would check the profit at the right price (symbol #I) and then close the position, but I can not do it.... But the fact that the profit will be there is a fact. Although, you should also take into account the seasonality. And the spreads should be generally traded at normal futures brokers. There will be no excuses with payments of serious sums, and the margin on spreads is many times smaller than in Br.....

 
Den2000 >> :

...... Ideally, the Expert Advisor should be corrected to check the profit at the right price (symbol #I) and then it will close the position, but I can't do it.... But the fact, that the profit will be...



This can be implemented (in its simplest form) like this:

extern int     Magic = 1111;int Magic2;
extern string  Symbol_1 = "FTSEH0";
extern string  Symbol_2 = "FDAXH0";
extern string  Symbol_1t = "FTSEH0#I";
extern string  Symbol_2t = "FDAXH0#I";
extern string  __ = "=== Ф-я закрытия по заданному профиту ==="; 
extern bool    Close_Profit = true;
extern int     CloseProfit = 50;//в пунктах

//--------------------------------------------------
int start()
{

double Ask_Tiker1 = MarketInfo( Symbol_1t,MODE_ASK);
double Bid_Tiker1 = MarketInfo( Symbol_1t,MODE_BID); 
double Ask_Tiker2 = MarketInfo( Symbol_2t,MODE_ASK);
double Bid_Tiker2 = MarketInfo( Symbol_2t,MODE_BID);
double POINT_Tiker1 = MarketInfo( Symbol_1,MODE_POINT); 
double POINT_Tiker2 = MarketInfo( Symbol_2,MODE_POINT); 
Magic2 = (Magic+1);

//жжжжж Закрытие позиций жжжжжжжжж

if ( Close_Profit == true){//если выкл-ль включен
//если первый символ продан, а второй куплен 
if (    ( ( PriceOpenLastPos( Symbol_1,OP_SELL, Magic)- Ask_Tiker1)/ POINT_Tiker1 +
   ( Bid_Tiker2- PriceOpenLastPos( Symbol_2,OP_BUY, Magic))/ POINT_Tiker2 )
>= CloseProfit){//если суммарный профит сделок 
// по факту больше заданного значения,
// -закрываем OP_SELL 1-го символа и OP_BUY второго симвлоа
ClosePosFirstProfit( Symbol_1,OP_SELL, Magic);
ClosePosFirstProfit( Symbol_2, OP_BUY, Magic);
                         }
//если первый символ куплен, а второй продан
if ( (( PriceOpenLastPos( Symbol_2,OP_SELL, Magic2)- Ask_Tiker2)/ POINT_Tiker2 +
      ( Bid_Tiker1- PriceOpenLastPos( Symbol_1,OP_BUY, Magic2))/ POINT_Tiker1 ) 
   >= CloseProfit){//если суммарный профит сделок 
// по факту больше заданного значения,
// -закрываем OP_SELL 2-го символа и OP_BUY первого симвлоа
ClosePosFirstProfit( Symbol_2,OP_SELL, Magic2);
ClosePosFirstProfit( Symbol_1, OP_BUY, Magic2);
                         }                     
       }//if (Close_Profit == true)

return (0);
 //-------Конец функции int start()------
     }
//Далее вставить указанные в коде пользовательские
 ф- и И. Кима и обратить внимание на  магики

Positions can be opened manually with I. Kim's script (available on his website), which allows you to set a magik when opening a position.

http://www.kimiv.ru/index.php?option=com_remository&Itemid=13&func=fileinfo&id=47 and

http://www.kimiv.ru/index.php?option=com_remository&Itemid=13&func=fileinfo&id=46

Since I have put the Magic and Magic2 hedge type in the code, it is necessary, because different positions in both hedge types are calculated and closed at different prices, - by both ticker bids and Ascs #I.

 
Den2000 писал(а) >>

.... But the fact that there will be a profit is a fact.

It is not a fact, it is almost guaranteed that it will not.

If the linear spread chart in MT4 may still cause at least some trust (and even then we need to look at the algorithm of its creation), then TOS (of native TOS!!!)

screw it! Is it obviously automatic? What is a candlestick? The high of the spread instrument is defined as the high of the spot minus the high of the futures.

And the fact that these prices occur at different times does not bother you? In practice, it's not like that. You have to synchronize the tick history

to recreate the correct chart, and that's not an easy task. Without datafeeds synchronization, it's more or less possible

build a linear chart on close prices like that in MT4 (if it is rendered by close prices, not by hawks for example).

You can make money on spot/futures arbitrage, but very little and very rarely - this is the most popular type of arbitrage,

covered by most traders.

 

I would even venture to guess that there may well be "protection" software on the DC's servers that physically prevents traders from earning on such (currency+same-name futures) arbitrage. They just do not let quotes diverge that much.

I've been tracking several such hedges for a week and a half using the specially made Expert Advisor in MT4.

And the difference has never been so large as to close even one lousy pip of the total profit.

But for different (but related) instruments - this is quite possible! For example - when hedging on indices, indicated - in my code above. Taking into account the fact that the Footsie and Dax lots size should be set to 3:1 (approximately).

Either, on different commodity grades .

But of course, in most cases it's not a "matter" of minutes . It's a matter of long hours, if not days ....

Reason: