What does
Pip Cop do?

 

Copy trades to multiple MetaTrader accounts with
Forex Copier
 
Rock-Solid Forex VPS
Desktops for Traders.
Get started today!

Go Back   Home > Forums > General forums > Robot / EA Programming

» Welcome to the Pip Cop - Forex Robot Reviews and forums.
Be smart! Read the Review FAQ or you WILL lose money!
If you enjoy the site, please let me know by registering or donating! Thanks! -- PipCop
P.S. This message is hidden if you register!
Robot / EA Programming Forex EA & Robot programming discussions

Reply
 
Thread Tools Display Modes
Old 2011-04-15, 01:11 PM   #1
rsmereka
Site Supporter
 
rsmereka's Avatar
 
Posts: 3,405
My Trading Journal


Trading Live with:
FX Monetizer
Default The Journey to RB51362

Please join me on the journey to building an EA from an existing manual system.

The original manual system is Rob Booker's 5/13/62 which is a manual system based (in part on 3 EMA's, 5 (fast), 13 (medium) and 62 (slow). Here are the rules in brief:

- 5 crosses 13
- 13 crosses 62
- 13 at least 30-40 pips from 62
- wait for price to retrace back to 62
- open trade with 25 pips SL
- TP at previous support/resistance
- TS of 20

The complete rules (and comic relief) is here.

When I started to plan building the EA, I realized that I don't know how to program a triple MA cross in MQL4 so I went hunting for examples. I came across the Three Moving Averages EA at tradingsystemforex.com. This is a completely free EA (you have to register however). This EA is from 2008 and it is not aware of 5-decimal brokers (you have to multiply the SL, TP, TS by 10. It is also not ECN aware.

My plan is to implement the rules of Rob Booker's 5/13/62 one at a time and backtesting to make sure there are no bugs. I will use the triple MA cross from the Three Moving Averages EA.

I call this new EA RB51362 (creative eh?).

My first step is to clean up the original source code. It's a mess with no proper indentation and everything is jam-packed together and run some backtests just testing the straight 5/13/62 EMA cross with a 25 pip SL. I am running an optimization right now to determine the best TP.

More later,

Update 20110418 - Attached version .01-2011.04.18, License is GPL V2
Rick
Attached Files
File Type: mq4 RB51362-.01-2011.04.18.mq4 (8.9 KB, 93 views)
__________________


Last edited by rsmereka; 2011-04-19 at 02:23 PM. Reason: Language Changes
rsmereka is offline   Reply With Quote
ForexVPS was founded with a single goal in mind, to provide Rock-Solid Forex VPS Desktops for Traders. Our premium hardware and networks give traders 24 hour access to their VPS from anywhere in the world allowing them to access and run their trading platform 24 hours a day, 7 days a week 365 days a year.
Get started today!
Old 2011-04-18, 04:09 PM   #2
rsmereka
Site Supporter
 
rsmereka's Avatar
 
Posts: 3,405
My Trading Journal


Trading Live with:
FX Monetizer
Default Initial EA Done

The EA with basic logic is done. I have attached the EA to post 1 of this thread. This version has MM or fixed lots (MM is turned on by specifying a risk greater than zero). EA is aware of five decimal brokers but not capable of running on an ECN broker.

The SL and TP are fixed at the moment. Attached is a backtest from Jan 3, 2011 to Apr 18, 2011 at risk 2% (0.02) with a SL of 25 and a TP of 98 (that's a risk:reward just shy of 1:4). The winning rate is not even 30% but with that risk:reward, the roi is 242.74% in less than four months.

This trading strategy can work on any timeframe. I just picked M30.

The next step is to make the SL and TP dynamic based on levels of support/resistance.

I also ran a backtest from Jan 3, 2000 to April 18, 2011 and the EA blew the account. It seems clear that the 5/13/62 logic needs a dynamic TP and SL.

Rick
Attached Files
File Type: pdf RB51362-M30-20110103-20110418-risk2.pdf (79.7 KB, 72 views)
__________________


Last edited by rsmereka; 2011-04-19 at 02:26 PM. Reason: More Stuff
rsmereka is offline   Reply With Quote
Old 2012-02-11, 07:25 PM   #3
Stormy
New user
 
Posts: 4

Default Any additional results?

I have been a fan of the 5-13-62 for some time - do you have any updates or additional results on this EA?
Stormy is offline   Reply With Quote
Old 2012-02-12, 10:46 AM   #4
rsmereka
Site Supporter
 
rsmereka's Avatar
 
Posts: 3,405
My Trading Journal


Trading Live with:
FX Monetizer
Default

Quote:
Originally Posted by Stormy View Post
I have been a fan of the 5-13-62 for some time - do you have any updates or additional results on this EA?
Hi and Welcome,

No further updates. I lost interest in this system and EA.

Rick
__________________

rsmereka is offline   Reply With Quote
Old 2012-02-12, 08:29 PM   #5
Stormy
New user
 
Posts: 4

Default

rsmereka -

Thanks for the reply and the welcome.

I am studying your EA because when I look at this method and the charts it looks like the results could be inproved if you entered when the fast and medium both cross the slow MA. But close the position as soon as the fast crosses the medium and don't wait for the slow.

Do you know how this EA could be modified for this condition?
Stormy is offline   Reply With Quote
Old 2012-02-13, 11:41 AM   #6
rsmereka
Site Supporter
 
rsmereka's Avatar
 
Posts: 3,405
My Trading Journal


Trading Live with:
FX Monetizer
Default

Quote:
Originally Posted by Stormy View Post
rsmereka -

Thanks for the reply and the welcome.

I am studying your EA because when I look at this method and the charts it looks like the results could be inproved if you entered when the fast and medium both cross the slow MA. But close the position as soon as the fast crosses the medium and don't wait for the slow.

Do you know how this EA could be modified for this condition?
Yes I do,

It's too technical to explain here. Unless you know MQL4, you would not understand.

My original EA has a GPL license which means that it's ok to modify it and produce offspring as long as the offspring are also GPL.

If you are interested in a strategy other than the original, go ahead.

Rick
__________________

rsmereka is offline   Reply With Quote
Old 2012-02-13, 02:19 PM   #7
Stormy
New user
 
Posts: 4

Default

Rick -

I'm okay with MQL4 - I've been studying it for a few months. I really liked you code because it is clean and easy to follow I'm just not sure exactly how to implement this closing function for just the cross of the MAF and the MAM but not the MAS.

Thanks for any guidance you can provide.

Stormy
Stormy is offline   Reply With Quote
Old 2012-02-14, 11:17 AM   #8
rsmereka
Site Supporter
 
rsmereka's Avatar
 
Posts: 3,405
My Trading Journal


Trading Live with:
FX Monetizer
Default

Quote:
Originally Posted by Stormy View Post
Rick -

I'm okay with MQL4 - I've been studying it for a few months. I really liked you code because it is clean and easy to follow I'm just not sure exactly how to implement this closing function for just the cross of the MAF and the MAM but not the MAS.

Thanks for any guidance you can provide.

Stormy
I got tons of other projects that need my attention,

I wrote this code in Apr of 2011, almost a year ago. It would take me too long to acclimate.

Sorry, I don't have time or the inclination (as previously mentioned).

If you know MQL4, you do it and post it here.

Rick
__________________

rsmereka is offline   Reply With Quote
Old 2012-02-14, 11:47 AM   #9
Stormy
New user
 
Posts: 4

Default

Thanks Rick - I understand - I'll post it and the results when I get it done.
Stormy is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Forum Jump



All times are GMT -5. The time now is 05:46 PM.

Powered by vBulletin ®
Site content and design Copyright © 2013 PipCop.com.
Site designed, hosted, and maintained by One Web Ave
Template by vBSkinworks.