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

2014.08.01 13:43

CoensioTrader1V06 - expert for MetaTrader 5

| English Русский 中文 Español Deutsch 日本語 Português

votes: 21

CoensioTrader1 is an open, free, community-supported, automatic trading system (ATS), that is mainly based on only two basic, but very powerful market principles: market trends and market price action.

This system rests on a "trend hunting" principle and enters a trade only when several market conditions are met. The trend detection is based on daily double exponential moving average (DEMA) indicator.

The extended statistical investigation showed that, market can be considered as "trending" if only three successive daily DEMA values point in the same direction. In case when a trending condition is detected, system tries to find the best entry point in the direction of the current trend. The entry points are based on the Bollinger Bands indicator and swing-low/swing-high price action, as described below.

Buy Signals

The system enters a BUY trade every time when:

  1. Market is in "bullish" up trending condition;
  2. Price comes from below the lower Bollinger Band;
  3. A "swing low" price action is detected: Low -> Lower Low -> Higher Low.

Fig.1: Example of BUY entry.

Fig.1. Example of BUY entry

Sell signals

The system enters a SELL trade every time when:

  1. Market is in "bearish " down trending condition;
  2. Price comes from above the upper Bollinger Band;
  3. A "swing high" price action is detected: High -> Higher High -> Lower High.

Fig.2: Example of SELL entry.

Fig.2. Example of SELL entry

The system is written in MQL5 programming language, that provides a possibility of performing an accurate and realistic back-test analysis of a multi-currency based trading systems.

The key to successful back test of a multi-currency system is to abandon the "tick based" EA flow control and use a "timer based" one. This prevents from stagnation in case the EA's base currency does not receives price ticks any more e.g.: during the "quiet" market hours. Moreover the systems has a healthy risk/reward ratio and uses a trailing "stoploss" mechanism with configurable trailing step (using TrailingStopLossStep parameter).

The lot size can be set to a fixed size (using LotSize parameter), a proportional lot size (using RiskMax, which is based on stoploss level and equity risk in %), or a dynamic lot size (using LotBalanceDivider parameter, which resizes the lot size according to change of account balance). Besides that, the system incorporates two different "takeprofit" actions: a standard level based "takeprofit" and additionally an equity based "takeprofit" action. In multi-currency trading systems the account equity can significantly rise above the account balance, this fact gives an opportunity to close all trades and take the current profit as it is. This smart behavior dramatically increases the system's profitability.

As already stated above, CoensioTrader1 is a free and open project, however all CoensioTrader1 project members should actively contribute to the future system improvement.

To make this possible, the system is designed in such way that it is capable of harnessing the computing power of all project members. So every time a project member performs a system optimization, the results are validated and in case of interesting outcome, the optimization parameters are automatically uploaded to the Coensio server database and directly shared with other project members.

The most gainful results are selected using "CoensioIndex" which is defined by:

CoensioIndex = ProfitFactor * BalanceGrowth[%] / EquityDrawDown[%]2
where BalanceGrowth[%] = 100 * Profit / InitialDeposit

The results:

Rank:CoensioIndex:InitialDeposit:Profit:Growth:ProfitFactor:LotSize:EquityDrawdown:BalanceDrawdown:Trades:MT5 Report:Risk Level:User:

Fig.3: Example of a backtest result (Rank=10)

Fig.3. Example of a backtest result (Rank=10)

More trading parameters are available on:

Mercado Aberto Mercado Aberto

Simple indicator that shows when market is open.

Maximum Percentage of Equity Risk Maximum Percentage of Equity Risk

This code allows you to set a maximum percentage of equity risk.


The indicator shows the power of bulls and bears.

SimpleBars SimpleBars

The indicator colors candlesticks based on the highs and lows of previous bars.