I would like to share something I have been doing for a while on how to test your own strategies with months and months worth of data in only a few minutes. (Maybe hours)
The point of this post?
I am going to show you how to create and test your own EA, and then improve upon your EA to improve its accuracy as much as possible.
Because a lot of traders, particularly beginners, like to experiment and like to try new indicators, wondering if that could help their trading. This can take a lot of time and even cost a lot of money.
More 'about stuff': We are going to make use of a website, :
This Website allows you to build your own MT4 EA, (up to a point, you are limited to 5 parameters, We'll get to that.)
In the section to build your own EA you will note that you will need a basic understanding of 'greater than' and 'less than' , this information is covered in most primary schools as well as some high schools so i'll skip over that.
Next, lets use our big fat brains and experiment
What do we want from an EA?
How about trend direction? the Trend is your friend right? Trading with the trend can improve the probability of your trades being profitable.
How about CLEAR entries and CLEAR exits? we want to know exactly when to enter and when to exit.
Some traders make use of targets and stop losses,
Some like to enter and exit when they get signals from the market.
lets not get into which is better or worse. that matters ill at this point.
lets leave it at those two things for now.
Entries and Exits
So. Trend direction? how about an EMA? This can be anything from a 50 period Moving Average to a 200 period moving average, the choice really is yours, we are here to experiment and learn without using all of our time and money. (efficiency when we test and effectiveness when we trade.)
Sweet. lets keep moving
Hmmmm. How about an RSI? CCI? MA cross over?
Okay, for this example (emphasis on the word EXAMPLE) we will use a 9 period CCI
(add this indicator to your chart, levels of 50 and -50 and set the period to 9)
Lets review at this point, add the CCI to your chart.
Add 100 EMA to your chart.
Now the rules we will have here, are :
BUY = Price over 100 EMA, and CCI crosses from below -50 to above -50
CLOSE BUY = CCI crosses below +50 from above +50
SELL = price below 100 EMA, and CCI crosses below 50 from above 50
CLOSE SELL = CCI crosses above -50 from below -50.
(These parameters are not optimal but they will do fine for the purpose of this example.)
fill this information in at the EA builder website mentioned above and remember to set the cross over points
NB!! Cross over points can be set in two parameters/rules.
CCI, Period 9, shift 0, > Value, 50
CCI, Period 9, Shift 1 < Value, 50
this instruction means that the CCI is currently greater than 50 but shifted back 1 step it is less than 50.
what this will do is make sure the EA only places trades when the CCI crosses and not just when the CCI is above or below..I repeat, using the shift 1 will cause the EA to place orders only when the CCI Crosses! that is good, that is what we want.
The criteria must be set for buy and sell trades and for close buy and close sell trades.
go to "Expert Advisor Code" and click on 'Generate'.
Next, all the mq4 coding for your EA comes up. fantastic. now you can save it and test it on your mt4 strategy tester.
that is part one done. If it worked. well done. don't forget to set your stop loss and take profit levels.
Here is the Great part. the EA you just made, can be added to.
The website says you can only set 5 parameters. yes? Yes it does.
so how do we get around that?
Lets open up that EA you just made in MetaEditor.
when you open it up you will see all the code and explanations for all your buy and sell rules etc.
so lets go to the website and make another EA,
We will set the parameters as Hour > 8 and Hour < 17
this will only allow the EA to trade between 8am and 5pm. (this can be done for any times you want to set)
now press generate. find the line of code that has the hour in it on the website and copy that into metaeditor. paste it in the open Buy and Open Sell rules and make sure all the Parenthesis balance. This is probably the trickiest part. I will do a tutorial on this at a later stage if need be.
okay. now that that is out of the way. press "Compile" on the top of your screen on metaEditor. this will analyse the code and tell you if there are any errors.
if there are Errors. It will tell you the line of code and which column the error is in and it is usually easily fixable.
if this has been done successfully. save your code, either overwrite your old one or create a new one.
Test this on your strategy tester.
This process can be repeated as many times as you wish. Unfortunately we are limited on some indicators (IE Ichimoku) but with this site we can use RSI, CCI, MACD, EMA, ADX and many others.
So now. hopefully I have helped some of you.
Please PM me for any details.
The Intent behind this post is to help people test their ideas and strategies as much as possible and as fast as possible. if the strategy does not win over the long term it probably isn't good, regardless of how much people say back tests do show true results. go ahead and forward test these strategies too (ON DEMO).
I have found that Multi Time Frame correlation improves accuracy.
Don't be afraid to test anything and everything.
(I have used 3 RSI's, 3 Different Period RSIs with entries and exits based upon the cross overs of these RSI's.
Use this with multiple time frames.. using lower time frames for entries and Re-entries to add positions)
So I emphasize! Experiment!
Ask Questions and Look For Answers!!( Questions on their own are not at all good enough)
Like I said, For any more info on what I have said, Post a Reply or even PM me.
Sometimes a system is good for entries, EXITS are difficult. pay Special attention to EXITS!
EXITS EXITS EXITS!
Good luck to all. Wish you Many Green Pips