• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 11:40pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 11:40pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Divergence and hidden Divergence 122 replies

Cable, MACD + RSI Divergence Wassssssup? 10 replies

how to make macd divergence on mt4 1 reply

EUR/USD MACD Divergence Now 3 replies

CMMDS System = Candlesticks + MACD + MA + Divergence + SAR 8 replies

  • Commercial Content
  • /
  • Reply to Thread
  • Subscribe
  • 4
Attachments: MacDiv: a MACD/market divergence auto-trader by SteveHopwood
Exit Attachments
Tags: MacDiv: a MACD/market divergence auto-trader by SteveHopwood
Cancel

MacDiv: a MACD/market divergence auto-trader by SteveHopwood

  • Post #1
  • Quote
  • First Post: Edited 6:37am Jun 17, 2011 5:46am | Edited 6:37am
  •  SteveHopwood
  • | Commercial Member | Joined Apr 2007 | 8,331 Posts
SERIOUS WARNING

 

  1. Most Forex traders lose all their money.
  2. Using the robot posted here in trading Forex does not guarantee success.
  3. Trading this robot could lead to serious financial loss.
  4. Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
  5. This is not a set-and-forget ea; there is no such thing and anyone who tries to claim there is, is either stupid or lying. This ea requires frequent manual intervention.


DO NOT TRADE THIS EA ON LIVE ACCOUNTS. It is an experimental robot and I have no idea whether it can be successful.

Sgt.forex pointed me to the attached indicator and asked me to code an ea to trade it. When the indi spots a divergence between MACD and the market, it shows a signal arrow on the chart. The signals are generated at the start of a new candle, and are shown two candles back.

The FX5 MACD Divergence indicator goes in your Indicator folder and must be there for the EA to work. You do not need it on your chart; its presence will confirm for you that the EA is working correctly.

MacDiv looks for a signal at the opening of each candle, so its cpu footfall is light; cpu use will increase if there are open trades and you are using the management features. There are the usual trade management/Recovery/balance/margin filters etc. I have included the full trend-detection module. The default inputs are based on the results of an EU 1 year H1 backtest and are not recommendations. CloseOnOppositeSignal tells MacDiv to close open trades when the indi generates a signal to trade in the opposite direction.

In fact, nothing here constitutes a recommendation; I have no idea whether this will be successful or not. I coded the bot because I was asked to and it was easy to do.

So, over to you back/forward testers. Backtesters especially, you will really appreciate MaryJane's InputResizer - you will need mt4ticker over the weekend to use it.

Have fun guys.



Useful utilities/EA's/scripts

 

  1. MaryJane has posted a fabulous utility to allow us to resize EA input windows: http://www.forexfactory.com/showthread.php?t=299017
  2. Multi purpose trade manager: http://www.forexfactory.com/showthread.php?t=89371
  3. Account equity analyser: http://www.forexfactory.com/showthre...16#post4693716




Most promising trading EA's

 

  1. The Beast: http://www.forexfactory.com/showthre...=1#post4135863
  2. Pippo: http://www.forexfactory.com/showthre...96#post4675196
  3. Reversi: http://www.forexfactory.com/showthread.php?t=294255
  4. Ibuks: http://www.forexfactory.com/showthre...88#post4656888
  5. FTLR: http://www.forexfactory.com/showthre...85#post3831885




_________________________________________________________________________________
Posting restrictions
I have restricted the ability to post in this thread to: traders with at least 1 voucher; and traders on my 'buddy' list. I have done this because I do not want the thread cluttered with 'newbie' questions about the basics. New/inexperienced traders, this is not intended as a direct insult. What I want here is discussion with traders who fully understand what it is they are doing; when you newbs have been around a while, you will come to understand what a difference experience makes to the posts a member writes and shudder at the recollection of some of the questions you asked. I do. http://cdn.forexfactory.com/images/s..._the_floor.gif Go to your profile page; there is a link to the FF page that describes the voucher process.

Do not attempt to get around this by sending me pm's asking for help with your basic problems. Doing so will earn you an automatic ban from all of my threads.

I have set up a partner to my restricted threads at http://www.forexfactory.com/showthre...66#post3948666
There, you can post the questions that you cannot post here, about anything you need to know. Someone with the knowledge and experience you need will answer.

Traders/coders with experience who have not yet been vouched for, can get around this restriction be being added to my 'buddy' list; all you have to do is pm me to ask me to do this.

Attached File(s)
File Type: mq4 FX5_MACD_Divergence_V1.1.mq4   12 KB | 3,119 downloads
File Type: mq4 MacDiv auto trading robot by Steve Hopwood.mq4   80 KB | 3,600 downloads
  • Post #2
  • Quote
  • Jun 17, 2011 6:05am Jun 17, 2011 6:05am
  •  Sgt.forex
  • | Joined Jan 2011 | Status: Member | 94 Posts
