Thank you for answering (correctly) and the advice; you are right; it should check. Will add....
EDIT: Okay, done... added this line to init():
I just want to say, I find your code easier to read and well organized compared to most that I see. You use some good techniques. I have a few ideas to offer, but I want to wait until the next version is done.
Trades close their self
On FXDD (demo) I have Synergy Basic 2 on GBP/JPY and GBP/USD and they both open and close their own trades. But when I do a manual trade and set stops and limits, a few minutes later the trades will close without hitting stop or limit. Sometimes in profit sometimes at loss. Question; Has anyone had this problem? All I can figure is the EA is closing the trades Is that possible?
That's right Tall, this EA is a test model for the signals and intended only for solo flying. It has no magic numbers to distinguish its own trades from any you may enter manually.
Another test version on its way shortly
That must explain the duplicates. What is the best fix for the error messages and no trading action? Should I reinstall? Do you have a bug-free version to upload?
As for your earlier logs, pcontour answered: your lots level was invalid. If SplitLots was active (default) and lots were still 0.1 (default), it would have tried to open two trades at 0.05 lots. Now you said you were on FXDD, and I thought that 0.05 lots was allowed there. But what I would do if I were you, until I get the next version done, it just reset everything, and set lots to 0.2 instead, and see if that does not alleviate the errors.
I have much to do in testing the current version, plus I need to finish the instruction manual, but I am trying hard to get that done by tomorrow, so that is when you shall see (goddess willing!), a new version posted on #65.
This will allow nondisclosure to better backtest, and will give you all the tools you need to experiment with it. Because I dare say, after that, I may not have much time to do further development for a while (too many things piling up and will probably have to take a paid contract to make some money).
Thank you, I try. Most others code I will not even try to read before running through a code formatter. Yes, I suspect that some of the ideas you may have are already done in the work in progress.
I am not sure what you mean by Synergy Basic 2...? Are you even talking about my EA? My EA is the one in post #65 and is always just called SynergyEA.
If you are, I am not sure why it would happen. I just took a look and there is only one function in the code where a close takes place, and that function sets the magic number. The only other way it can close is by the trailing stop, but that checks magic number too.
Were you using a trail? You might try using a different MagicSeed setting (although it should not matter).
Autumn: Incorrect, as touched on above. All my EAs use MagicNumbers, and it is calculated by taking the MagicSeed setting, and adding an offset for the pair and timeframe. So the only way to have the same magic number on two charts is if they are running side by side on the same account, same EA, same pair, same TF.
Too much milk at the bar of teats last night Derk? I think you may be working too hard. ChimeraSimple is the test EA that I uploaded, and it does not have magic numbers.
Get some rest and come out Singin in the Rain,
Now I'm getting confused. The version I uploaded was SynergyBasic2.
A new one is now in the works.
Announcement Of New Version
No --too little milk! (Never enough H&B to go around)
ANNOUNCING... the new version of the SynergyEA; accessible on post #65.
This version has been coded to run faster on backtesting / optimization, so hopefully that helps. It has a few other changes:
- Instruction manual, so now you all can read over than and intelligently experiment to your heart's content.
- Use of the Chaiken indicator has been removed as I never saw any indication that it helped.
- New option: "UnlessVolWidthGT"
- New option: "ReqEntryNearPAC" (defaulted on; I suspect this is a good one)
- New option: "OppPACforInitSL"
- Updated option: "UseHTF_Trend"
I will try to keep relatively current on this thread, but it is likely I will not be able to spend much time on this over the coming weeks. Therefore I wanted to get this version done and [presumably] working so folks here can back and forward test, and come up with ideas for improvement.
I can tell you right now, the weak point of this EA, like many, is that it can get stuck in loser after loser when the market ranges. I still prefer the GBPJPY H1 chart for trading, and some of the defaults are set up for that, but I encourage y'all to try other things. Now that you have the instructions, you can make appropriate settings.
Best to all and happy solstice!
Post #65 https://www.mql5.com/en/forum/177803/page5
Please enable the necessary setting in your browser, otherwise you will not be able to log in.