Errors, bugs, questions - page 2192

 
Dmytro Zelenskyy:

Yeah, it's as clear as day.

at the bottom of the picture is real in pixels and bars


"I think the width of the column is the benchmark, and it takes a fixed percentage of the screen resolution - its width in pixels, or is fitted in some kind of increment... "

And how?


I've experimentally realised that the full screen and windowed versions hide a different number of bars behind the price scale...

 

This is the code at the beginning of the script,

ChartSetInteger(handle,CHART_SCALE,4);

But it turns out that it only works in the middle of the whole code, and it doesn't help with slips and stuff.

This is revealed by further code

// определяем сколько показывает на графике баров - потребуется для определения ширины скриншота
   int vis_bar=(int)ChartGetInteger(0,CHART_VISIBLE_BARS);Print("По ширине графика отображено баров=",vis_bar);

The vis_bar value changes depending on the zoom set before running the script, which should not happen if the zoom is set forcibly.

 
Dmytro Zelenskyy:

Yeah, it's as clear as day.

at the bottom of the picture is real in pixels and bars


"I think the width of the column is the benchmark, and it takes a fixed percentage of the screen resolution - its width in pixels, or is fitted in some kind of increment... "

And how?

Honestly, I don't understand why you see a problem. I think the problem is being solved. I'm sure plenty of forum users will solve it in no time.

 
fxsaber:

Honestly, I don't understand why you see a problem. I think the problem is being solved. I'm sure there are plenty of forum members who can solve it in no time at all.

Three people can't solve it :) Can you help me?

 
Aleksey Vyazmikin:

Three people can't decide :) Can you help?

Let's ask the old-timers about it, they'll write quickly if they want to.

 
fxsaber:

Let's ask the old-timers about it, they'll write quickly if they want to.

Good idea, what should we call them - "Sto-ro-lives"!? :)

So far I've found out that different zoom hides different correction bars behind the price scale

if (Zoom==0)ZoomX=52;
if (Zoom==1)ZoomX=27;
if (Zoom==2)ZoomX=15;
if (Zoom==3)ZoomX=8;
if (Zoom==4)ZoomX=5;
if (Zoom==5)ZoomX=3;

here's how to find out which zoom on the current chart?

 
Aleksey Vyazmikin:

here's how to find out which zoom on the current chart?

Forum on trading, automated trading systems and trading strategies testing

Features of mql5 language, subtleties and tricks

fxsaber, 2018.04.13 11:14

int GetBarSize( const ulong Chart = 0 )
{
  return(1 << (int)ChartGetInteger(Chart, CHART_SCALE));
}
 
fxsaber:

This is the distance in pixels between candlesticks or bars, and the questioner wants to measure the width of the "bar" or "candlestick" graph primitive (I never understood what he was looking for there).

 
fxsaber:

We've been over this :)

The answer is so right to my question

int Zoom=ChartGetInteger(handle,CHART_SCALE,0);
 
Does anyone know how to remove the name of the script and generally the icon in the top right corner when a screenshot is taken using the script?
Reason: