Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1041

 
Evgeny Dyuka:
Do you have a ready solution so as not to reinvent the wheel?
We need to answer a simple question - how many closed trades (let's call it that) have been in the history (for a specific pair or period is not important, the main thing is the principle). As I understand it is not a trivial task in mql5. I do not even have a name for this entity))

There is, but there is no point in giving one.

 
fxsaber:

There is, but there is no point in giving one.

How is that? Is there supposed to make sense?

 
Evgeny Dyuka:

how is it supposed to make sense?

Solve the problem in MQL4 and then apply the bible.

By the way, the original question would be easier to describe in MQL4 code than in words to make it unambiguous.

 
fxsaber:

Solve the problem in MQL4 and then apply the bible.

By the way, it would be easier to describe the original question in MQL4 code than in words to make it clear what is needed.

yes, that's right, super bible, forgot about it, thanks
 
Alexey Viktorov:

That is not an answer to my question. More accurately, a rejoinder. Then I put my thought in the form of a question: Why does the EA need an indicator on the chart?

If we want to reject the unused indicator handle, there is another function for this. And what is the indicator itself on the chart for?

To use data from this indicator

CopyBuffer(handle_ind,0,0,1,ind);


At runtime, the Expert Advisor should delete sub-windows with certain indicators and add others - also to use their output data. There is no need to remove the handle.

It turns out that ChartIndicatorDelete does not work in the strategy tester, and that is where I checked this deletion. It is strange that it is not mentioned in the Help. Or maybe I have missed something?

 
Anzhela Sityaeva:

The comma doesn't play a role in the formula, you're right, it just separates the value from the type, for ease of understanding nothing more. Grade 5 was a long time ago :), and I've never been good at maths, as it happens. But I do remember the order of operations.

The question is precisely that in both variants of calculations the result isthe same, which variant should be considered correct?

The point is that both of them mean the same thing.

For example, there are two expressions:

Go left.
2- Go in the opposite direction from 'right'.

It is clear that these expressions have the same meaning, although they are made up of different words.

--

Both options you are interested in are correct, although written differently.

 

How can I clear Alert() output window from previous messages without reloading the terminal?

As an alternative I'm considering MessageBox(), but the help recommends using it only out of despair as all threads are stopped.

 

it would be nice to have a command in the code to clear the log in the Experts tab

or at least assign the D button to Clear - there's C and even the useless A and G

why isn't there a useful D button - Clear? or Delete?

 
Can you tell me how to get the coordinates under the cursor by pressing a key without a mouse click?
 
Roman Sharanov:
Can you tell me how to get coordinates under cursor by pressing key without mouse click?

There is no MQL5 function that would give out mouse coordinates. But it is possible to use the following solution: based on the attached file, add saving of last mouse coordinates toOnChartEvent and then, when the button is clicked, output these coordinates.

Reason: