Errors, bugs, questions - page 2017

 
Alexey Navoykov:

The order in which operands are executed in C++ is not regulated, so it's up to the individual compiler.

The order in which operands are evaluated cannot be regulated because it depends on the context

#ifdef __MQL__
class A { public:
        A *operator +( A* ) { return NULL; }
};
template<typename T>
T f( int i ) { Print( __FUNCTION__, ":", i ); return NULL; }
void OnStart()
{
        int i = f<int>(1) + f<int>(2) + f<int>(3); //слева направо 1-2-3
        A  *a = f<A* >(1) + f<A* >(2) + f<A* >(3); //справа налево 3-2-1
}

#endif

If it is strictly regulated, efficiency will be lost in one of 2 cases
 
A100:

The order in which the operands are calculated cannot be regulated because it depends on the context

If it is strictly regulated - in one of 2 cases efficiency will be lost

Great example!

I can't understand why an "invalid pointer access" error occurs during execution. I think everything must be clear. Win7x64.

 
fxsaber:

I can't figure out why an "invalid pointer access" error occurs during execution. Seems like everything should be clean. Win7x64.

32bit is good. For 64bit it needs some extra work:

class A { public:
        A *operator +( A *a ) { return a; }
};
static A a;
int f( int i ) { Print( __FUNCTION__, ":", i ); return 0;  }
A  *g( int i ) { Print( __FUNCTION__, ":", i ); return &a; }
void OnStart()
{
        int i = f(1) + f(2) + f(3); //слева направо 1-2-3
        A  *a = g(1) + g(2) + g(3); //справа налево 3-2-1
}
 
A100:

32bit rules. For 64, you need to do some extra work.

The optimiser seems to be getting wise.

 
fxsaber:

IndicatorParameters (+ IndicatorRelease)


I forgot to explain. I need mql4. I also don't have a handle. The idea is that the user will install the indicators on the chart himself, and the program should determine their number, name and parameters used (this is not a spy program :) it's for the user)

 
Aleksandr Teleguz:

I forgot to clarify. I need mql4. Yes and I don't have a handle. The idea is that the user will install the indicators on the chart himself, and the program should determine their number, name and parameters used (this is not a spy program :) it's for the user)

ChartSaveTemplate + parsing. Here is an MT5 example for an EA. By analogy, convert to MT4 indicators.

 
Comments not related to this topic have been moved to "Questions from MQL4 MT4 MetaTrader 4 beginners".
 
Comments not related to this topic have been moved to "Questions from MQL4 MT4 MetaTrader 4 beginners".
 

A question that keeps bugging the developers:

Why aren't there features like

datetime OrderDateModified(ticket)){} 		//последнее изменение на стороне брокера любого из параметров ордера
datetime OrdersTotalLastModified(){}		//последнее изменение на стороне брокера среди всех не закрытых ордеров MODE_TRADES на счете

It would increase productivity, so many unnecessary requests/operations could be eliminated and time could be saved on order search mess

What exactly is the problem?

 

There is no description of the ENUM_SYMBOL_ORDER_GTC_MODE enumeration in the editor's help