A well-known "20/200 pips" Expert Advisor is now available in MQL5.
The code is well commented.
The trading rules are:
At some moment we look at the price difference for a certain time. If the price difference is negative and greate than some specified bias, we sell, if it positive, we buy.
It's named 20/200 pips" because it uses a fixed values of TakeProfit/StopLoss (20/200, 4-digit prices). For 5 digit prices the TP/SL ratio is 200/2000.
The Expert Advisor is designed for EUR/USD 1H, but you can try it at other symbols.
Note that code doesn't have any error processing rountines, so it cannot be used in real trading in its current form. The values of Expert Advisor parameters have been optimized for 1999-2006, so at present time the parameters aren't optimal. But even using the old parameters it's profitable in long term trading:
The input parameters are (5-digit prices):
For 4 digit prices the values should be changed to:
The information about this trading system, its history and improvement details you can find here.
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/214
This class provides methods for working with Windows *.ini files.Multicurrency OnTickMarketWatch tick event handler
The OnTick event handler is designed to proceed the ticks for a certain symbol. This is the version of Multicurrency tick event handler.