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

2016.07.01 09:32

Billy expert - expert for MetaTrader 4

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

votes: 5

In general, it is quite strange pattern ... but, strangely enough, it works.

When the price moves downward on 3 bars (three "falling" candles) on M15, the green is above the red on Stochastic of M1 and M5 charts.

Stop loss, take profit can be optimized.


extern int StopLoss // I hope this is clear
extern int TakeProfit // I hope this is also clear :)
extern double Lots // if lot is not set to 0, then it is fixed, if set to 0, then the lot size will be change automatically based on the deposit.
extern int MaxOrders // maximum allowed number of simultaneously opened orders
extern int Periods // period, the Stochastic of which is used by the EA
extern int Periods2 // period, the Stochastic of which is used by the EA (second)

After improvements and optimization the most successful results were achieved on euro/jpy, working timeframe - M15, stochastic periods are M1 and M5, take profit - 145, stop loss - 25. Testing results for one month period is provided below.

I am waiting for tips. I know the EA is crude and not reliable enough, but nonetheless there is something in it, in my opinion.

If anyone interested I can share modified versions as well as variations.

Thank you for attention.

Strategy Tester Report
Masterforex-Demo (Build 220)

SymbolEURJPY (Euro vs Japanese Yen)
Period15 Minutes (M15) 2008.11.21 21:30 - 2008.12.31 18:59 (2008.01.30 - 2009.01.30)
ModelOpen prices only (fastest method to analyze the bar just completed, only for EAs that explicitly control bar opening)
ParametersTrailingStop=30; StopLoss=140; TakeProfit=25; Lots=0; magicnumber=777; MaxOrders=1; Periods=1; Periods2=5;

Bars in test2558Ticks modelled5013Modelling qualityn/a
Mismatched chart errors0

Initial deposit2500.00

Net profit7460.93Gross profit7460.93Gross loss0.00
Profit factor
Expected payoff276.33

Absolute drawdown490.14Maximum drawdown2676.50 (28.28%)Relative drawdown28.28% (2676.50)

Total trades27Short positions (won %)0 (0.00%)Long positions (won %)27 (100.00%)

Profit trades (% of total)27 (100.00%)Loss Trades (% of total)0 (0.00%)
Largestprofit trade495.65loss trade0.00
Averageprofit trade276.33loss trade0.00
Maximumconsecutive wins (profit in money)27 (7460.93)consecutive losses (loss in money)0 (0.00)
Maximalconsecutive profit (count of wins)7460.93 (27)consecutive loss (count)0.00 (0)
Averageconsecutive wins27consecutive losses


Translated from Russian by MetaQuotes Software Corp.
Original code:

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

Example of MACD Automated Example of MACD Automated

Code example of MACD automated with advanced money management function.

Pivot Star Pivot Star

Pivot indicator. Standard, Fibonacci, Camarilla, Woody's, Demark. Calculates pivot points from previous bar of chosen period (M5 - MN).