MetaTrader 5 Platform build 5326: Improvements and fixes - page 8

 

Forum on trading, automated trading systems and testing trading strategies

MetaTrader 5 Platform build 5326: Improvements and fixes

Dominik Egert, 2025.10.12 11:34

retval = SocketTlsSend(NULL, uc_data, data_size);                       // Not checking third parameter correctly??
void Func1( uint ) {}
void Func2( int ) {}

void OnStart()
{
  int i = -1;
  uint j = -1;
  
  Func1(i); // OK
  Func2(j); // OK
}
 
fxsaber #:
Yes,that's actually fine, but it will fail on a reference parameter.
 
Dominik Egert #:
Yes,that's actually fine, but it will fail on a reference parameter.
And that's right.
 
fxsaber #:
And that's right.
Yes. Strict type checking. I like it.
 

Is this considered a bug??


 

Since when do we not need to define any buffer or plot counts in indicators??


 
Dominik Egert #Since when do we not need to define any buffer or plot counts in indicators??
Yes, it is totally plausible and possible! For example if the indicator is only going to place Graphic Objects, or use the Canvas, or just sending out notifications or something else besides plotting.
 
Fernando Carreiro #:
Yes, it is totally plausible and possible! For example if the indicator is only going to place Graphic Objects, or use the Canvas, or just sending out notifications or something else besides plotting.

That's not the point.

Even without needing buffers/plots it used to be necessary to declare them as '0'. 

And don't defining them properly where using them was giving a warning.

 
Dominik Egert #:

Is this considered a bug??


If you set a variable instead of the literal '5' it gives the warning, so I suppose this can be considered as a bug feature and not a bug.
 
Alain Verleyen #:
If you set a variable instead of the literal '5' it gives the warning, so I suppose this can be considered as a bug feature and not a bug.
void Func( char ) {}

void OnStart()
{
  Func((long)127); // OK
  Func((long)128); // truncation of constant value from 'long(128)' to 'char(-128)'
}