Features of the mql5 language, subtleties and tricks - page 82

 
Ihor Herasko:

Please:

It was originally about this line

Str[ArrayResize(Str, ArraySize(Str) + 1) - 1] = FileReadString(handle);
 
I am not sure what to expect fromfxsaber:

It was originally about this line.

And I'm just talking about the general approach. People look at it and on a subconscious level learn that this is how it should be. And then: "MQL5 is more complicated than MQL4, because a lot of checks have to be done". When I started to trade in MetaTrader 5, I noticed a similar statement.

 
Comments not related to this topic were moved to"Questions from Beginners in MQL5 MT5 MetaTrader 5".
 
Ihor Herasko:

And I was just talking about the general approach. People look at it and on a subconscious level learn that this is how it should be. And then: "MQL5 is more difficult than MQL4, because a lot of checks have to be done". I read a similar statement in some thread today.

Not for beginners at all.

 
fxsaber:

This thread is not for newcomers at all.

Blessed is he who believes. Just 10 minutes ago there was a question here from a newbie who probably read the thread. Artem moved his question to another thread. Do you think there are few of them? Unfortunately, no. We have no control over it.

 
Ihor Herasko:

Blessed is he who believes. Just 10 minutes ago there was a question here from a newbie who probably read the thread. Artem moved his question to another thread. Do you think there are few of them? Unfortunately, no. We have no control over this.

Once again, the thread is not for newbies. The actions of the moderator is dictated by this.

 

Since this thread is not for beginners, you may be professionals will give me an answer here.

I faced a problem with the inability to make a screenshot with a certain number of bars, i.e. the left bar is easy to find, but how to adjust the size of the screenshot, that it would fit the specified number of bars - not clear - the result constantly varies depending on the zoom and full screen mode (F11).

Please help me to solve this problem.

 
Aleksey Vyazmikin:

Since this thread is not for beginners, you may be professionals will give me an answer here.

I faced a problem with the inability to make a screenshot with a certain number of bars, i.e. the left bar is easy to find, but how to adjust the size of the screenshot, that it would fit the specified number of bars - not clear - the result constantly varies depending on the zoom and full screen mode (F11).

Please help me to solve this problem.

Take an idea from here.

 
fxsaber:

Take the idea from here.

Thank you, but this script also saves wrong.

On my monitor, the limitation on the right side is marked with a vertical line, and the screenshot went far beyond that line.


 
Aleksey Vyazmikin:

Thank you, but this script does not save correctly either.

Read my answer again. Open the short source code, figure it out and... profit!

Reason: