Automatic and semi-automatic trading on correlated pairs

0
(0)

Hedging (from English hedge - insurance, guarantee) - establishing a position on futures in one market to compensate for the impact of price risks on an equal but opposite futures position (position on futures) in another market.
The purpose of hedging is to protect against adverse changes in prices on the stock market, commodity assets, currencies, interest rates, 등.

We are interested in trading currency pairs based on hedging. What is required for this?
1) identify tools that can compensate each other. It is not difficult at all, 예를 들어 "금" 그리고 "은".

If you trade in currencies, then the pair is better to choose with high correlation.
You can see the possible options in the table:

Name: weekly.PNG Views: 14555 Size: 23.9 KB

Title: 5.PNG Views: 13987 Size: 23.4 KB

Title: day.PNG Views: 14058 Size: 24.1 KB

Title: hourly.PNG Views: 14015 Size: 23.8 KB

2) to determine which of the tools at the moment you need to sell and which one to buy. There are many options for this, one of them is to place the quotes of both instruments in one window and, by the nature of their movement, determine the instrument for buying and selling. The MultiInstrument indicator will help you. You can open orders yourself using the cm_script_Hedge script (in the appendix)

Click on image to enlarge Name: MultiInstrument.gif Views: 1922 Size: 15.7 KB ID: 223466

extern string SYMBOL1 = "GBPUSD"; // first character
extern string SYMBOL2 = "EURUSD"; // second character
extern double LOT1 = 0.1; // lot of the first instrument
extern double LOT2 = 0.1; // lot of the second instrument
extern int TYPE1 = OP_BUY; // order type of the first instrument
extern int TYPE2 = OP_SELL; // order type of the second instrument
extern int stoploss = 10, // SL exposure level, if 0, then SL is not set
takeprofit = 10; // TP exposure level, if 0, then TP is not exposed
extern int Slippage = 3; // 미끄러짐
extern int Magic = 777888;

Further action - we wait when both instruments together give us the profit we need and close both orders. You can also use the CloseProfit Expert Advisor for this purpose.

The Expert Advisor closes all orders upon reaching a specified amount of profit or loss in the deposit currency.
Advisor can work only for the pair that is thrown or for all the tools of the account.

 

ProfitClose = 10; // close all orders when receiving profit
LossClose = 1000; // close all orders when
losing money AllSymbol = false; // consider all the tools or only the one on which the adviser is standing

Naturally for this strategy, AllSymbol = true

Example of work: Successful trading! Added advisor CloseProfit 2 symbol. It closes all positions on the specified pairs when they achieve a profit or loss specified in the parameters.

Click image for larger version Name: xauxag 3days.PNG Views: 2019 Size: 39.0 KB ID: 223463

Could you make a specific example on the screen?
Above, you made the skins, where the graphics diverged and where they are together. Obviously, you need to enter when the graphics diverge. I wrote about this in the first post!
I showed an example of trading on your screen. Blue arrows - purchases, red - sales.

Title: 2019-07-25_23-26-22.png Views: 34 Size: 326.3 KB

paperclip Thumbnails

Click image for larger version Name: hedg1.gif Views: 1 Size: 17.9 KB ID: 2890839

Click image for larger version Name: hedg2.gif Views: 4 Size: 25.4 KB ID: 2890840

paperclip Attachments
  • 읽다  MTF Trend Catcher Pro forex system for swing and day trading

    이 게시물이 얼마나 유용했나요??

    평가하려면 별표를 클릭하세요.!

    평균 평점 0 / 5. 투표수: 0

    현재까지 투표가 없습니다! 이 게시물을 가장 먼저 평가해 보세요..

    이 게시물이 귀하에게 도움이 되지 못했다니 죄송합니다!

    이 게시물을 개선해 보겠습니다.!

    이 게시물을 개선할 수 있는 방법을 알려주세요.?



    작가: 외환 위키 팀
    우리는 경험이 풍부한 외환 트레이더들로 구성된 팀입니다 [2000-2023] 우리 자신의 조건에 따라 삶을 살기 위해 헌신하는 사람들. 우리의 주요 목표는 재정적 독립과 자유를 얻는 것입니다., 우리는 자립 가능한 라이프 스타일을 달성하기 위한 수단으로 독학을 추구하고 외환 시장에서 풍부한 경험을 얻었습니다..