Thanks Peter for posting this , I find your approach "enlightening" and I was very interested to try. Unfortunately, I am unable to make it work, I am on Mql5. I have tried just saving your test as mq5 but there are functions that need replacing for Mql5. I am happy to work through them, but I have an issue when compiling Functions.mqh I get the message ';' - open parenthesis expected. this is at static int Numberofbars = Bars;
If I add Parenthesis ( Bars()) , I then get 'Bars' - no one of the overloads can be applied to the function call. Unfortunately, I don't understand classes enough to see why that might be. Possibly it only works with MQL4? . Maybe I need to preload the variable as it compiles without the IsNewCandle() check .
Either way I appreciate your posting as it has given me some direction as to what I need to learn. Regards

- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Probability and Signals class:
With these classes you can create and test your signals runtime.
Author: Peter Mueller