Errors, bugs, questions - page 2144

 
How can I make it so that when the custom character's History is changed, it is tucked away by the Agent, rather than being taken by the Agent from its irrelevant repository?
 
Is this a language bug?
struct STRUCT
{
  template <typename T>
  void operator =( const T ) const {}

  template <typename T>
  void operator =( const T &Value ) const {} // Ошибка исчезает, если убрать любой const
};

void OnStart()
{
  STRUCT a;
  const int i = 0;
  
  a = i; // Ошибка: 'operator=' - object required
}
 
fxsaber:
Is it a bug in the language?

In this form C++ also gives error E2015

And if you write it this way:

template<typename T> void f( T& ) {}
template<typename T> void f( T  ) {}
void OnStart()
{
    const int i = 0;
    f( i );
}

MQL compiles without errors, but C++ reports error E2015

 

Is it true that SymbolInfoTick in MT4/5 indicators does not return the tick that triggered the Calculate event?

If so, it's not quite clear what the tick collectors via indicators are based on?

 
fxsaber:

Is it true that SymbolInfoTick in MT4/5 indicators does not return the tick that triggered the Calculate event?

As a rule, it is the same tick.

You are formulating your questions in a very strange way.

- Any question can be answered yes or no!

- How long ago did you stop drinking cognac in the morning? Answer now, yes or no?

(c) Astrid Lindgren

 
Slava:

This is usually the same tick.

If a pack of three ticks arrives, the Calculate event will be called three times, but SymbolInfoTick will return the latest tick on each of these three calls. I.e. the so-called collection of ticks without passing through indicators is questionable, to put it mildly.

 
Why after setting CustomSymbolSetDouble(symbol, SYMBOL_VOLUME_MIN, 0.00035) and CustomSymbolSetDouble(symbol, SYMBOL_VOLUME_STEP, 0.00035) function SymbolInfoDouble(symbol, SYMBOL_VOLUME_MIN) returns 0.0003 and SymbolInfoDouble(symbol, SYMBOL_VOLUME_STEP) returns 0.01?
 

A very unpleasant bug with custom characters. The tick history of the custom characters can completely disappear.

I've encountered this a few times already. Not doing any custom entries. Only working on reading ticks. And at a certain moment, all of a sudden, the entire history disappears. CopyTicks returns zeros without errors. Using GUI tools, the same thing. tkc becomes 1 Kb, while it used to be several million ticks.

So I can't trust MT5 to store my ticks, because it may delete them during one of my reads.

 
Ivan Titov:
Why after setting CustomSymbolSetDouble(symbol, SYMBOL_VOLUME_MIN, 0.00035) and CustomSymbolSetDouble(symbol, SYMBOL_VOLUME_STEP, 0.00035) function SymbolInfoDouble(symbol, SYMBOL_VOLUME_MIN) returns 0.0003 and SymbolInfoDouble(symbol, SYMBOL_VOLUME_STEP) returns 0.01?

Even with the GUI, you can't set these values


 
A100:

In this form, C++ also gives error E2015

E2015 is an ambiguity.

And in the fxsaber example it looks like there is a non-constant operator generated by the compiler (with an object in parameters) and it is selected.

This is because the assignment operator should not be constant

(imho)

Reason: