MetaTrader 5 Platform update build 3280: Improvements and fixes based on traders' feedback - page 2

Daniel Jose
4143
Daniel Jose  

May I suggest an improvement ... It is as follows: By running the following script code

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart() 
{ 
  
        ENUM_TIMEFRAMES time = PERIOD_D1;
        string szSymbol = "EURUSD";
        long id = ChartOpen(szSymbol, time);
        ChartRedraw(id);

        ChartIndicatorAdd(id, 0, iCustom(szSymbol, time, "Media Movel.ex5"));
}

in any window, we will have a new window open with the EURUSD symbol and we will be able to add a custom indicator in the newly created window .... PERFECT... however if we turn this same script into a service as shown below:

#property service
//+------------------------------------------------------------------+
void OnStart()
{
        ENUM_TIMEFRAMES time = PERIOD_D1;
        string szSymbol = "EURUSD";
        long id = ChartOpen(szSymbol, time);
        ChartRedraw(id);

        ChartIndicatorAdd(id, 0, iCustom(szSymbol, time, "Media Movel.ex5"));
}

the behavior will already be different, the window will be created as expected, but even having the window ID value we can't add any indicator in the window, it returns the 4802 error ....

It would be VERY GOOD if a service could add an indicator, since we can use services to be doing some extra work, without overloading an EA for example, but even if it was not possible to do this, is the suggestion of who knows, allow a service to run a script, anyway it would help a lot...

And if it's not too much to abuse ... it would also be great if the MQL5 language had a EXIT() to allow a quick way to exit recursive code when it generates a failure, but not instead of having an abrupt exit, we can treat the error and completely finish the program execution via EXIT() call ... just like what happens when we call ExpertRemove() to finish an EA ... anyway THANKS FOR THE ATTENTION ... 😁👍

Carl Schreiber
Moderator
13705
Carl Schreiber  

I have installed MT5 several times for /portbale mode. Three are currently running in parallel, two are on the release channel as they trade and one on in the beta channel.

Unfortunately, the window that asks whether to update now or later for a new update does not indicate which version can be updated: Release or Beta:


It would be nice if this window simply said,"Release update (or beta updates) have been downloaded. Timely ... "

This way the user would know whether he wants to update during the week (FX is open) or better still only at the weekend.

Perhaps one could also distinguish between release updates and beta updates by colour. That might help to avoid errors.

Gladiator WXT
1558
Gladiator WXT  
MetaQuotes:

On Friday 29th April 2022 an updated version of MetaTrader 5 platform will be released. In it we have made some minor additions and corrections based on the feedback received after the publication of version 3270.

The update includes the following changes:

  1. Terminal: Fixed filling of the standard Trailing Stop levels in the context menu of open orders and positions.
  2. Terminal: Updated translations of the user interface.
  3. Corrections for cross-logs.

The update will be available through the Live Update system.

Since there are such "small" fixes, I ask you to include in the next release a fix for this bug: removal of information about the volume of ticks when copying ticks from a Time$Sale source symbol to a custom one, using the standard functionality of the MT5 platform.

This is a small, but very annoying bug for those who work with exchange instruments, because this bug leads to the fact that on custom "continous" futures, built in MT5, it is impossible to apply indicators that work with the exchange tick history!

Continous NQ

fxsaber
23094
fxsaber  
Is this compiler warning not redundant?
void OnStart()
{
  Print(DEAL_REASON_TP == ORDER_REASON_TP); // implicit conversion from 'enum ENUM_ORDER_REASON' to 'enum ENUM_DEAL_REASON'
}
fxsaber
23094
fxsaber  

Compiler error with enum conversion.

ENUM_DEAL_REASON Reason() { return(DEAL_REASON_CLIENT); }

void OnStart()
{
  ENUM_ORDER_REASON Reason1 = Reason();                    // 'Reason' - cannot convert enum
  ENUM_ORDER_REASON Reason2 = (ENUM_ORDER_REASON)Reason(); // OK
}

Search string:Oshibka 040.

Stanislav Korotky
40020
fxsaber #:

Compiler error with enum conversion.

Search string:Oshibka 040.

There seems to be no error. Each enum is its own type. One can only be cast to another by an explicit conversion. The compiler will crash on the implicit one.

fxsaber
23094
fxsaber  
Stanislav Korotky #:

There don't seem to be any errors. Each enum is its own type. One can only be cast to another by an explicit conversion. The compiler swears at the implicit one.

Error instead of Warning.

'Reason' - cannot convert enum
1 errors, 0 warnings            
Stanislav Korotky
40020
fxsaber #:

Error instead of Warning.

So what?

fxsaber
23094
fxsaber  
Stanislav Korotky #:

So what?

Well, let's not compile such code then.

void OnStart()
{
  double d = 0;
  int i = d;
}
A100
2803
A100  
fxsaber #:

Error instead of Warning.

According to the Documentation: enumrefers to some limited set of data. In this sense, comparison and assignment are not fundamentally different: in both cases there must be either Warning or Error. And the fact that you can compare and you can't assign is nonsense