Once again, arbitrage, pair trading. - page 20

 
Vadineros of pair trading (arbitrage, correlation of two pairs).
The strategy is approximately as follows:
Find two well correlated pairs.
Find the moment of big price divergence. Buy one pair and sell the other.
Short for the one that went up. For the one that went down - a long.
Lots are calculated so as to get a lock. Prices of two pairs are different.
There is not a big risk of losing the account in case of sharp price fluctuations.
Then when pairs have returned to the normal correlation, closing of two orders by the total profit.

I am writing an Expert Advisor for auto trading.
The correlation indicator gives the value of the correlation (approximately 1...-0.2). I set the threshold of permission to trade.
Two orders will be opened. Lots are set in proportion to the prices of pairs that would create a lock.
When the sum of profits of two pairs reaches the specified positive value, two orders are closed.
Again, the Expert Advisor waits for a signal from the indicator to start trading.

I want to add an auto-tracking of price. I can also try to close orders when the correlation returns to the specified value.

I have faced a problem. I am looking for an algorithm for determining the trade direction.
What characteristics may determine which pair has gone up or down?
So far I determine visually by combining charts.
It is very important to determine which pairs are up/down.
Do you have any experience, any answers?
Now Vitya Music will come and teach you everything.
 
For years they can go in different directions
 
Spreader
Spreader
  • www.mql5.com
Советник для двух валютных пар