Pair trading and multicurrency arbitrage. The showdown.

 

Good day dear forum members. After reading the forum a bit, I came across several threads on arbitrage and pair trading. Judging by the threads, some are interested and some are trying it. I used to dabble in this topic a long time ago, but my knowledge was not enough. Now I am a complete mess in mql5))). I would like to raise this question again and finally decide whether it is worth it or not. Perhaps, I missed something.

I propose to post here what anyone has on this issue. Namely:

  • Methods of determining the sliding of currency pairs;
  • What to do if the sliding is not collapsed, withdrawal in the BU;
  • Synthetics, pairs or cross. Excel, voodoo, secret knowledge and the like;
  • Your suggestions.

From myself I will try to implement algorithms, only for MT5. You will find my competence by reading my articles. Thank you all for your participation. Who has the opportunity to donate for the development write in a private message.

Everyone who wants to laugh and so on. Pass by.

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

1. PT_v1 EA
First (trial) version of the EA (ex5 file):
" Results with default parameters. There are no restrictions in the EA, but do not put on the real. Designed only for testing in the tester. Works at open prices, test in the corresponding mode" - post with explanation of settings.

2. tandeminstrument indicator
Correction (errors) of this indicator from CodeBase, and the corrected version - in attache post .

3. PT_v2 EA
Second version of the EA based on the tandeminstrument indicator, corrected by point 2 (post ) .

4. PT_v2_1 EA
Variation of the second version of the EA (based on the tandeminstrument indicator) - post .

5. PT_v3 EA
The third version of the Expert Advisor. It works on the ind_2_linep1 indicator (and the file moneymanagment.mqh, which should be in the include folder).
The EA itself, the indicator, settings, testing results and so on - see post
5.1. PT_v3.1 EA - the first improvement of the third version of the EA; added closing by total profit in the deposit currency;
EA - post , indicators - post


--------------------

6. Indicators and Expert Advisors/Robots that may be required in some next version of the EA -

6.1. ind_2_linep1 indicator and Spread_i_Env indicator - post
6.2. SpreadRegression_Ind indicator and TwoSymbolsSpread_Ind indicator - post
6.3. Spread_i_Env indicator as the most promising (as a result of indicator analysis)
for a new (or new version) of the Expert Advisor - post
6.4. OverlayChart indicator - post
6.5. multisymbolatr indicator - post (with screenshot)
6.6. CCFp and IndexCorr - post
6.7. Basket indicator (with screenshot) - post
6.8. CCFp_v1.0.3cvert indicator - post
6.9. utility under MT4, which shows channel width in the presence of CCFp_v1.0.3cvert indicator - post
6.10. CSS.v3.8 indicator - post
6.11. Mantis indicator - post (with screenshot and brief explanation), corrected version of the indicator - post
6.12. Expert Advisor spread_olyakish.mq5 with indicators - post

Пример разработки спредовой стратегии на фьючерсах Московской биржи
Пример разработки спредовой стратегии на фьючерсах Московской биржи
  • www.mql5.com
MetaTrader 5 позволяет разрабатывать и тестировать роботов, торгующих одновременно на нескольких инструментах. Встроенный в платформу тестер стратегий автоматически скачивает с торгового сервера брокера тиковую историю и учитывает спецификацию контрактов — разработчику ничего не нужно делать руками. Это позволяет легко и максимально достоверно воспроизводить все условия торгового окружения — вплоть до миллисекундных интервалов между поступлениями тиков на разных символах. В этой статье мы покажем, как провести разработку и тестирование спредовой стратегии на двух фьючерсах Московской биржи.
 

Starting Monday, I think we'll start with the simplest. Sliding on the indicator. Suggest variants of sliding definition, distances, number of candles, length, etc.

1

 
Roman Poshtar #:

Starting Monday, I think we'll start with the simplest. Sliding on the indicator. Suggest variants of sliding definition, distances, number of candles, length, etc.


This indicator shows a divergence, but it does not mean that there will be a convergence afterwards
 
Vladislav Vidiukov #:
This indicator shows a divergence, but that doesn't mean that there will be a convergence later on

Yes, it does. And it's lying through its teeth. But we have optimisation as a means of determining the maximums of divergence. You could try using + fills + averaging.

 
Roman Poshtar #:

Starting Monday, I think we'll start with the simplest. Sliding on the indicator. Suggest variants of sliding definition, distances, number of candles, length, etc.


Divergence and convergence of what we see on the picture means EURGBP fluctuations around some stationary value.
 
Roman Poshtar #:

That's right. And he's lying through his teeth. But we have optimisation as a means of determining the maximums of divergence. You could try using + fractions + averaging.