Nice!

Thank you Steve.
 
 
  • Post #3
  • Quote
  • Jun 20, 2011 1:15pm Jun 20, 2011 1:15pm
  •  paulbt38
  • | Joined Mar 2010 | Status: Member | 244 Posts
Steve

Recovery doesn't seem to be working as normal on this one as each trade starts of with a tp of 100 pips and is never modified to breakeven. Mind you when the trade does turn in our favour the profits look great.

Not sure why this thread has been so quiet but hope you get to look at this.

Regards

Paul
Attached Image (click to enlarge)
Click to Enlarge

Name: recovery.jpg
Size: 103 KB
 
 
  • Post #4
  • Quote
  • Jun 20, 2011 1:28pm Jun 20, 2011 1:28pm
  •  esquire
  • | Joined Apr 2011 | Status: Member | 77 Posts
paulbt38, i think you shouldn't use recovery with this strategy. It's not designed for these kind of systems where you are trading everywhere in the market. Recovery is usefll when trading the boundries of the markets, where the odds of return are in your favour. In here it just can go 100's of pips against you.

I've added a newer version with two very minor changes which improve the performance a lot:
- SL is set to the last 5 bar high/low. I think trades here are either perfect winners where you sell at the very best top of the market, or the trade is rubbish & the market is going to continue a couple of 100 pips against your divergence.
- Added maxtradesallowed = 1, which will make sure no multiple signals of almost the same price are traded.

Things i'm still thinking about:
- Way to take profit. Static profit clearly isn't going to do the trick.
- Way to prevent the bot from taking multiple signals where the previous trade just failed, and buying/selling at almost the exact same price.
- Way to deal with the losers. Like i said, 90% of the signals are either terrible losers or incredible winners (50-50 i think), so there should be a way to change some of the losers into winners. Haven't figured out how though..

Credits for all of this to steve ofcourse, making ea's understandable and tradable for mankind!
Attached File(s)
File Type: mq4 MacDiv.mq4   80 KB | 2,210 downloads
 
 
  • Post #5
  • Quote
  • Jun 20, 2011 1:44pm Jun 20, 2011 1:44pm
  •  paulbt38
  • | Joined Mar 2010 | Status: Member | 244 Posts
esquire

thanks for the comments. I have had some good backtests using the rsi trend filter and no recovery. Small amounts of profit but then small losses as well. I had just thought I would try recovery to see what difference it made since it was coded.

I will run some tests this week using your own version.

Paul
 
 
  • Post #6
  • Quote
  • Jun 20, 2011 1:53pm Jun 20, 2011 1:53pm
  •  Sgt.forex
  • | Joined Jan 2011 | Status: Member | 94 Posts
hi, i also think the recovery is not the way to go with this strategy!
setting the SL to the low of the last 5 candles is a nice idea.
i also thought about a good way of taking the profits.
maybe if we use the average trend lenght per pair...!?

cheers
 
 
  • Post #7
  • Quote
  • Jun 20, 2011 2:24pm Jun 20, 2011 2:24pm
  •  esquire
  • | Joined Apr 2011 | Status: Member | 77 Posts
Quoting Sgt.forex
Disliked
hi, i also think the recovery is not the way to go with this strategy!
setting the SL to the low of the last 5 candles is a nice idea.
i also thought about a good way of taking the profits.
maybe if we use the average trend lenght per pair...!?

cheers
Ignored
Don't know if that makes any sense, it's for one incredibly hard to measure (what's a trend and what's not), and i think all trends are more or less independent.

Currently still like the "close half at x pips & let the other half run" idea. Yet the "let the other half run" is incredibly difficult to close at a good point, trailing it tight (with anything, normal trailingstop, ma ts etc.) will close the trade too soon and leave 100's of pips on the table, while a slow trail allows the market to pull back way to much, potentially eat 50-60% of your profit.

Gonna break my head on this in some weeks, for now i have to be brave and do some studiying

Btw, did you trade this live? Maybe some inside tips?
 
 
  • Post #8
  • Quote
  • Last Post: Jun 22, 2011 3:03am Jun 22, 2011 3:03am
  •  Sgt.forex
  • | Joined Jan 2011 | Status: Member | 94 Posts
Quoting esquire
Disliked
Gonna break my head on this in some weeks, for now i have to be brave and do some studiying

Btw, did you trade this live? Maybe some inside tips?
Ignored
Actually i am trying to find more suitable TP and SL settings. At the moment i got TP=25, SL=35. It is performing a little better.
I also traded it live but without a fixed SL and the entries were more half indicator and half my view of the markets. But i was profitable...
Had to stop trading it live because i got less time to do so. My job needs a little more attention then trading xD
 
 
  • Commercial Content
  • /
  • MacDiv: a MACD/market divergence auto-trader by SteveHopwood
  • Reply to Thread
0 traders viewing now
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023