Simple 30 Min System!

Alright, here’s what I have so far, it seems to follow the rules to the dot, but also seems to need a bit of tweaking to weed out fake-outs…

Over 2 months of backtesting, it registered 36 entries, and it seems to have lost approx. 600 pips… That said though, after weeding through the charts, it seems much of that is based on sideway movements where EMA’s just happen to barely cross each other or MACD’s just happen to barely cross over…

Here’s the what I have so far if anyone wants to tinker with it - and I’ll see if I can tighten the rules…

(Er… this is a tad awkward, but my file attachment options aren’t available… do I need a certain post count? =/)

Edit: Nvm, found it, was a browser thing…

Ok, so I’ve done a bit more tweaking to the entry conditions…

First off, what I did was set buffers for what constituted a “crossover”, whether MACD or EMA. In other words, in order to be considered a crossover, the values not only needed to cross each other, but cross each other and get a certain value over the cross.

So, for example an EMA crossover only becomes a ‘true’ crossover, if it goes up by more than 0.0002 (or whatever number) over the cross… This should weed out cross overs that barely touch each other on a horizontal pattern…

I also added the ability for similar buffers to the RSI, so you can choose whether you want >50 to actually be >50, or perhaps only if its >55…

after some backtesting using the last 2 months…

a. the MACD cross over entries seem to lose overall, regardless of any buffers I put between them…

[U]b. the EMA entries, using the buffers, substantially improved. In fact, when taking the MACD entries out of the picture, and using an EMA buffer of 0.0007, what was previously a loss of ~650 pips over those 2 months, turned into a [I][B]gain of ~300 pips[/B][/I].[/U] 15 trades made, 12 won, 3 lost.

c. RSI buffer seems to help, but only barely when using a buffer of 5 (anything more loses more than it gains)…

I’ve attached the most recent version of the EA - this one has a whole bunch of external parameters that you can change and tweak, so you can play with it yourself if you wish and see what gives you the best results…

Lots = 0.1 - Number of lots to bet
TakeProfitNum = 0.0025; - This is the take-profit number of pips as per #2 rule set - default to 25.
StopLoss = 30; - This is stop-loss, default as per rule set.
EmaBuffer = 0.0007; - Buffer used for EMA crossover entries
MacdBuffer = 0.1111; - Buffer used for MACD entries (should be set to ~0.0001-0.0005, default to 0.1111 to disable MACD entries).
MacdBufferB = 0; - Buffer used for the MACD variable for EMA entries.
RsiBuffer = 5; - Buffer used for the RSI check.
TakeProfit = 25; - Not used.
TrailingStop = 0; - Not used.

Very Nice Yoni.

I like the new ideas and how you worked them into the EA.
Because you took the time to do that, I was able to spend my time doing some backtesting.

I would suggest moving your Take Profit to 0.0040 and you will see the best results (Testing from Jan 1st 2008 - Current.)

Ah, so it is… :slight_smile:

It doesn’t seem to be as good on all the currencies though (I’ve been testing on EUR/USD, I’m assuming you have been too) - which begs the question as to whether this algorithm is simply tweaked to our test data, or just to this pair (if it’s the pair, then it’s not so bad)…

Any chance you have more data going further back than Jan. 1st? I’d set it up myself, but I’m low on disk space and don’t have much time left to try it at the moment. If you could give that a shot to see if it still gives positive returns on (say) Nov-Jan, or Sept.-Nov. etc., it’d give us an idea of how useful this may be… :slight_smile:

@MT and Yoni,
WOW. Great work guys! I cannot help you at all as far as MT4 and coding, etc but will definitely use this when it is ready and share my experiences.

Can you also make a version (or tell me what to do) to just make the EA give a signal but not do all the trading? Again, I don’t know what I am asking because I am not familiar with MT4. I am coming over from DealBook 360. It is sweet and a DREAM to use but not enough coders for it (everybody does everything for MT4)and having to keep outfoxing GFT to get another 30 day demo is too aggravating. lol

I have to say, MT4 is really clunky! Why is there no feature to just copy a chart and change the instrument? GEEEEZ!

Apparently, MT5 will not have that feature either. UGHHH!

Anyway, thanks for all your hard work and for helping keep this system (and thread) alive.

Exactly what I was wondering before I read your post. lol This definitely has to be figured out. Or, remove the auto trade features and set it up just to give you a signal and allow the trader to decide based on eyeballing the chart for yourself.

One other thing

I don’t know if this helps or matters but I found this and thought it was cool.

Expert Advisor Builder for MetaTrader 4

It is a kind of auto EA builder for MT4. Believe me, I am not sure if it is good or not, but thought it was interesting and maybe either one of you could use it.

Sorry to jump in without reading this thread. I just wanted to offer my 2 cents on the EA builder above. It’s pretty good; however, what I did was create a dummy EA with it so see how it does it’s coding, then copy/pasted the template (from the first page) into MetaEditor and save it as a template. I code what I want myself and find it almost as easy, but with more flexibility than with the editor… If you want more info, feel free to PM me or email me at <[email protected]>. Please not that this is not a commercial email address, just an email address I designated through one of my domains for Forex related emails…

