欢迎访问 外汇EA下载与MT4/MT5自动交易资源 - 聚合外汇EA、黄金EA、量化交易工具与自动化交易实战内容。
登录 注册

Divergence Trader EA - 由 Ron Thompson 很久以前制作的 (Divergence Trader EA - made long time ag)

author emer | 0 人阅读 | 0 人评论 |
来源:ForexFactory · Trading Systems · 原帖链接
原帖作者:valim1975
发布日期:First Post: Feb 22, 2018 6:33pm | Edited 7:08pm
Dear colegues,

I want to discuss here about an idea I found on the site http://www.lightpatch.com/forex , especially about Divergence Trader EA http://www.forexmt4.com/_MT4_Experts...e%20Trader.mq4 . I test this robot since January and the results on H1 are amazing! On other TFs everything was huge loss. you can look here: https://www.forexfactory.com/valim1975#acct.55

Mainly, this robot checks the divergence between SMA 88 and SMA 7 (Both with price open). The formula is

Inserted Code
DVBuySell=0.0011;
DVStayOut=0.0079
-------------
 maF1=iMA(Symbol(),0,7,0,MODE_SMA,F_Price,0);
   maS1=iMA(Symbol(),0,88,0,MODE_SMA,S_Price,0);
  dv1=(maF1-maS1);
   maF2=iMA(Symbol(),0,7,0,MODE_SMA,F_Price,1);
   maS2=iMA(Symbol(),0,88,0,MODE_SMA,S_Price,1);
   dv2=((maF1-maS1)-(maF2-maS2));
    
   return(dv1-dv2);

( I think it is a mistake, because finally (maF2-maS2) is returned , it means difference between previous values of SMA7 and SMA88 - for the people does not understand MQL)

I made a histogram that reflects the signals for trades given by the EA. I think this is the best way to visualize the situation.

I put also a modified histogram to ignore reversals, because the original may buy on falling and sell on uptrend ...at least for a while, that I don't consider a good thing.

I am testing both versions.
Attached Image (click to enlarge)
Click to Enlarge

Name: Screenshot2.png
Size: 522 KB


if I find here enthusiasts that would like to test and try other values of SMAs, or to make any changes, I am open to implement...maibe we can make it better...
It is a lot of work, and for this reason what I advice you to modify:
1.
Fast_Period=7;
Fast_Price =1;

Slow_Period=88;
Slow_Price = PRICE_OPEN;
you can try to change values of periods, and also of price applied ( see values below):
PRICE_CLOSE=0
PRICE_OPEN =1
PRICE_HIGH=2
PRICE_LOW =3
PRICE_MEDIAN=4 (Median price, (high + low)/2)
PRICE_TYPICAL=5 (Typical price, (high + low + close)/3)
PRICE_WEIGHTED 6 (Weighted close price, (high + low + close + close)/4)

DVBuySell=0.0011;
DVStayOut=0.0079;

these are values in pips of the interval of trading. these are for 4-5 digits (example EUDUSD, GBPUSD) ; for 3 digits you must cut 00 after the dot (for USDJPY will be 0.11 and 0.79 )

Look forward for your reaction. Hope we can make a good job....

原帖附件 (3)

📦 帖子附件汇总 (10)

以下是回帖中所有共享的附件(10 个,已去重)。

🔐
请登录后参与评论
注册满12小时后评论,即可解锁附件下载
立即登录