The main difficulty of the code is comparing iCCI and iMACD values with the "Buy Sell Level" variable. The indicator values may be different several or even dozens of times.
For example, for EURUSD, USDJPY and USDSEK symbols as well as for all period values available in MetaTrader 5:
As you can see, iCCI is stable enough in its readings, while iMACD is highly dependent on the symbol price. To solve that, we may multiply iMACD values by a ratio:
Tip: EURUSD M30 is recommended.
Results from 2016.01.08 to 2016.11.06, EURUSD M30, initial deposit — 10 000:
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/16886
The Expert Advisor opens and closes at a certain time comparing two iMA indicators having different periods. A trade having a specified volume is opened at a specified symbol. Setting Stop Loss and Take Profit. Select position type: Buy or Sell.Exp_Bezier_ReOpen
The Exp_Bezier_ReOpen trading system is based on the Bezier indicator color change with adding to trend-following positions.