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: 16
2013.01.07 15:45
2016.11.22 07:32

The Exp_VininI_Trend_LRMA trading system is based on changes of the trend direction displayed by the VininI_Trend_LRMA indicator.

The signal is formed when a bar is closing depending on the chosen algorithm of forming signals with the input parameter:

input AlgMode Mode=BREAKDOWN;     //the algorithm to enter the market

Two variants of the algorithm are possible:

  1. The breakthrough of UpLevel and DnLevel levels of the indicator;
  2. Change of the indicator direction.

To eliminate triggering of the Expert Advisor on the flat the ChangeOfVolatility volatility indicator must be added into this Expert Advisor which level determines whether there is enough trend force to open position. Deals filtering performs by the input parameter of this indicator:

input uint MaxTrendLevel=60; // Trend level enough to make a deal (the range is 0/100)

The deals filtering carried out only by the entry, exits are without filtering.

Place VininI_Trend_LRMA.ex5 and ChangeOfVolatility.ex5 compiled files to the terminal_data_folder\MQL5\Indicators.

The Exp_VininI_Trend_LRMA_ Expert Advisor is the same Expert Advisor but without use of volatility indicator!

Default Expert Advisor's input parameters have been used during the tests shown below. Stop Loss and Take Profit have not been used during the tests.

Fig. 1. The instances of history of deals on the chart.

Fig. 1. The instances of history of deals in the chart.

 Testing results for 2011 at USDCHF H4:

Fig. 2. Chart of testing results

Fig. 2. Chart of testing results

Translated from Russian by MetaQuotes Software Corp.
Original code:

ytg_Japan_Candles ytg_Japan_Candles

The indicator of the candlesticks combinations (Japanese candlesticks)

The class for drawing the Stochastic using the ring buffer The class for drawing the Stochastic using the ring buffer

The class is designed for calculation the technical indicator Stochastic Oscillator (Stochastic Oscillator) using the algorithm of the ring buffer.

Breakout Bars Trend v2 Breakout Bars Trend v2

The second (edited and added) version of the alternative indicator for trend definition based on the breakthrough bars and distance from extremums. The breakthrough levels and size of the previous trends are added.

The simplified class of the CArrayRing256 ring buffer The simplified class of the CArrayRing256 ring buffer

The class is the simplified version of the CArrayRing class: it has a predetermined fixed size of 256 elements, it is faster, and allows to organize the mini time series, indicator minibuffers, short sized buffers to store intermediate stream data inside the Expert Advisor or indicator.