Forum

interface as a return signature ?

On my way to an interface-based-design I was stopped again: //--- Two Basic interfaces interface iBase { double getMarketRisk( void ); //... }; interface iPosition { // simple and working: double addBaseRisk(iBase &firstObject); double getPositionAndMarketRisk( void ); //... //

no way to code interfaces ?

Hello, for some reasons I like to work with an interface. but my mt4 don't know the word (?) Same code in the documentation (https://docs.mql4.com/basis/types/classes): //--- Basic interface for describing animals interface IAnimal { //--- The methods of the interface have public access by default

Array[] as optional Parameter ?

Hello, is there a simple way for an empty default value on arrays (of objectpointers) ? signature: void funcsname(...., clsName* &ArrayOfObjectPointers[] = ???) {} // * NULL [] no surprise, this is not working. But is there a usefull "ZeroPointer" ? Thanks

overloading with the same parameter-set ?

As you can see in the code below I tried to overload the operator []. With that the polymorphism has to look at the result declaration. But it doesn't. One way to work around may be a index in one declared as double, but it's ugly. Is there a better way ? Code (not working because of: ''operator[]'

wrong results with iMaOnArray - or bad code

What can one do wrong on that simple code ? - But something is going wrong ! ArraySetAsSeries(arrValues, true); ArraySetAsSeries(bufCenterline, true); // ... newBegin = 1 ; for (i = newBegin; i >= 0 ; i--) { bufCenterline[i] = iMAOnArray(arrValues, rates_total, 13 , 0 , MODE_LWMA , i);

fighting against 'autoscale'

Situation: In a seperate window a couple of values, sometimes very different in value. Based on my user input I can reduce the visibility up to only one series. Problem: But the whole family of series still give there maximum and minimum to calculate the vertical range. Up to now I code a factor to

Special Constructor using inheritance ?

Hello, my problem: Two classes, one inherits . But, the inherited class has to be constructed with a parameter ... And I can't make it... FatherClass: class clsGauss01 clsGauss01( int Index); SonClass: class clsGaussTS01 : public clsGauss01( 0 ) But the Message: '0' - declaration without type

receiving bad values by a 'wchar_t *' out of a DLL

Hello again, the first time looking for string-Values in MT4 out of a c++ DLL takes me a day without success :-( And I've been working with the example first ! All my calculations are working but strings.... The story: c++ ---------------------------------------- I want to code with 'wstring'

call a member-function of a derived class

Hello again, sounds simple but it didn't work: 1) class A has a public- function and it's body - working ! 2) class B derives class A, function of class A is directly available and working ! 3) in my indicator is a instance of class B, the public function of Class A is visible again, tells me its

reduce the number (counting) of color-settings in the color-tab ?

Hello, Another question slows me out... I've made an indicator with several lines in the main-chart. But I need only two different colors. So it is kidding to set each used buffer one by one. This simple trick isn't working: #property indicator_width1 1 #property indicator_color1 clrFireBrick