Happy PIPing :smiley:

I have done month to month backtesting from Oct 2007 - Current. using 30M Timeframe on EUR/USD.

Every month shows a profit with 70% winning trades (5% give or take).
I am not at my home PC w/ the numbers but you can average approx. 90-105 pips per month.

What surprised me was that using a 15M timeframe w/ EUR/USD also showed very good results, a little lower on the win percent (about 65% give or take 5% per month) but still showing a nice profit.

I made a small change to the EA and added an adjustable MagicNumber so it can be ran on both the 30M and 15M charts for live testing. I will post that tonight for download.

I am currently backtesting for other pairs, but I am limiting the testing to pairs that are in a trending market. More results to follow and I will try to take some screen shots.

Have tried or analyzed or back tested the 25m or 20m chart time frame? I have not done anything in depth, but I have played a bit and found the 25 or 20 charts picking up the signals just a bit sooner. However, I do not know if in the long run it is a benefit.
I did not want to dip down into the 15m time frame because it is very noisy.

i actually started making my own EA for experience as i had coded b4 but never for MT4, then i read further in this thread and found the work done ! i take it sounds like it is going ok? if u guys need anything let me know ? i will test it over the weekend too…

Hayden.

i tried running strategy tester on the EA and i cant seem to get it to work, i end up with alot of errors, can sameone offer any advice ??

10:52:48 Simple 30 Min System4 inputs: Lots=0.1; TakeProfitNum=0.0025; StopLoss=30; EmaBuffer=0.0007; MacdBuffer=0.1111; MacdBufferB=0; RsiBuffer=5; TakeProfit=25; TrailingStop=0; 
10:52:48 2008.06.16 11:28  Simple 30 Min System4 EURUSD,M30: open #1 buy 0.10 EURUSD at 1.5417 sl: 1.5387 tp: 10.0000 ok
10:52:48 2008.06.16 11:28  Simple 30 Min System4 EURUSD,M30: BUY order opened : 1.5417
10:52:48 2008.06.16 13:35  Simple 30 Min System4 EURUSD,M30: close #1 buy 0.10 EURUSD at 1.5417 sl: 1.5387 tp: 10.0000 at price 1.5443
10:52:48 2008.06.17 04:16  Simple 30 Min System4 EURUSD,M30: open #2 buy 0.10 EURUSD at 1.5501 sl: 1.5471 tp: 10.0000 ok
10:52:48 2008.06.17 04:16  Simple 30 Min System4 EURUSD,M30: BUY order opened : 1.5501
10:52:48 2008.06.17 04:45  Simple 30 Min System4 EURUSD,M30: close #2 buy 0.10 EURUSD at 1.5501 sl: 1.5471 tp: 10.0000 at price 1.5528
10:52:48 2008.06.18 11:56  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:56  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:56  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:56  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:56  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:56  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:57  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:57  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:58  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:59  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:59  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:59  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:59  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:59  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:59  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:59  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:59  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130
10:52:48 2008.06.18 11:59  Simple 30 Min System4 EURUSD,M30: OrderSend error 130
10:52:48 2008.06.18 11:59  Simple 30 Min System4 EURUSD,M30: Error opening SELL order : 130

:confused:

Added option for MagicNumber if anyone else wants to live test on different charts.

going with the existing coding, it reads MagicNumber then at time it will read MagicNumber+1.
So when you set up on another chart, be sure to adjust the magic number by more than 1 point, I have been using 10, ie…
EUR/USD 30MIN = MagicNumber 1234
EUR/USD 15MIN = MagicNumber 1244
ECT, ECT, ECT.

I am not sure why it doesnt have the ex4 file, if anyone needs it let me know and i will try to figure out why it didnt save that file, but the mql works fine.

In other news
I have stated a demo account to live test this, if you are doing that too please be advised that this usually opens 1-5 trades a week, so give it time.
I will post my results with a screen shot. (I will try to do this daily)

I dont have time right now, but I can turn this into an indicator only EA w/ wave alerts as well. I will do that real quick when I have an extra hour or so.

Happy Trading and please keep giving the feedback :slight_smile:

LOL, here is the Attachment w/ Magic Number.

Simple 30 Min System5.zip (1.8 KB)

Error Code 130 means “Invalid Stops” so either your takeprofit or stoploss values are incorrect …and I see where…

sl: 1.5387 tp: 10.0000

you’re setting tp at $10.00 which is acceptable (though questionable) for a buy order, but NOT for a sell order. Probably you meant it to be price +/-10 pips? :wink:

Other error codes can be found here:

Error Codes - Appendixes - MQL4 Tutorial

Hope that helps :slight_smile:

Hello! Please, if possible, could you solve the SELL 130 bug?


Here you go, this should fix it… =)

can you guys tell me what settings ineed to test this ?? say from the point of just installing it.

Nice. thanks big time to MT and Yoni. I will try to play with this on Monday or Tuesday.

Thank you very much!