[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 240
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Is that all the difference you could see?
Maybe that's the way to do it. :
Do I understand correctly that if I optimise three bool parameters in the tester, it will run all 9 combinations of their values? i.e.
1) bool1=true, bool2=true, bool3=true,Do I understand correctly that if you optimise three bool parameters in the tester, it will run all 9 combinations of their values...?
I thought you could just put in a bool and it would run true and false variants.
I've never used optimization before, I'm getting familiar with the topic
Dear colleagues, I'm still a complete "dummy"in MQL programming, I started studying this topic quite recently. But I already started to write my first Expert Advisor, or at least I tried to.
On the 182nd page of this topic I've laid out trading criteria this EA should trade by. Please see what it says (last post on the page). I've been struggling for three weeks and I still cannot write here the part of the code responsible for the trading criteria. I've readthe tutorial chapter dedicated to this topic, but it didn't help me in this particular case.
I have written dozens of variants of this part of the code during my programming battles, but none of them works properly. Obviously I do not have enough knowledge, Icannot masterMQL that quickly .Anyway, here is one of the code variants that works, at least approximately, as I want it to.
I know the code is all crooked and slanted, and in general the baypositions and sell are mixed up. But this is the only variant of the code, when Stochastic and Envelope are trading together, without ignoring each other. At the same time, Parabolic signals are not taken into account in trading for some reason. Anyway, please don't scold me too much for such "ass-kicking", I am well aware that the code is not correct.
Please help me, please fix the code of my Expert Advisor. I am having a hard time with it. I have implemented easier strategies (Mooving + Momentum; Mooving +RSI), but this one works. Please help. Please rewrite all wrong lines to make my EA trade by those rules, that I have describedon page 182. I really need it.
P.S.: I didn't write the whole code of the Expert Advisor, because I used ready-made MQL templates.
I think I figured out what my main (and maybe not the only) mistake was. All conditions in my trading criteria are combined with logical "and". As far as I understand it, it means that all conditions must be fulfilled simultaneously. But according to the system rules it is not correct. The signals of Envelope and Stochastic should be synchronous - yes. But the Parabolic should confirm opening of a position afterreceiving signals from the Envelope and the St ochastic.It may even happen (and this is quite normal) that it confirms after 5-10 bars.
Please help me very much. I'm already exhausted with these trading criteria.
Do I understand correctly that if the tester optimises three bool parameters, it will run all 9 combinations of their values? i.e.
Two to the third power has always been eight :-)
I think I've figured out what my main (maybe not the only) mistake was. All the conditions in my trading criteria are lumped together with a logical "and". As far as I understand it, this means that all conditions must be met at the same time. But according to the system rules it is not correct. The signals of Envelope and Stochastic should be synchronous - yes. But the Parabolic should confirm opening of a position afterreceiving signals from the Envelope and the St ochastic.It may even happen (and this is quite normal) that it can confirm positions after 5-10 bars.
Please help me very much. I'm just getting exhausted with these trading criteria.
So try it, I've fixed your code right here on the page - didn't check it myself - pay attention to the comments.
All as described on page 182.
Two to the third power has always been eight :-)
Nice observation :-)))