0
(0)
ਨਾਮ:
EMAplusWPRv1_1
ਲੇਖਕ: gery18 (2011.03.30 09:24)
ਡਾਊਨਲੋਡ ਕੀਤਾ: 5067
ਡਾਊਨਲੋਡ ਕਰੋ:
 

ACTUAL VERSION : http://codebase.mql4.com/7746

Expert advisor that trade in the trend of EMA and buy/sell signals get from Williams %R

I have tried to create an Expert advisor that could by traded with 1000 EUR starting equity and to minimize the drawdown. Hope you like it. I appreciate every feedback.

Optimized for EURUSD 5 ਮਿੰਟ

I have removed some bugs, changed position sizing, you define the % of your account you want to risk on a single trade. I added simple trailing stop, if trailingStop = 0, then it is disabled.

You use it on your own risk. I am not responsible for your loss, you have to change, test and optimize it for your purpose.

Inputs:

extern double takeProfit      = 200;      // take profit
extern double maxStopLoss     = 50;       // stop loss

extern double maxLots         = 10;       // max lots per position
extern double maxContracts    = 2;        // max open positions, 2 is optimal for smoother equity

extern double EMA             = 144;      // EMA to identify trend
extern int    iWPRPeriod      = 46;       // Williams' Percentage Range to determine buy/sell signals
       int    iWPRretracement = 30;       // retracement of Williams' Percentage to allow next trade
extern double trailingStop    = 50;       // ਪਿਛਲਾ ਸਟਾਪ, ਵਰਤੋ 0 to disable trailing stop
extern int    risk            = 2;        // % of account you want to risk on a trade
extern double magicNumber     = 13131;

Strategy Tester Report

EMAplusWPRv1_1
XTrade-MT4 Demo (Build 229)
ਚਿੰਨ੍ਹ EURUSD (Euro vs US Dollar)
ਮਿਆਦ 5 ਮਿੰਟ (M5) 2010.01.04 00:00 - 2011.02.01 23:55 (2010.01.04 - 2011.02.02)
ਮਾਡਲ Every tick (the most precise method based on all available least timeframes)
ਪੈਰਾਮੀਟਰ takeProfit=200; maxStopLoss=50; maxLots=0.1; maxContracts=2; EMA=144; iWPRPeriod=46; trailingStop=50; risk=6; magicNumber=13131;
Bars in test 59025 Ticks modelled 7365767 Modelling quality n/a
Mismatched charts errors 8220
Initial deposit 1000.00
Total net profit 1635.88 Gross profit 4478.56 Gross loss -2842.67
Profit factor 1.58 Expected payoff 3.92
Absolute drawdown 22.16 Maximal drawdown 249.69 (10.77%) Relative drawdown 12.99% (188.82)
Total trades 417 Short positions (won %) 198 (67.68%) Long positions (won %) 219 (73.52%)
ਲਾਭ ਦੇ ਵਪਾਰ (% ਕੁੱਲ ਦਾ) 295 (70.74%) Loss trades (% ਕੁੱਲ ਦਾ) 122 (29.26%)
Largest profit trade 67.23 loss trade -39.62
ਔਸਤ profit trade 15.18 loss trade -23.30
ਅਧਿਕਤਮ ਲਗਾਤਾਰ ਜਿੱਤ (profit in money) 20 (273.93) consecutive losses (loss in money) 6 (-142.17)
Maximal consecutive profit (count of wins) 326.42 (15) consecutive loss (count of losses) -142.17 (6)
ਔਸਤ ਲਗਾਤਾਰ ਜਿੱਤ 4 consecutive losses 2

EMAplusWPRv1_1 1

To use my position sizing increase the maxLots size and define the risk - how many % of your account you want to risk on a single trade.

For position sizing I use the following code:

   minAllowedLot  =  MarketInfo(ਚਿੰਨ੍ਹ(), MODE_MINLOT);    //IBFX= 0.10
   lotStep        =  MarketInfo(ਚਿੰਨ੍ਹ(), MODE_LOTSTEP);   //IBFX= 0.01
   maxAllowedLot  =  MarketInfo(ਚਿੰਨ੍ਹ(), MODE_MAXLOT );   //IBFX=50.00

   balance = AccountBalance();  
   ilo   =  ((ਸੰਤੁਲਨ * ਖਤਰਾ / 100) / maxStopLoss); 

   lots  =  NormalizeDouble(ilo, 0) * lotStep;

   ਜੇਕਰ (ਬਹੁਤ ਸਾਰੇ < minAllowedLot)  lots = minAllowedLot;
   ਜੇਕਰ (ਬਹੁਤ ਸਾਰੇ > maxLots)        lots = maxLots;
   ਜੇਕਰ (ਬਹੁਤ ਸਾਰੇ > maxAllowedLot)  lots = maxAllowedLot;

Strategy Tester Report

EMAplusWPRv1_1 + position sizing
XTrade-MT4 Demo (Build 229)
ਚਿੰਨ੍ਹ EURUSD (Euro vs US Dollar)
ਮਿਆਦ 5 ਮਿੰਟ (M5) 2010.01.04 00:00 - 2011.02.01 23:55 (2010.01.04 - 2011.02.02)
ਮਾਡਲ Every tick (the most precise method based on all available least timeframes)
ਪੈਰਾਮੀਟਰ takeProfit=200; maxStopLoss=50; maxLots=10; maxContracts=2; EMA=144; iWPRPeriod=46; trailingStop=50; risk=6; magicNumber=13131;
Bars in test 59025 Ticks modelled 7365767 Modelling quality n/a
Mismatched charts errors 8220
Initial deposit 1000.00
Total net profit 4655.80 Gross profit 13740.16 Gross loss -9084.36
Profit factor 1.51 Expected payoff 11.16
Absolute drawdown 22.16 Maximal drawdown 1139.43 (28.08%) Relative drawdown 28.08% (1139.43)
Total trades 417 Short positions (won %) 198 (67.68%) Long positions (won %) 219 (73.52%)
ਲਾਭ ਦੇ ਵਪਾਰ (% ਕੁੱਲ ਦਾ) 295 (70.74%) Loss trades (% ਕੁੱਲ ਦਾ) 122 (29.26%)
Largest profit trade 268.93 loss trade -256.75
ਔਸਤ profit trade 46.58 loss trade -74.46
ਅਧਿਕਤਮ ਲਗਾਤਾਰ ਜਿੱਤ (profit in money) 20 (353.21) consecutive losses (loss in money) 6 (-354.36)
Maximal consecutive profit (count of wins) 1466.13 (15) consecutive loss (count of losses) -664.91 (4)
ਔਸਤ ਲਗਾਤਾਰ ਜਿੱਤ 4 consecutive losses 2

EMAplusWPRv1_1 2

 

9 ਟਿੱਪਣੀਆਂ ਇੱਕ ਨਵੀਂ ਟਿੱਪਣੀ ਪੋਸਟ ਕਰਨ ਲਈ, ਕ੍ਰਿਪਾ ਲਾਗਿਨ ਜਾਂ ਰਜਿਸਟਰ

genial!!!!!

01.06.2011 06:11 ea20102010

EMAplusWPRv1_1 3
19.05.2011 01:16 Pityka888

but its a great job m8

03.05.2011 20:32 zaratrau

with me doesnt work at all

03.05.2011 20:20 zaratrau

ਸਤ ਸ੍ਰੀ ਅਕਾਲ, congratulations for your EA, I am already using it on real, however with 500 usd start deposit. It is doing ok so far for a month and a half.

The new version, nevertheless, will not open trades correctly, it will start with 0.01 ਬਹੁਤ, Broker STS Finance, and will not increase it. Please vefify this it might be just a little bug 🙂

Suggestion: You might include MACD 4H filter, and open trades only in the direction of relationship of Convergence/divergence bars and signal line. This is only suggestion not mandatory, the EA worsk ok so far as I said.

ਚੀਅਰਸ,

Vladimir Draganov

[email protected]

11.04.2011 20:19 vlddrg

Can i ask you, how can i set my own lot size with this EA.

I am a beginner so i hope some one can teach me, ਤੁਹਾਡਾ ਧੰਨਵਾਦ.

31.03.2011 21:22 nomis

ਹੈਲੋ,

thanks for new version.

you should make a backtest from 2011.02.02 'ਤੇ, because the last version made only losses since then.

Re

31.03.2011 09:21 KlamseN

the trailingStop does not trail at all
30.03.2011 14:06 razoff

ਹੈਲੋ

Can you help me to create a Bollinger Bands and Stochastic in 1 scripts ?

so that i can use it in my expert advisor

ਇਹ ਪੋਸਟ ਕਿੰਨੀ ਲਾਭਦਾਇਕ ਸੀ?

ਇਸ ਨੂੰ ਦਰਜਾ ਦੇਣ ਲਈ ਇੱਕ ਤਾਰੇ 'ਤੇ ਕਲਿੱਕ ਕਰੋ!

ਔਸਤ ਰੇਟਿੰਗ 0 / 5. ਵੋਟਾਂ ਦੀ ਗਿਣਤੀ: 0

ਹੁਣ ਤੱਕ ਕੋਈ ਵੋਟ ਨਹੀਂ ਹੈ! ਇਸ ਪੋਸਟ ਨੂੰ ਰੇਟ ਕਰਨ ਵਾਲੇ ਪਹਿਲੇ ਬਣੋ.

ਸਾਨੂੰ ਅਫ਼ਸੋਸ ਹੈ ਕਿ ਇਹ ਪੋਸਟ ਤੁਹਾਡੇ ਲਈ ਉਪਯੋਗੀ ਨਹੀਂ ਸੀ!

ਆਓ ਇਸ ਪੋਸਟ ਨੂੰ ਸੁਧਾਰੀਏ!

ਸਾਨੂੰ ਦੱਸੋ ਕਿ ਅਸੀਂ ਇਸ ਪੋਸਟ ਨੂੰ ਕਿਵੇਂ ਸੁਧਾਰ ਸਕਦੇ ਹਾਂ?



ਲੇਖਕ: ਫਾਰੇਕਸ ਵਿਕੀ ਟੀਮ
ਅਸੀਂ ਉੱਚ ਤਜ਼ਰਬੇਕਾਰ ਫਾਰੇਕਸ ਵਪਾਰੀਆਂ ਦੀ ਇੱਕ ਟੀਮ ਹਾਂ [2000-2023] ਜੋ ਸਾਡੀਆਂ ਸ਼ਰਤਾਂ 'ਤੇ ਜ਼ਿੰਦਗੀ ਜਿਊਣ ਲਈ ਸਮਰਪਿਤ ਹਨ. ਸਾਡਾ ਮੁੱਖ ਉਦੇਸ਼ ਵਿੱਤੀ ਸੁਤੰਤਰਤਾ ਅਤੇ ਆਜ਼ਾਦੀ ਪ੍ਰਾਪਤ ਕਰਨਾ ਹੈ, ਅਤੇ ਅਸੀਂ ਸਵੈ-ਸਿੱਖਿਆ ਦਾ ਪਿੱਛਾ ਕੀਤਾ ਹੈ ਅਤੇ ਇੱਕ ਸਵੈ-ਟਿਕਾਊ ਜੀਵਨ ਸ਼ੈਲੀ ਨੂੰ ਪ੍ਰਾਪਤ ਕਰਨ ਦੇ ਸਾਡੇ ਸਾਧਨ ਵਜੋਂ ਫੋਰੈਕਸ ਬਜ਼ਾਰ ਵਿੱਚ ਵਿਆਪਕ ਅਨੁਭਵ ਪ੍ਰਾਪਤ ਕੀਤਾ ਹੈ।.