Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

votes: 17
2012.12.11 15:08
2016.11.22 07:32
smatf.mq5 (21.92 KB)view

The Expert Advisor is rewritten from MQL4, the author is zotkindm, link to the source

How it works

The Expert Advisor analyses many Moving Averages from several timeframes (by 5 Moving Averages on 3 timeframes) and the AC indicators (total 2 on 2 timeframes). The power of the signal is calculated by the indicators state (high or low), the input signals can be performed on all signals or only by a high signal.

The image 1 shows the performance of the Expert Advisor in the tester's visual mode, the image 2 shows the results of the tester.


Fig. 1. Deals in the Expert Advisor tester.

Fig. 2. The results of work of the Expert Advisor for the last month (09.2012) at EURUSD M15.


  • TF1, TF2, TF3 - Timeframes.
  • maTrendPeriodv_1, maTrendPeriodv_2, maTrendPeriodv_3, maTrendPeriodv_4, maTrendPeriodv_5 - The period of the Moving Average. 
  • Shift - The bar on which the indicators are checked: 0 - forming bar, 1 - first formed bar.
  • OpenLevel - Open level is 0 or 1.
  • CloseLevel - Close level is 0 or 1, 2 - off.
  • Lots - Lot.
  • StopLoss - Stop Loss in points, 0 - without Stop Loss.
  • TakeProfit - Take Profit in points, 0 - without Take Profit.
  • Trailing - Trailing stop level; when the value is 0, the trailing stop is disabled.

Translated from Russian by MetaQuotes Software Corp.
Original code:


Two lines are channel averages created by High and Low price values for different periods displayed as clouds

Kloss Kloss

The Expert Advisor used on such indicators as the Moving Average, the CCI, stochastic

True MFI (Alternative to the standard MFI) True MFI (Alternative to the standard MFI)

Rise or fall in prices is often preceded by increased activity of trading. The True MFI indicator tries to use this factor.


When market activity decreases, then the Expert Advisor places two pending stop orders