Trading the spread of multiple symbols

Avatar
  • updated
  • Under review

Hi, from my initial research I think it might work very well to define a custom price as

p1 - x * p2

where p1 is the price of e.g. EURUSD

and p2 is the price of EURGBP


Basically, we are trading the spread here.


The main advantage of this approach is that the spread is always reverting. So If situations like covid as in march 2020 occur, the spread reverts because all assets went down.


If you are new to this concept, I can recommend this book: https://b-ok.cc/book/667720/3ffe3a?dsource=recommend

Image 1694


When the EA triggers an order to the custom symbol, there must be some specific logic which implemntes:

Going long of 1 lot with the custom asset, means:

going long of 1 lot of EURUSD and 1.3 short of EURGBP.

Vice versa for closing a position.



Avatar
0
Hannes Waser
Quote from Hannes Waser

Nice! Looks like a good tool for the research of "good" portfolios before putting one into CP.

Just had another thought on that article: we should not really use it. It tries to find a portfolio with criteria's which do not really matter if CP is applied as the trading engine. ;)

I would prefer a portfolio which can be traded well using stochastic K or macd. Means: the trend reverses smoothly and does not generate false breakouts.

A better solution would be to select the combined symbols in the set file properties and let the MT optimizer search for the best combination. @andrey, would that be possible to run a backtest on?

Avatar
0
Andrey Khatimlianskyi
Quote from Hannes Waser

Just had another thought on that article: we should not really use it. It tries to find a portfolio with criteria's which do not really matter if CP is applied as the trading engine. ;)

I would prefer a portfolio which can be traded well using stochastic K or macd. Means: the trend reverses smoothly and does not generate false breakouts.

A better solution would be to select the combined symbols in the set file properties and let the MT optimizer search for the best combination. @andrey, would that be possible to run a backtest on?

Do you want to analyze spread chart for signals?

And do you also want to open several trades with different lots on signal (like sell GBPCHF 1.0 + buy USDCHF 1.38 lots)?


Why do you think it should work good? )

Please, try to test custom symbol I sent to you and share the results

Avatar
0
Hannes Waser
Quote from Andrey Khatimlianskyi

Do you want to analyze spread chart for signals?

And do you also want to open several trades with different lots on signal (like sell GBPCHF 1.0 + buy USDCHF 1.38 lots)?


Why do you think it should work good? )

Please, try to test custom symbol I sent to you and share the results

Hi @Andrey,

1) yes, this is the idea (like sell GBPCHF 1.0 + buy USDCHF 1.38 lots). 
The main idea behind it is that if something like the covid crash is happening everything is going down.  So we are basically hedged against crazy events. And if this is true, the rest is some usual random distribution. 
And if this is true, we can apply martingale with much higher success here.  Tbh, this is something we need to prove or dismiss by backtesting.

2) I used your json file today and it seems like my MT5 does not load any candle data for the new symbol GBPUSD_CHF.

Thats what I see in a chart window:

If I try to "request" the symbol data

no candles become visible. :(

Any ideas what the issue might be?

Avatar
0
Hannes Waser

fixed: The issue was, that after import the formula got lost. I added it manually and the bars appeared.

Will do more tests then...

Avatar
0
Hannes Waser

all right, looks good actually.

Last issue (hopefully):

I only have data from June 2021. Not earlier.

Any ideas how to get it? The symbol-request ui does not get older data either.

However, the backtest for the 3 months looks good :P

Avatar
0
Andrey Khatimlianskyi

Hannes, thanks for your investigation!

Terminal should build the maximum possible history of spread symbol — https://www.metatrader5.com/en/terminal/help/trading_advanced/custom_instruments#synthetic_bars

Try to download M1 data for GBPCHF and USDCHF before making the new symbol (delete history files before the next attempt!).