Wishes for MQL5 - page 100

 
YuraZ >> :

I see there is a printf function

and how nice it would be to have sprintf also

Perhaps the StringFormat() function can replace it:

StringFormat

It formats the received parameters and returns a string.

string StringFormat(
string format, // format string
... ... // parameters
);

Parameters

format

[in] String with the format method. Formatting rules are the same as for PrintFormat.

...

[in] Parameters, separated by comma.

Returned value

String.


 
Rosh писал(а) >>

Perhaps the StringFormat() function could replace it:

I understand that the StringFormat function should be assigned a synonym for sprintf, similar to PrintFormat and printf. But in this case, we need to implement the snprintf function, too.

 
Rosh >> :

The MQL5 help states:


Uh-huh... Only this event for indicators, which (for now?) do not allow working with objects.

We were asked to implement such indicator as Expert Advisor. But for Expert Advisors the function on counting of modified bars(OnCalculate) is not available

 
Roffild писал(а) >>

Uh-huh... Only this event is for indicators that (yet?) prohibit working with objects.

We were asked to implement such an indicator as an Expert Advisor. But the function for calculating the changed bars(OnCalculate) is not available for Expert Advisors.

In OnCalculate, we pass the number of processed bars prev_calculated that is returned by the previous call of OnCalculate. You can count the bars processed in an Expert Advisor using a global or a static local variable.

 
stringo >> :

In OnCalculate the number of processed bars prev_calculated, which is returned by the previous call to OnCalculate. In an Expert Advisor, you can count the bars processed by yourself using some global or static local variable.

Can I know in an Expert Advisor that a user has changed the chart timeframe and all the bars should be recalculated?

There is no such a problem in indicators.

 
Roffild писал(а) >>

Can I know in the EA that the user has changed the chart timeframe and all bars need to be recalculated?

Yes, you can. First the OnDeinit function will be called with the old parameters and then the OnInit function with the new ones

 
Allow experts to display their data inthe"Data window" since many have to rewrite indicators on "experts"
 

I would like mql5 to have syntax highlighting, and more importantly, brackets when closing (a pair of brackets is closeable), substitution of functions and text, correction of syntax of commands writing and comparison signs >=,<=,=<,=>, the possibility to connect additional windows in the Expert Advisor - for example ObjWindowCreate(string Name, bool TypeWindow=false) [false - as indicator window, true - as a separate window for currency pairs]

I would also advise to take the editor interface from NotePade++

I would like to be able to hide or open the text of functions by ticking the function code and clicking the minus sign in the left panel against the function title.

Add the type of variable as LineType - so that the properties of the EA may separately select the type of the displayed line in its settings

To create separate int's for initialization of the settings when EA is working - example int OnChangeProperty() { return(0)}

Add functions such as AccountMaxLot() - the maximum current possible bid of a client

It would also be nice to add to the order creation window a label that displays the required amount for the selected lot

Create function that displays the current profit of a specific order with or without taking into account the spread and swap - for example int CalculateProfitOrder(int OrderNumberHistoryList, bool spred=false, bool swop=false)

where the number is the order number in the list of active orders

Make support of string variables in unicode and function of insertion - string CharUTF(string Font, string 'u+0021') where u+ is the unicode header and 0021 is the code of the symbol in the symbol table

or string CharUTF(string Font, string U'0021'), better add a character representation to the interpreter, like date or colour with header U'xxxxx'.

also make functions to translate strings by string CharToUtf(string Text) and string UtfToChar(string UtfText).

And in general, it would be better to describe the avatars by type for convenience:

Enabling the Expert Advisor OnInit()

Switching off the Expert Advisor OnDeinit()

Change of time frame OnChangeTimeFrame(int TimePeriod=Period())

Change zoom OnChangeZoom( int CountBarPerWindow=WindowBarsPerChart())

New price OnNewPrice()

Creating a new window OnCreateNewWindow(string NameWindow, int IndexWindow=WindowFind(NameWindow), bool TypeWindow=false)

Receipt of an investor request int OnInvestor (int IndexInvestor - investor ID(account number),string NameInvestor - investor description, ..... - comma-separated parameters for the OrderSend( return(Id Create Order) ) command)

Create order - OnCreateOrder (int IndexOrder=OrderNumberHistoryList)

Edit order - OnModifyOrder (int IndexOrder=OrderNumberHistoryList)

Event to close the order by TP, SL, Date or manually OnOrderClose (int TypeCloseOrder= CLOSEMODE_ [TP, SL, Date, Manual], int IndexOrder=OrderNumberHistoryList, bool PriceType=true)

where PriceType is a flag of order closure true - trade with a positive order balance false - trade with a negative order balance

 
Perhaps this has already been implemented in some EA, but I want to see it in the basic version of the program, namely, that the labels of the charts on which there are open or pending positions are highlighted with a certain colour. For example, the chart label on which there is an open position is highlighted in yellow, if the price approaches T/P - in green, to S/L, respectively, in red. It would also be very convenient to mark the necessary shortcut with some colour. This is very useful when working with several (many or all) instruments. On Saturday and Sunday, you do your analyses, select pairs to wait for a signal, mark them in a nice colour and watch them.
 

And you can at the bottom of the Mt, where the name of the profile is reported and add the name of the imposed template?

Profile name and so you can see in the list of profiles (there is always a checkmark to know where you are), but which template is now superimposed no.

Reason: