Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Facebook !
Rejoignez notre page de fans
Un script intéressant ?
Poster un lien vers celui-ci -
laisser les autres l'évaluer
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
Vues:
17204
Note:
(13)
Publié:
2009.05.05 06:52
Mise à jour:
2014.04.21 14:53
MQL5 Freelance Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

                                                                                 The world has changed... I feel it in water, I feel it in the ground,

                                                                                  I feel in air. Much, that was before - will not return never...


                                                                                                                            " The Lord of Rings ", Tolkien.



The idea of creation  Gandalf_PRO  EA is taken from this branch of a forum.

The  EA  holds open one buy and one sell orders (without dependence from each other)

 Until the market of them will not close with fixed TP or SL.


The input in the market occurs on the basis of two-parametrical Exponential Smoothings

Time Series in view of 2 parameters:

1-st parameter: it is parameter of accommodation of the price-S,

2-nd parameter: it is parameter of an inclination of trend T,

Calculations go under recurrent formulas:


                                                       S [n] =w*y [n] + (1-w) * (S [n-1] +T [n-1])     


                                                                    T [n] =t * (S [n]-S [n-1]) + (1-t) *T [n-1]


Then, the predicted value:                     y [n+1] =S [n] +T [n]


As initial (i.e. initial) values (estimations) for 1-st and 2-nd parameter it is possible

To take factors from the formula of linear regress - from here.

_____________________________________________________________________________________


Entrance variables in the EA : 


For longs:


                  In_BUY=true;                     long positions allowed,

                 Count_buy=24;                 number of bars in a history on which smooths out ВР,

                 w_price=0.18;                    factor of the price,

                 w_trend=0.18;                   factor  of a trend,

                 SL_buy=62;                      a level stoploss in pips,

                 Risk_buy=0;                      a risk level in % .


For shorts: variables In_SELL, Count_sell, m_price, m_trend, SL_sell, Risk_sell - are similar.


_____________________________________________________________________________________


Optimization passes in 2 stages, on constant lot, i.e. when Risk_buy=0; and Risk_sell =0; 


Stage 1, for longs:            In_BUY=true; In_SELL=false; Count_buy from 3 up to 120, with step 1;

                                    w_price  and  w_trend from 0.05 up to 0.6 with step 0.01;   SL_buy from 30 up to 100, with step 1.


Stage 2, for shorts: In_BUY=false; In_SELL=true; the other-is similar.


The EA well trades on "fat" sites of a trend on periods H4 and D - EURUSD,


 However, the additional filtration is necessary for an input in the market with application of indicators

 on the higher periods.

__________________________________________________________________________________________

Examples.


1. Movement on the north from March, 9 till March, 20, 2009:

Strategy Tester Report
Gandalf_PRO

SymbolEURUSD (Euro vs US Dollar)
Period4 Hours (H4) 2009.03.09 00:00 - 2009.03.19 20:00 (2009.03.09 - 2009.03.20)
ModelEvery tick (the most precise method based on all available least timeframes)
ParametersIn_BUY=true; Count_buy=24; w_price=0.18; w_trend=0.18; SL_buy=62; Risk_buy=0; In_SELL=false; Count_sell=24; m_price=0.18; m_trend=0.18; SL_sell=62; Risk_sell=0;
Bars in test1055Ticks modelled420744Modelling quality90.00%
Mismatched charts errors3
Initial deposit10000.00
Total net profit326.02Gross profit389.82Gross loss-63.80
Profit factor6.11Expected payoff27.17
Absolute drawdown116.90Maximal drawdown142.10 (1.42%)Relative drawdown1.42% (142.10)
Total trades12Short positions (won %)0 (0.00%)Long positions (won %)12 (91.67%)
Profit trades (% of total)11 (91.67%)Loss trades (% of total)1 (8.33%)
Largestprofit trade58.10loss trade-63.80
Averageprofit trade35.44loss trade-63.80
Maximumconsecutive wins (profit in money)11 (389.82)consecutive losses (loss in money)1 (-63.80)
Maximalconsecutive profit (count of wins)389.82 (11)consecutive loss (count of losses)-63.80 (1)
Averageconsecutive wins11consecutive losses1


__________________________________________________________________________________________


№2. Movement on the south from September, 24 till October, 31, 2008:

Strategy Tester Report
Gandalf_PRO

SymbolEURUSD (Euro vs US Dollar)
Period4 Hours (H4) 2008.09.24 00:00 - 2008.10.30 20:00 (2008.09.24 - 2008.10.31)
ModelEvery tick (the most precise method based on all available least timeframes)
ParametersIn_BUY=false; Count_buy=24; w_price=0.18; w_trend=0.18; SL_buy=62; Risk_buy=0; In_SELL=true; Count_sell=24; m_price=0.18; m_trend=0.18; SL_sell=62; Risk_sell=0;
Bars in test1163Ticks modelled780695Modelling quality90.00%
Mismatched charts errors32
Initial deposit10000.00
Total net profit857.40Gross profit2007.24Gross loss-1149.84
Profit factor1.75Expected payoff17.86
Absolute drawdown67.70Maximal drawdown362.48 (3.31%)Relative drawdown3.31% (362.48)
Total trades48Short positions (won %)48 (62.50%)Long positions (won %)0 (0.00%)
Profit trades (% of total)30 (62.50%)Loss trades (% of total)18 (37.50%)
Largestprofit trade251.20loss trade-64.88
Averageprofit trade66.91loss trade-63.88
Maximumconsecutive wins (profit in money)7 (384.44)consecutive losses (loss in money)5 (-319.36)
Maximalconsecutive profit (count of wins)394.04 (3)consecutive loss (count of losses)-319.36 (5)
Averageconsecutive wins3consecutive losses2



Traduit du russe par MetaQuotes Ltd.
Code original : https://www.mql5.com/ru/code/8779

News_Plotter News_Plotter

This indicator displays lines on the chart corresponding to upcoming news events. Customizable.

wajdyss_information_indicator_v1 wajdyss_information_indicator_v1

Indicator for show some information about current currency

Fractal Bands Fractal Bands

A variation of the Bollinger Bands that incorporates findings from a fractal analysis

Automatic Update the chart you drag it to Automatic Update the chart you drag it to

action just like pressing home key, esc to exit,