Questions from Beginners MQL5 MT5 MetaTrader 5 - page 978

 
Vladimir Karputov:

The 'Reply' button is the quote. Bypassing the positions - see my any recent codexpert.

Well what if there's no reply, as in my previous comment? Do you have to go into html? OK, with your own charter, as they say... So this quote button is only confusing sometimes as it does the same thing as "reply".

 
Vladimir Karputov:

The 'Reply' button is the quote. Position traversal - see my any last codexpert.

Example from the last codeIeNTri.mq5

Thanks

 
Juer:

Well what if there's no answer, like in my previous comment? Do you have to go into html?

If there's no answer, it's logical that there isn't anything to quote either. Strange if the ability to quote air😊 appears

 
Vladimir Karputov:

If there's no answer, it's logical that there isn't anything to quote either. Strange if the ability to quote air😊 appears

In this case I quoted the text from the documentation

 
Juer:

In this case, I quoted the text from the documentation

Quoting text from the documentation:

MetaQuotes Language 5 (MQL5) is a programming language for technical indicators, trading robots and auxiliary applications for automated trading in financial markets. MQL5 is a modern high-level language developed by MetaQuotes Software Corp. for its own trading platform. Its syntax is closest to C++ and allows you to write programs in the style of object-oriented programming (OOP).

For writing programs in MQL5, the Trading Platform provides the MetaEditor development environment with all modern tools for writing code, including templates, snippets, debugging, profiling, autocompleting and the built-in versioned MQL5 Storage.

Support and development of the language is provided by the MQL5.community website, where a large library of free codes and numerous articles are available. These articles cover all the topics of modern trading: neural networks, statistics and analysis, high-frequency trading, arbitrage, testing and optimization of trading strategies, using robots for automated trading, and much more.

I copy-paste text, select it and press Ctrl+3.

In general, all this is in the editor menu.

You just need to study it carefully, and not immediately write about the lack of availability. (This selection = Ctrl+4)

 

There are 6 windows in the terminal, each with a different EA. I change Expert Advisor in one of them (or set it down, if it was not there).

Result: OnChartEvent is triggered for all EAs of all charts.

Question: should it be like that, or is it an error (OnChartEvent is supposed to be activated only for the affected window)?

If it should be, please clarify what is the benefit of this, given that OnChartEvent comes with null parameters:

id = 9 lparam = 0 dparam = 0.0 sparam =

--

By the way, observations:

1. OnChartEvent receives an event already at the stage of appearance of the Expert Advisor dialog box (although the user can cancel the operation).

2. At such actions as resizing and mouse click (id respectively = 9 and 4), the event is sent only to its own window, which is logical.

 

Good afternoon. Please tell me what I'm doing wrong. I want to create an object when I press the keyboard button, and if it's created, I want to delete it. This code works in mql4 without any problems. Thanks in advance.

void Drawobj(string name,string descr,datetime time1,double price1,datetime time2,double price2,double price3,int clr)
  {
   name="Rec_"+name;
  if(ObjectDelete(0,name)){ChartRedraw();return;}
// Рисуем зону
   ObjectCreate(0,name,OBJ_RECTANGLE,0,time1,price2,time2,price3);
   ChartRedraw();
   }
 
Vasiliy Sokolov:

And in C# this lambda-expression, with the help of some magic, will it work straightforwardly?

If method() returns the same value - search through the dictionary. If the value is different each time - just a brute force search each time.

Hello. I don't see an Update method in CDictionary. How is it supposed to update the object in the collection? Delete and then add again? Or adding it with the same key will be an update? Thank you.

 

Are there any handy libraries for replacing lines in a text file?

For example, there are several lines, you need to replace them. And the new number of lines may be different (there were three lines, there are two, etc.). How should this be done? Read the entire file into an array of strings?

 
Hello. Do you know if there is a set of ready-to-use functions for MQL5? As for example for MQL4 here by Kim Igor V. aka KimIV https://www.mql5.com/ru/forum/131859
Только "Полезные функции от KimIV".
Только "Полезные функции от KimIV".
  • 2011.02.18
  • www.mql5.com
Все функции взяты из этой ветки - http://forum.mql4...
Reason: