Errors, bugs, questions - page 3184

 

If I open a chart with a symbol for the first time, why does the query for monthly bars via CopyTime() in MT4 takes less than 0.05 sec, but in MT5 it takes half a minute or more ?

Or what am I doing wrong?

I am attaching the code and below is a link to a video with demonstration:

https://drive.google.com/file/d/10HyBpWsuoocCYIkInycDChzpDkaALNWY/view?usp=sharing


MT4 (b1355)

MT5 (b3280)


Files:
 
Vasiliy Pushkaryov #:

When I open a chart with a symbol for the first time, why does the query of the monthly bars via CopyTime() take less than 0.05 seconds in MT4, but half a minute or more in MT5?

Or what am I doing wrong?

I attach the code and below is a link to a video with a demonstration:

https://drive.google.com/file/d/10HyBpWsuoocCYIkInycDChzpDkaALNWY/view?usp=sharing


MT4 (b1355)

MT5 (b3280)


I guess that in MT4 all bars (m1 - mn1) are explicitly available locally, but in MT5 only the prices of M1 are available, from which the monthly bars have to be generated/calculated.

 
Carl Schreiber #:

I assume that in MT4 all bars (m1 - mn1) are clearly available locally, but in MT5 only M1 prices are available, from which monthly bars are to be generated/calculated.

I have both platforms installed less than a week ago, I did not use the XAGUSD symbol before the video was taken.

It's just that MT5 is positioned as a newer and faster terminal. I would like to understand how you can make MT5 work as fast as MT4 does. The other symbol is copying a 281 month bar, in MT4 the speed is the same - less than 0.05 sec, on MT5 it's already about 50 sec.

 
Valeriy Yastremskiy #:
There is an error in the manual in the example

Corrected, thank you!

 
Would it be sensible to add the "Shared Projects" folder to the default include search paths?

When including from such a project the path needs to be preceded with "../" which is a little confusing.

Wouldn't that make sense?
 

Unfortunately, the "fashionable" degradation of language has reached here too.

"Copying" implies exactly the action being performed at the moment and with someone else, not a general description of the action.

A few years ago it would have been logically correct to say "how much to copy".

 
Vladimir Pastushak #:

Incorrect description in help


In Help, Terminal Width, in fact, the total width of the monitors. 1 monitor 2560 I have three monitors. Terminal in one monitor and its actual width is less than 2560.

I suggest a correction to "Total desktop width".

Same with Height.

If the chart is not detached we cannot get its coordinates relative to the virtual screen.

If we detach the chart, the coordinates appear.

We do not change coordinates when a chart is attached back to the terminal.

Also. I suggest/request to enable receiving coordinates of the workspace in the terminal. Get/set windows based on coordinates of the workspace.

This would allow to access the real windows coordinates and position them programmatically.

Next point

ChartSetInteger(0, CHART_SHOW, false); - Disabling rendering is an ideal solution for creating your own program interface using graphical resources. By the way it does not disable history trading and a blank window may have traces of history, probably not watched. It also saves the invisible price scale of the symbol. I would like to be able to set the price scale programmatically.

Give the possibility to disable the standard toolbar. In some cases it is not necessary at all... At the moment there is no access to disconnection programmatically only manual access...

Hello, could you resolved this problem? I need  programmatically set not history trading is showed in a blank window. i can not find a method to do it. 

Thanks

 
Comments that do not relate to this topic, have been moved to "Off Topic Posts".
 

I'm making an indicator based on Volumes/Spread and I'm running into an issue where the indicator value in the upper left corner of the indicator window is updating with the live value, but it says inf on the upper and lower of the right side. When I set the minimum and maximum, the indicator buffer line shows up but I would need to change it on every timeframe I put it on, as volume/candle values multiply the higher timeframes you go up.

How do I solve this problem?

Thanks.

EDIT: Nevermind

I figured it out. I forgot to put a condition that if(spread[i]==0) double Spreads[i]=1; That fixed the issue.

 
PositionClosePartial is working and sometimes not working
PositionClosePartial is working and sometimes not working
  • 2023.01.19
  • www.mql5.com
I developed some trade-copier for same user name only. Sorry I cannot share the full code to here. I know that my broker uses bridges...
Reason: