I only asked in order not to spend time coding something that will not work. I guess I'll have to learn on my own mistakes. Still can't believe nobody tried a similar thing thus far.
Hi Burton,
I really work hard to have the best Custom Max strategies on my EAs (like some examples I published in the forum Market).
I have tried similar ideas in the past, but in my opinion, if I change the Custom Max each trade I can easily generate a overfitted condition, i. e., unreal adjutstments relative to the size of the sample leading to unreal state.
Well, this is my vision and this may be a paradigma and for some strategies this can be a good idea.
By the way, I consider an excellent subject for reflection and study in trading systems and quantitative area in general.
Figurelli
Thank you very much, figurelli! I know what you mean by overfitted conditions, I guess I'll have to be super careful of how I award points to EAs, coz I'm still willing to give it a go: the idea eats my mind from within. I'll definitely do some forward testing as well for better reliability. At least now I know that it might just work!
Thanks again! I'll post the results if it is a success.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, MQL Community!
I have an idea of a CustomMax fitness function with its value to be adjusted on every trade. My question is: how to approach this problem?
Do I need to design my own class/struct/enum and adjust the values of its members inside the OnTrade() function of every expert that I test and then use it in OnTester(); or do I make use of a global variable instead (there isn't much difference between those 2 though); or is there a more sophisticated approach like expanding Tester Stats Enum somehow to have a new variable STAT_BURTONSVALUE (if variables of that enumeration are adjusted on every trade and don't use trading history, I'm not sure of inner workings of the tester) or OOP equivalent to that; or maybe there is a simple and elegant solution, which I lack brains to invent?
It might sound stupid to all you seasoned folks, but eh, you know what they say: there are no stupid questions! Thank you for all the help you can give me.
P.S. I need to get stats on every single trade my experts make, that is to keep track of more data than trading history can provide.
Looking forward to your replies!
Burton