Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 687

 
How can I view the balance history in MT4? There is a profit history, but I can't find how the deposit itself changed, I can't find it in the detailed report, which is saved in html.
 
Why do I have a 4p spread over the market and the tester draws 21p?
 
Igor Makanu:

Isn't maths your thing? ;)

Yes, no skates at all) Thank you.

As a result of some calculations the variable W may beassigned values 0.013 or 0.016. how do I round up to 0.02 in such cases?

Or 0.214 rounded up to 0.22.

If a third decimal place is greater than zero then increase the second decimal point by one.

How do I write the underlined condition?

 
Ghabo:

Yes, no skates at all) Thank you.

As a result of some calculations, the variable W may beassigned values of 0.013 or 0.016. how do I round up to 0.02 in such cases?

Or 0.214 rounded up to 0.22.

If a third decimal place is greater than zero then increase the second decimal point by one.

How do I write the underlined condition?

like this:

x = MathCeil(NormalizeDouble(W,3)*100)/100.0;

 
Maxim Kuznetsov:

Like this:

x = MathCeil(NormalizeDouble(W,3)*100)/100.0;

Thank you.

 

iHighest will find the bar index with the maximum High price on ten bars,

iHighest(NULL,0,MODE_HIGH,10,1);

How do I find the bar with the maximum Close price on ten bars?

 
Ghabo:

iHighest will find the bar index with the maximum price on ten bars,

How do you find the bar with the maximum Close price on ten bars?

It's only natural:

iHighest(NULL,0,MODE_CLOSE,10,1);

Don't you read the help? In the editor, put the cursor on the function name and press F1 on your keyboard. You read it. However, there is also online help. It's right here on this site. Just look at the page header, and you'll see"Documentation".

And then there's a search - also at the top. Type iHighest there, press Enter on your keyboard, and you get a whole list with a link to iHighest() documentation at the top of it:

Документация по MQL5: Доступ к таймсериям и индикаторам / iHighest
Документация по MQL5: Доступ к таймсериям и индикаторам / iHighest
  • www.mql5.com
[in]  Индекс (смещение относительно текущего бара) начального бара, с которого начинается поиск наибольшего значения. Отрицательные значения игнорируются и заменяются нулевым значением. Индекс наибольшего найденного...
 
Artyom Trishkin:


Thank you.

 

Dear forum users!

I have a question about period separators.

Any prediction in the market assumes not only the achievement of certain levels, but also a certain time range of these achievements.

Otherwise, any prediction or analysis, be it technical or fundamental, becomes meaningless and turns into banal gossip or guessing by "coffee grounds".

Generally speaking, there is some opportunity to build a forecast in MT4/MT5. This possibility is implemented by the button "Shift chart to end" on the control panel.

If this button is pressed, the chart will be shifted to the left of the right edge, and there will be some free space for drawing forecasts.

But much to the regret of many traders, there are no "Period Separators" on the freed part.

It means that "Show period separators" option in chart settings is not applied to this part of the chart space.

At the same time, as everybody knows, we have the following standard gradation of "Period separators":

- months MN - separator "year";

- weeks W1 - separator "year";

- D1 days - "month" separator;

- 4x hours - "week" separator;

- the rest are separated by "day".

I'm wondering if anyone has done an extension of these delimiters to the area of interest.

If not, maybe there are "textmarks" of standard delimiters in the library that can be added to, or augmented with options of interest.

In short, in general, the question seems to be clear.

What is the best way to extend the "period separators" to the forecast area ???

 
neverness:

I am wondering if anyone has done an extension of these dividers to the area of interest.

What is the best way to extend the "period separators" to the forecast area ???

Of course they have and do.

It's better to extend from the past to the future)
(and keep in mind that some characters open at 1am and some at 9am)

Reason: