Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Divergence Trader EA - made long ago by Ron Thompson (Divergence Trader EA - made lon

author EAcpu | 2 reads | 0 comments |
Dear colleagues:

I would like to discuss here an idea that I found on the website http://www.lightpatch.com/forex, specifically regarding the Divergence Trader EA http://www.forexmt4.com/_MT4_Experts...e%20Trader.mq4. I started testing this bot in January and the results with H1 are amazing! On other task forces, everything was a huge loss. You can look here: https://www.forexfactory.com/valim1975#acct.55

The robot mainly checks the divergence between SMA 88 and SMA 7 (both opened). 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 this is a bug because at the end (maF2-maS2) is returned, which means the difference between the previous values ​​of SMA7 and SMA88 - for people who don't know MQL)

I made a histogram to reflect the trading signals given by the EA. I think this is the best way to visualize the situation.

I also placed a modified histogram to ignore reversals because the original histogram would have been to buy on the dips and sell on the uptrends... at least for a while, which I don't think is a good thing.

I'm testing both versions.
Attached picture (click to enlarge)
Click to Enlarge

Name: Screenshot2.png
Size: 522 KB


If I find any enthusiasts here who want to test and try other values ​​for SMA or make any changes, I'm willing to implement... maybe we can do better...
This is a lot of work, so I suggest you modify:
1.
Fast_Period=7;
quickprice=1;

Slow_Period=88;
Slow_Price = PRICE_OPEN;
You can try changing the value of the period as well as the applied price (see values ​​below):
PRICE_CLOSE=0
Opening price=1
Maximum price=2
PRICE_LOW =3
PRICE_MEDIAN=4 (median price, (highest price + lowest price)/2)
PRICE_TYPICAL=5 (Typical price, (highest price + lowest price + closing price)/3)
PRICE_WEIGHTED 6 (weighted closing price, (highest price + lowest price + closing price + closing price)/4)

DVBuySell=0.0011;
DVStayOut=0.0079;

These are pip values ​​for trading intervals. These are 4-5 digit numbers (e.g. EUDUSD, GBPUSD); for 3 digit numbers you have to remove the 00 after the dot (0.11 and 0.79 for USDJPY)

Looking forward to your reaction. Hope we can do a good job...
Screenshot2.pngError in diversion EA.pngTesterGraph.gifwin 97%.png
Screenshot2.pngError in diversion EA.pngTesterGraph.gifwin 97%.png
Screenshot2.pngError in diversion EA.pngTesterGraph.gifwin 97%.png
Screenshot2.pngError in diversion EA.pngTesterGraph.gifwin 97%.png
Screenshot2.pngError in diversion EA.pngTesterGraph.gifwin 97%.png
Screenshot2.pngError in diversion EA.pngTesterGraph.gifwin 97%.png

Attachment to original post (2)

📦 Summary of post attachments (3)

Below are all the files (3) shared in the reply.

Verification code Refresh