Thanks for your EA. Which timeframe and pairs to use this EA with?
Dear korthouj,
Thanks for sharing your own created EA.
Please kindly advise the best timeframe and best pairs to run this EA with so that I can run forward-testing of this EA?
Also, with starting 1000usd, what is the starting lot size to set up for conservative and moderate trading? Does this EA contain "Martingale strategy" that increase lot size from second orders onwards?
Waiting for your reply soon.
Thanks and regards,
James
Include file
I forgot to attach the include-file that I created and that has to be put in the /experts/include directory of your metatrader platform where you want to use the EA. Do not change the name of the include-file or it will not work...
It should work like a swiss clock work..!!
If you encounter any problems, just post a reply as I check back regularly..
What I have found to work best...
Hello James,
Thank you for your reply. I have found that (after a lot of testing) it works best on 30 min timeframe and on gbpusd currency. But you can try other timeframes like 15min, 1H, 4H and also other currencies...
DO NOT use on 1min or 5min timeframe as this will produce too many false signals.
As for the money management: that's something I will provide in one of the next versions. I will work on that in the coming weeks (and I also test a lot...)
Any ideas for money management are welcome.
And with 1000 usd or eur for example I think it would be best to keep a fixed lotsize of 0.1 - 0.5 (depends on whether you want to make more and take more risk or you want to trade more safely and make a little less money...)
I have found that this EA works best without a stoploss or one around 180 pips. So if a trade goes the wrong way, it can go a little negative...
But the EA makes up the losses pretty quickly and it doesn't have a big drawdown, but something like 14% on average, which is pretty good...
(not too bad anyway in my humble opinion...)
Well, if there are any more questions, just let me know. And please share the demo/forward test results...
The MoneyManagement that is build in now...
James,
To further explain the MoneyManagement that is build in now in the EA:
You can chose a fixed lotsize or dynamic lotsize. The dynamic lotsize is calculated by taking the external variable called "equity percent" and then taking the percentage of the equity wit that number and calculating the lotsize out of that with a special function in the include-file...I won't go into that...but you can check out the source code yourself...
I attach also the template I use with the indicators. One custom indicator is used (EMA-crossover signal.mq4) for crossing MA alert and arrows in the screen...
The whole should look very nice and professional like the picture I will also post...
Reply for Pipetrader...
Hello Pipetrader,
Thank you for your reply. Although it is unclear to me what you are trying to say. You said to have a look at a piece of code. The block that closes all orders. I have already changed that block of code slightly in a new version that I will be posting soon. Also I am awear that it would be better to check the type of orders that are open first but I think that is taken care of in the functions in the include-file...This is the block of code now:
=====================================
if(TradeAllowed == false && CloseAllTheOrders ==true)
{
if (TotalOrderCount(Symbol(),MagicNumber) > 0)
{
CloseAllBuyOrders(Symbol(),MagicNumber,Slippage);
CloseAllSellOrders(Symbol(),MagicNumber,Slippage);
CloseAllBuyStopOrders(Symbol(),MagicNumber);
CloseAllSellStopOrders(Symbol(),MagicNumber);
CloseAllBuyLimitOrders(Symbol(),MagicNumber);
CloseAllSellLimitOrders(Symbol(),MagicNumber);
}
}
================================
It checks also the boolean CloseAllTheOrders which is an extern boolean so that users may set if they want it or not. If they set it to true
what happens is that if TradeAllowed == false (when times are outside the times set by the user in the timer) then all the orders will be closed that are open at the moment the timer changes from trading to not trading. So sometimes this will produce a small loss and sometimes a win when the trade was in the positive. This feature is to prevent that trades will stay open when the EA is not trading because of the timer. If a big move would occur (for example because of news) in the opposite direction of your trade you could end up with a big loss...
I am having a problem with the new version (V7 at the moment) with the timer which I am trying to extend. I have made 5 blocks of trading time and also 5 blocks of news time that a user can put in. Also, the user will be able to chose the days the EA will be (not)trading including sundays.
But for some reason the V7 keeps on putting the EA "Out of Session" so it is not trading when it should. (unless I disable the timer in the settings)
I will post this "beta" version 7 so maybe someone can have a look at it and get the bug out? Then it will be a very nice feature if I may say so myself (proud that I am..)
So can anyone with more experience in MQL4 have a look at the code please what the bug can be? (I am only programming a month or so in MQL4 so I am still in the learning curve...;-)
Reply to Pipetrader regarding the compile error...
Hello Pipetrader,
I didn't see the compile error underneath the code. The error occurs because the variable OrderCount is called , which is an output of a function in the include-file (see my other posts for the include-file which I have attached there..you need it in order for the EA to function correctly..) So it was an error from my part. I have included the right code already in the former post.
Do you have some experience with MQl4 coding? Can you have a look at the bug I encounter in version 7? It gives "Out of session" while it should be trading..timer issue...
Or can anybody else with experience have a look at it, please?
regards,
Johan
Version 8 is ready - I have solved the "out of session' -bug...
Hi to you all,
I have solved the bug that plagued version 7 with the EA going "Out of session' while it has to be in session - trading. It had to do with the compiler evaluating times. 00:00 was the problem. I think it sees for example 00:00 > 05:00 and also 00:00 < 5:00 in other words the logic is not right when comparing times with 00:00 in it and a developer (like me) wants to set that time(s) as default for a user.
Anyway, I had to make exceptions for those 00:00 times and code things a bit different. I have created 5 blocks (frames) for trading and 5 frames for news-times. The news times were a challenge itself, but, hey, I managed to do it...
I have also found that MA's 5 and 12 can do very nice...but I invite everybody reading this to optimise and forward test (and please DO post the results here to share...)
I will attach the version 8 with this post. Hope you like it...
Please note that you also need the include file I created and that I have attached in an earlier post...
P.S. I am thinking about putting in another exit strategy , like stochastic or something. Any ideas about this? Please post here...thanks..
Regards,
Johan
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have created a new MA Cross Expert based on the generic MA Cross Expert and backtests are promising. 947 profit from 1000 within 2 months for example.
My thought was that some kind of volume filter had to be build in such an EA and I did it myself. (well, I took the generic EA and added and tuned some things...;-) I added a timer for example...
I will attach the new EA in this new thread and we'll see how we go from here. Maybe there are some new ideas to improve? Additional filter ideas? (although I don't like too many filters - I like it to be actively trading...)
Also, people are welcome to backtest AND forward test and post results and/or comments here.
I am busy with version 7 already that will have more timers and will be closing trades after a trade block (or at least let the user chose if he wants to close all trades then...) I will post that version later as I am having some problems that maybe somebody can solve...But the version 5 seems to be a nice working version so far.
So let me hear from you. Do post some ideas and/or results if you like and please let me know what you think of this EA.
- Johan -