Forum

About generic code

There was a post here about generic code, making an impressive effort and attempt to solve that with template methods. The main drawback of the template methods presented here, is that a template method can not be a virtual method and thus can not be used in building a class library . Hence, I

While I was sleeping?

When did the '*' that marks that a method returns an object pointer became redundant in MQL5? It also seems the same with structs and '&' class MyClsB { }; class MyClsA { MyClsB Check(); // This was not compiled once without '*' };

test fill partial order

I need a way to test partial fill of an order, for instance place a pending order which is triggered but opens only part of the position. Any idea how to do that? Thanks

Inner classes

Is it possible to write an inner class without placing the whole inner class inside the parent class? Something like include, or writing it elsewhere as to not interfere the clarity of the outer class

Annoying visual tester issue (on history)

When changing an input parameter in the source of an ea that is run thru meta-editor mql5 visual tester for history data, the old value still persists. As an example, run this ea using visual tester run in mql5: input bool inpTest=true;

About strategies and optimization

What are the factors that make a strategy a one that does not fit all symbols but needs optimizations? And the idealistic question, what can be the factors and principles for a strategy that has a chance to fit all symbols without adjusting? If someone thought about it and wants to share and open

struct inheritance in Mql5

I'm trying to get at something like structure hierarchy with a super struct and different structures derived from it. Each derived structure has different kind of data, and there is a Pattern class that has the saving/reading methods for those different structures. And so the structure is passed

More about persistane

Up until now, all that is found in the forum and even outside the forum, about object persistence is how to serialize the object itself. While this is a basic part of the problem, it does not represent the whole problem. The questions left as I see it are: 1. What about the super classes, the

'namespace' and 'using' keywords - new?

Did not recall I saw that before, and not in docs. Anybody used it? is that some version of C++ use? Thanks

Simple script with template class fails the compiler

MT5 build 2124 the compiler enters some sort of loosing it behavior with this simple script. Any ideas? class CItem { string m_name; CItem( string name) {m_name=name;} string Name() { return (m_name);} }; template < typename T> class CCollection<T>