Trading robot · MT4

Take Profit Oil Arbitrage

by iceandfire1981

This MetaTrader 4 expert advisor implements a pairs trading or statistical arbitrage strategy primarily designed for energy commodities like USOIL and UKOIL.

GitHub stars1
Forks0
Last update7 years ago12 Nov 2018
LicenceNone stated

Overview

Take Profit Oil Arbitrage monitors the price differential between two correlated assets over a specific lookback period to identify mean-reversion opportunities. The robot executes simultaneous trades on both instruments when the spread deviates from the calculated average. Risk management is handled through user-defined stop loss and take profit parameters based on price spreads. The repository contains several iterations of the logic, though the documentation is minimal.

Details

Author

iceandfire1981 on GitHub

Type

Trading robot

Platform

MetaTrader 4 (MQL4)

Strategy

Arbitrage, Mean reversion, Hedging

Markets

Oil & commodities

Timeframes

M15-H1

Risk profile

  • Holds opposite positions at once

Input parameters

Read from TakeProfit_2.mq4. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
input_bar_countint1440行?
input_begin_bar_indexint30计算开始索引(最近半小时)
input_slipint2.0滑点值
input_timer_settingsint10定时器设置(单位:秒)
input_sldouble0.2止损差价
input_tpdouble0.6止盈差价
input_xdouble0.15偏移价差
input_adjustdouble0.05修正值
input_shares_mdouble0.1主执行数量
input_shares_sdouble0.1次执行数量
input_as_mstringUSOIL主资产
input_as_sstringUKOIL次资产
Show all 13 inputs
NameTypeDefaultDescription
input_order_prefixstringaa订单以及文件前缀

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone iceandfire1981/MT4_Project from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL4/Experts.
  3. 3Copy the filesCopy the .mq4 file into Experts, and any .mqh files into the Include folder the code expects.
  4. 4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
  5. 5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.

Similar expert advisors

3 stars

This expert advisor facilitates arbitrage trading between futures and spot instruments, primarily targeting gold and stock indices. Available for MetaTrader 4 and 5, it monitors the price difference between two related symbols against a moving average to identify trade opportunities. The logic includes a noise-filterin

MT4MT5 Trading robot ArbitrageMean reversionGrid High risk
Updated 3 years ago None stated GitHub repository of Gold Futures Spot Arbitrage

Icarus

by fraggli
7 stars

Icarus is an automated trading system for MetaTrader 4 that employs a grid strategy with Martingale lot scaling. It utilizes Bollinger Bands and the Stochastic Oscillator to identify entry points, offering a conjunctive mode for filtered execution. The EA manages risk through maximum position limits, equity warning thr

MT4 Trading robot GridMartingaleMean reversion High risk
Updated 4 years ago GPL-3.0 GitHub repository of Icarus

Oil Hedge

by vvvf
3 stars

This MetaTrader 4 expert advisor implements a correlation-based hedging strategy between two instruments, typically UKOIL and USOIL. It monitors the price spread between the two assets, opening buy and sell positions simultaneously when the spread expands or narrows beyond defined thresholds. The EA manages exits based

MT4 Trading robot HedgingMean reversionMartingale High risk
Updated 5 years ago None stated GitHub repository of Oil Hedge

North East Way

by Yogurt-Peng
3 stars

This MetaTrader 4 robot implements a multi-currency mean-reversion strategy, targeting price returns to the average on correlated forex pairs. It manages trades using a grid system with a significant martingale multiplier to scale lot sizes. The expert advisor allows for simultaneous trading on multiple symbols to dive

MT4 Trading robot Mean reversionGridMartingale High risk
Updated 1 year ago None stated GitHub repository of North East Way

Buy Low Sell High EA

by yeainshukla
2 stars

This MetaTrader 4 expert advisor implements a cumulative profit strategy based on support and resistance levels. The system identifies potential trade entries by analyzing historical price extremes over a defined lookback period while excluding recent price action. It manages trade exits collectively, closing the entir

MT4 Trading robot Mean reversionHedging
Updated 1 year ago None stated GitHub repository of Buy Low Sell High EA

Arbitrage Expert

by wawaw237zz
1 stars

Arbitrage Expert is a MetaTrader 4 expert advisor that focuses on a zone recovery hedging strategy rather than traditional arbitrage. Based on the OGT Zone Recovery system, it manages trades by opening counter-positions within a defined price zone when an initial trade goes into drawdown. The system employs a lot multi

MT4 Trading robot HedgingMartingaleMean reversion High risk
Updated 4 years ago None stated GitHub repository of Arbitrage Expert

More trading robots

Need a broker for MT4?

Compare regulated brokers that support MetaTrader, with spreads, minimum deposits and leverage side by side.

Compare brokers