Just a word of advice, risking 0.1 on a 1000 account seems to be too much (with about 50 pip SL) you are risking 5% of the account per trade ... just my 2 cents
CheckForBuy and CheckForSell
Actually, it was necessary to have this because otherwise, it can open a trade in the middle of next candle which is bad. My mistake
if you have a lot of good ideas, I can help make the coding but your idea must really be able to generate profits, don't waste my efforts on doing it.
i will try it on demo account for 1 month
Subscribed. Thanks for sharing UltronEA with the community. Very KISS approach.
1. for the code change mentioned above, if(Volume>25) return what lines numbers should it be pasted to?
Lines 30 and 39?
2. Should there be ; after return? So it would read if(Volume>25) return;
Will run forward testing on demo acct.
Here is a fixed version for those who don't know how to do it
Hello Gentleman, i am following the Ultron EA progress would like to test it live?
Since I want to test on multiple pairs, another change I made was to make the magic number user setable.
//#define MAGICMA 20131111
input double lots =0.01;
input int hour1 = 6;
input int hour2 = 21;
input int MAGICMA = 20131111;
Pawel, there's a way to contact you? I have a very old EA that i created making mistakes with a builder online... It's a disaster but inside the disaster there's something great happening. I'm not able to code (that's why i was using a builder) and so i can't isolate and refine this little magic that i see in the behaviour of the EA. Can you analyze it and help me, maybe adding the idea to your EAs?
This is a 4 years backtest on EURGBP 2014-2017 with 10000 Euro capital and 2% risk... Totally unusable at the moment because it's something out of control. Anyway it can clearly shows what i mean. A mistake has lead to some very powerful trend following situations that, even inside a completely wrong EA can give this result with a winning rate of just 28.45%.
Sorry for the off-topic, I hope we can work on it
Very nice -- thank you, Pawel.Gawron. Most of the EAs I download and test rarely perform as well as the author claims -- this one does. Given its simplicity -- really quite interesting...
input double lots =10;
input double lots =0.01;
input double lots =0.1;
Then the second version did perform better.
Also, I can confirm the current version of the EA does seem to work best with GBPUSD/H1 -- at least from back testing.
I'll experiment with MT4 optimization to see if anything interesting falls out.
add auto lot funtion please
@Pawel.Gawron -- the more I experiment with your EA the more intrigued I become.
I've uploaded a modified version of the EA here:
A list of the changes I made:
1. Modified the format a bit to make it easier for me to understand the code -- hope you don't mind.
2. Parameterized the following settings: MA periods, lot size, hours, and magic number (taken from @northwind, above)
3. Removed the hard-coded '60' so that it can be used with any time frame
Using MT4 optimizer I found I could improve statistics even further -- e.g. profit factor > 2 and Win Ratio > 60%. Also, using the proper settings, the EA can be used with other pairs and time frames.
For those who are familiar with using MT4's back tester and optimizer I would encourage you to experiment a bit -- you might be pleasantly surprised. And for those who are not familiar with how to back test or optimize, then I encourage you to spend 5 minutes and learn how to.
This '10' is adjustable in the inputs interface, and should be adjusted to the same value that the first version was for any comparisons. Infact, if you ran it the first time, changed this code then recompiled with the same name, it wouldn't even change the value for you.
@Penguin -- please learn to read.
I was responding to @CKobi's comment that the second version didn't work as well as the first. I diff'd the first and second versions and found that the hard-coded '10' was the problem.
The fact that my code snippets include 'input' is beside the point -- the second version of the EA posted by @Pawel.Gawron did not use 'input'.
Hey -- if you want to readjust the '10' to something smaller every time you run the EA then be my guest -- set it to '1000' if you like. My preference is for the default value to be something that works.
© Forex Factory