The Gravity EA is a multifunctional tool for automatic and semi-automatic implementation of Pairs Trading strategies.
If you do not know what Pairs Trading is, look it up on the Internet to avoid misunderstandings.
The EA comprises:
- the ability to enable/disable the manual trading mode. You can open and close positions yourselves, based on the indicator values, or it can happen automatically.
- automatic money management
- automatic calculation of the optimum delta, the ability to manually specify
- automatic correlation calculation, consideration of the negative correlation when opening trades
- automatic position volume calculation, consideration of the volatility
- opening position by the required delta divergence
- the ability to trail the position opening
- the ability to close by stop loss
- the ability to trail the position closing by stop loss
- the ability to close positions by the total profit
- the ability to close by the delta divergence
- the ability to close by drawdown
- the ability to add to positions
- Second symbol = USDCHF - the second symbol of the pair
- Show information = true - display all information on the chart
- Automatical opening = true - automatic position opening
- Automatical closing = true - automatic position closure
- Risk = 25 - risk level when opening trades. [0 - 100]
- Including drawdown = true - close trades with the drawdown of Risk %
- Including volatility = true - consider the volatility when calculating the position volumes
- Actual correlation = 0.5 - the allowed correlation level for opening positions
- Analize period = 2000 - data analysis period
- Spread calculate method = RATIO - the spread calculation method, price ratio or difference
- Spread price type = PRICE_CLOSE - applied price of the moving average
- Automatical calculate delta = true - automatic calculation of the optimum delta
- Calculate deep = 1 - the filtering level at Automatical calculate delta = true, the greater the value, the stricter the filtering and the less the number of trades
- Actual period = 100 - the period of the moving average delta
- Delta control period = 1 - the smoothing period of the moving average
- Confirmation multiplier = 0.5 - the confirmation level, the value the delta must pass from the optimum level, for the positions to open when returning (multiplied by the optimum delta value)
- Use confirmation trailing = true - move the confirmation level at each increase of the delta
- Actual delta = 0 - set the optimum delta level for manual position opening when Automatical calculate delta = true
- Top-ups = false - use adding to positions
- Divergence multiplier = 0 - divergences from the optimum delta for adding to a position (multiplied by the optimum delta value)
- Close by delta = true- close positions by delta convergence
- Close by stop-loss = false - close positions by stop loss
- Size multiplier = 0.5 - stop loss size (multiplied by the optimum delta value)
- Use trailing = true - use trailing stop
- Close by profit = false - close positions by profit
- Actual profit = 0.5 - size of profit for closing (percentage of balance)
- Choose the instruments with high correlation for positive results. First of all, take note of the indices and futures contracts. Also good pairs are some of the stocks and their privileged variants.
- The higher the costs and less the correlation, the higher the timeframe should be used. For most cases, the optimal timeframe is M30-H4, the period of the delta moving average is 100-300
- You can not rely on the tester results completely, as the live trading by this strategy often comes with large commission costs. They must be taken into account. For testing use the M30 timeframe or higher, to speed up the process, OHLC can be set to M1
- For manual selection of the pairs, I will give all the necessary indicators (written by me) to everyone for free. The EA uses them as well.
- If there is interest in the EA - I will write a detailed manual, also describe my thoughts on the subtleties of the pairs trading, share the brokers with interesting pairs, etc.