Absolutely right. I'll slightly unpack the material from my archives and post it here in a digestible format..... there you can choose variants under the code..... I'm in the subject. I wanted to start expom on mt5. But everything on the list.... while working on the other one myself according to the code.... By the way, you can make such an approach for pair trading. A - la - nets on limits - one from longing on the first leg of the spread - limits to buy and on the market went to buy on the sliding and another net to sell on limits - on the other leg and also went to sell on the market...... it is if by trading criteria - spread buy.
 
Thank you all for joining. We will work )
 
Roman Poshtar #:
...Suggest options for defining sliding, spacing, number of candles, length, etc.


Immediately - not pretending to define trade criteria, raising "non-breeders" from "non-breeders", as well as trolls - like 10 years have passed, and still there.... :-)

No it's not there. Already far away... in all senses, I also trade on similar TS and on stock exchanges, among others....

In general - proposals from the general framework you can make a robot, and there is already a type of it to twist, for example, the same conditions of averaging legs spreads, volumes for averaging, increasing or the same leave, averaging steps - their number + stop losses, like if "0" - then without them at all.

Exits by TR (in pips), in per cent of the deposit, by TS signals (see the picture).


Spread - a type of distance between spread lines above average (can also be selected by optimisation, for example).

Data from this branch:

https://www.mql5.com/ru/forum/7401


also page two

https://www.mql5.com/ru/forum/7401/page2


here too

Here too the inputs - outputs are described in this one:

https://www.mql5.com/ru/forum/122468/page210


I mean that you can start writing a certain general template, and then you can add features to it and bring it to the end....

Here is an indica to start with.... with the 2016 update

Indicators

Ind_2 Line+1 - indicator for MetaTrader 5

https://www.mql5.com/ru/code/1244

here on MT4 you can take as a basis - spread indicator post above - robot for MT5 edits in this:

https://www.mql5.com/ru/forum/122468/page189#comment_3220248


btw - here is something already there already..... :-)

https://www.mql5.com/ru/code/955

Tandem - Expert Advisor for MetaTrader 5


P.S. It looks like everything was stolen before us :-) for edits indicator and robot for MT 5 (for edits):

https://www.mql5.com/ru/forum/122468/page236#comment_3220714

Баскет-трейдинг, парный трейдинг. - На четвертом форуме полно материала и интересных веток
Баскет-трейдинг, парный трейдинг. - На четвертом форуме полно материала и интересных веток
  • 2012.08.10
  • www.mql5.com
Хочу знать мнения форумян по поводу разработки алгоритма подбора корзины валют. Также приветствуются мнения по поводу алгоритма подбора пар для парной торговли. Есть одна идея для аглоритма подбора пар но пока нет времени чтобы прописать и затестить берем две пары
 
Roman Shiredchenko #:


Straight away - without pretending to define trade criteria, lifting the "non-breeders" from the "non-breeders", as well as trolls - like 10 years have passed, and still there.... :-)

No it's not there. Already far away... in all senses, I also trade on similar TS and on exchanges including....

In general - proposals from the general framework you can make a robot, and there is already a type of it to twist, for example, the same conditions of averaging legs spreads, volumes for averaging, increasing or the same leave, averaging steps - their number + stop losses, like if "0" - then without them at all.

Exits by TR (in pips), in per cent of the deposit, by TS signals (see the picture).


Spreading - like the distance between spread lines above average (also can be selected by optimisation, for example).

Data from this thread:

https://www.mql5.com/ru/forum/7401


also page two

https://www.mql5.com/ru/forum/7401/page2


here too

Here too the inputs - outputs are described in this one:

https://www.mql5.com/ru/forum/122468/page210


I mean that you can start writing a certain general template, and then you can add features to it and bring it to the end....

Here is an indica to start with.... with the 2016 update

Ind_2 Line+1 - indicator for MetaTrader 5

https://www.mql5.com/ru/code/1244

here on MT 4 you can take as a basis - spread indicator post above - robot for MT5 edits in this:

https://www.mql5.com/ru/forum/122468/page189#comment_3220248


btw - here is something already there already..... :-)

https://www.mql5.com/ru/code/955

Tandem - Expert Advisor for MetaTrader 5


P.S. It looks like everything was stolen before us :-) for edits indicator and robot for MT 5 (for edits):

https://www.mql5.com/ru/forum/122468/page236#comment_3220714

Thank you, I will sort it out. Today I'm doing a multi-tool and overlay type indicator. Next Ind_2 Line+1

 

Threw the Multisymbol into the owl. It doesn't match back. Who has OverLay Chart for MT5? I would be grateful.

Like here https://www.mql5.com/ru/code/7933

OverLay Chart
OverLay Chart
  • www.mql5.com
Overlay two or more charts on the same window.
 
It seems to me that first of all you need an indicator to look at the history of spreads and their maximum values.
The indicator should be able to watch either ready-made instruments from the terminal or synthetics.
Reason: