MQL4 - automated forex trading   /  

Code Base

Code Base  Expert Advisors  Divergence Trader To post a new code, please log in or register

Library of programs in the new MQL5
Prepare for the Championship

This Expert Advisor is for
MetaTrader 4
Download MT 4 - 5.5 Mb

Mobile trading!
Buy a license and be mobile in your trading!

Name:
Divergence Trader [ ru | cn ]
Author: Collector (2008.09.22 09:26)
Rating: 8
Downloaded: 5753
Download:
 Divergence Trader.mq4 (17.1 Kb) View

Expert Advisor Divergence Trader.



Test results:









8 comments  To post a new comment, please log in or register
Carabobo wrote:

This robot is very interesting...but I have a doubt about then function divergence().
What's meaning in the function

maF1 = iMA(Symbol(), 0, F_Period, 0, MODE_SMA, F_Price, mypos);
maS1 = iMA(Symbol(), 0, S_Period, 0, MODE_SMA, S_Price, mypos);
dv1 = (maF1 - maS1);

maF2 = iMA(Symbol(), 0, F_Period, 0, MODE_SMA, F_Price, mypos + 1);
maS2 = iMA(Symbol(), 0, S_Period, 0, MODE_SMA, S_Price, mypos + 1);
dv2 = ((maF1 - maS1) - (maF2 - maS2));
//----
return(dv1 - dv2);

this function always returns (maF2 - maS2). in fact dv1-dv2=(maF1 - maS1)-((maF1 - maS1) - (maF2 - maS2))=(maF2 - maS2)
If isn't an error, why calculate maF1 and maS1? In this way maF1 and maS1 never play a role in trading strategy.
..or I'm wrong?

Thanks

I think that's a mistake. the author maybe want to get a indicator like AO - REF(AO,1)
REF(indicator,N) means the indicdator in N days before
I test this EA in some markets in different frames,short always win,but long bring big loss
but the result is so exciting
maybe because it has a good exit module

27.04.2010 18:51 monarch

This robot is very interesting...but I have a doubt about then function divergence().
What's meaning in the function

maF1 = iMA(Symbol(), 0, F_Period, 0, MODE_SMA, F_Price, mypos);
maS1 = iMA(Symbol(), 0, S_Period, 0, MODE_SMA, S_Price, mypos);
dv1 = (maF1 - maS1);

maF2 = iMA(Symbol(), 0, F_Period, 0, MODE_SMA, F_Price, mypos + 1);
maS2 = iMA(Symbol(), 0, S_Period, 0, MODE_SMA, S_Price, mypos + 1);
dv2 = ((maF1 - maS1) - (maF2 - maS2));
//----
return(dv1 - dv2);

this function always returns (maF2 - maS2). in fact dv1-dv2=(maF1 - maS1)-((maF1 - maS1) - (maF2 - maS2))=(maF2 - maS2)
If isn't an error, why calculate maF1 and maS1? In this way maF1 and maS1 never play a role in trading strategy.
..or I'm wrong?

Thanks

27.03.2010 15:11 Carabobo
bagoomba wrote:

If I'm reading the code right, this isn't really a divergence trade as-is. BUT YOU CAN'T ARGUE WITH RESULTS!!

I took this and did some optimization. I'm working with a smaller account and a broker that does 5-digit pricing, but I'm getting 2.38 profit factor. I'm going to do a walk-forward test on my demo account, but this is really impressive!

Strategy Tester Report

How did you run this optimization...with what settings?
26.01.2010 10:41 dogbreath
bagoomba wrote:

If I'm reading the code right, this isn't really a divergence trade as-is. BUT YOU CAN'T ARGUE WITH RESULTS!!

I took this and did some optimization. I'm working with a smaller account and a broker that does 5-digit pricing, but I'm getting 2.38 profit factor. I'm going to do a walk-forward test on my demo account, but this is really impressive!


Strategy Tester Report


bagoomba, is it possible to run this on a $2800 mini acct with 1:200 leverage on a 5 min chart?

Thank you for your help. Is it possible to email me? If so, sanyhuis@hotmail.com

16.06.2009 11:25 sanyhuis

attention!!! this e/a is being sold as a clickbank product under the title of pipsleader, the only difference is a recommendation to run it on a 1 hour frame, run divergance trader and pipsleader on a 5 minute frame and the results are identical, even the parameter box is the same. I hope they haven`t ripped you off too badly, you deserve all their clickbank profits for your work.

04.06.2009 21:56 robmorton

If I'm reading the code right, this isn't really a divergence trade as-is. BUT YOU CAN'T ARGUE WITH RESULTS!!

I took this and did some optimization. I'm working with a smaller account and a broker that does 5-digit pricing, but I'm getting 2.38 profit factor. I'm going to do a walk-forward test on my demo account, but this is really impressive!


Strategy Tester Report

Divergence Trader
InterbankFX-Demo Accounts (Build 223)

SymbolEURUSDm (Euro vs US Dollar)
Period5 Minutes (M5) 2009.04.17 00:00 - 2009.04.23 23:55 (2009.04.17 - 2009.04.24)
ModelEvery tick (the most precise method based on all available least timeframes)
ParametersLots=0.1; Slippage=2; Fast_Period=7; Fast_Price=1; Slow_Period=88; Slow_Price=1; DVBuySell=0.0011; DVStayOut=0.0079; ProfitMade=510; LossLimit=690; TrailStop=410; PLBreakEven=970; StartHour=0; StopHour=24; BasketProfit=75; BasketLoss=9999; FileData=false;

Bars in test1809Ticks modelled81509Modelling quality90.00%
Mismatched charts errors0




Initial deposit250.00



Total net profit918.17Gross profit1583.82Gross loss-665.65
Profit factor2.38Expected payoff1.11

Absolute drawdown18.95Maximal drawdown300.70 (23.74%)Relative drawdown37.08% (137.06)

Total trades827Short positions (won %)450 (84.44%)Long positions (won %)377 (79.58%)

Profit trades (% of total)680 (82.22%)Loss trades (% of total)147 (17.78%)
Largestprofit trade5.17loss trade-6.97
Averageprofit trade2.33loss trade-4.53
Maximumconsecutive wins (profit in money)163 (298.45)consecutive losses (loss in money)49 (-82.43)
Maximalconsecutive profit (count of wins)298.45 (163)consecutive loss (count of losses)-97.24 (14)
Averageconsecutive wins30consecutive losses6


25.04.2009 08:42 bagoomba

amazing

19.11.2008 21:45 Denoiser
За какой период?
23.09.2008 21:01 a-l-e-x