• Visão global
  • Comentários
  • Discussão (12)
  • O que há de novo

Gravity

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
  • detailed adjustment of spread, correlation and volatility
  • 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 close by schedule
  • the ability to top-ups
  • consideration of the trend when opening positions
  • schedule of the expert working


Parameters:

  • Second symbol = AUDUSD - second pair symbol
  • Show information = true - show all information on the chart
  • Use previous bar = true - calculation of data on the previous bar, not the current tick
  • Start hour time = 0 - starting hour of robot activity
  • End hour time = 23 - final hour of robot activity
  • Start day time = 0 - starting day of the week of robot activity
  • End day time = 23 - final day of the week of robot activity
  • Deviation type = Automatic calculation - type of correlation
  • Trading mode  = Automatic mode - trading mode (automatic / manual, etc.)
  • First symbol's fixed lots = 0 - Fixed lots of the first character (by default it is disabled for automatic calculation)
  • Lots by risk = 4 - risk percentage for automatic selection of lots [0 - 100]
  • Preferred profit = 1.5 - percentage of balance for profit taking [0 - 100]
  • Maximal drawdown = 10 - maximal drawdown [0 - 100]
  • Slippage = 10 - maximal slippage
  • Spread timeframe = current - spread calculation timeframe
  • Spread period = 140 - spread calculation period in bars
  • Spread calculate type = Simple average - type of spread calculation, average / minimum / maximum / median, etc.
  • Spread calculate method = RATIO - spread calculation method, price ratio, or difference
  • Spread price type = PRICE_CLOSE - spread price type
  • Sigma period = 0 - sigma calculation period, by default it is the same as the spread
  • Manual actual delta = 0 - manual calculation of the optimal delta
  • Actual delta by the sigma deep = 1.8 - automatic calculation of optimal delta
  • Trend period = 0 - trend calculation period
  • Calculate correlation like the spread = false - calculation of correlation with the spread options
  • Сorrelation timeframe = 1 day - timeframe to calculate
  • Сorrelation period = 180 - calculation period in bars
  • Calculate volatility like the spread = true - calculation of volatility with the spread options
  • Volatility timeframe = current - timeframe to calculate
  • Volatility period = 100 - calculation period in bars
  • Actual correlation = 0.3 - appropriate correlation level
  • Use top-ups = true - use top-up
  • Deviation percent = 0 - percentage of divergence for top-up
  • Open by trend = true - consider trends when opening deals
  • Trend filter = 2 - suitable trend level
  • Close by delta = true- close positions on the delta descent
  • Close by drawdown = true - close positions by drawdown
  • Close by profit = true - close positions by profit
  • Close by time = true - close positions by the schedule


Conclusion:

  • 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.
  • 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


Sem comentários
Versão 1.2 2019.04.25
- improved lots calculation
Versão 1.1 2019.04.24
- added detailed adjustment of spread, correlation, volatility parameters
- improved algorithm of balancing lots
- the algorithm for adding positions has been changed
- added filter by trend
- фdded expert work schedule