Errors, bugs, questions - page 2694

 

I found the following problem in mt5. The Volumes indicator has the thinnest line thickness of the histogram by default. But when I try to select any other line thickness, it increases to the maximum value. I.e. it is impossible to choose any intermediate value.

Is there any way to solve it? I contacted my broker - he has the same thing.
 
MQL_User:

I found the following problem in mt5. The Volumes indicator has the thinnest line thickness of the histogram by default. But when I try to select any other line thickness, it increases to the maximum value. In other words, it is impossible to select an intermediate value.

Is there any way to solve this? I contacted my broker - he has the same thing.

In all indicators with the DRAW_HISTOGRAM drawing type, the line width depends on the horizontal scale of the chart:


 

Thank you.

I didn't realise it was implemented like that here.

Is there any way to make the thickness not depend on the scale of the graph? That is, if I choose thickness 2 (or assign it in the code), then it would remain the same at all scales.

 
Alexey Kozitsyn:

Suppose the picture is a square. As far as I know from school geometry, its diagonal is at a 45 degree angle. At the bottom right point the value will be = 0 (it is). At the upper left = 90 (it is). So why is the value at the upper right such a value? Honestly, I was expecting something around 45...

What makes you think the angle will be measured from your square ?

The angle is measured relative to the price and scale of the chart.

Bring the chart to 1 point per 1 pixel and you will get your 45 degrees.

 
MQL_User:

Thank you.

I didn't realise it was implemented like that here.

Is there any way to make the thickness not depend on the scale of the graph? That is, if I choose thickness 2 (or assign it in the code), then it would remain the same at all scales.

Standard is not.

 
Artyom Trishkin:

Стандартно - нет.

But I've been thinking. It looks like we'll have to draw trend lines... I don't see any other option.

I'll have to make some trouble...

 
MQL_User:
Artyom Trishkin:

But I've been thinking. It looks like we'll have to draw trend lines... I don't see any other option.

It's going to be a pain in the ass...

Since it's "fiddling", you'd better read the thread:

Canvas - это круто!
Canvas - это круто!
  • 2018.02.16
  • www.mql5.com
Поставил себе задачу: коротким кодом эффектно продемонстрировать возможности пользовательской графики через класс CCanvas...
 

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

fxsaber, 2020.03.31 10:49

Compiling this script can kill all work on the machine.
// ALT+G на mqh-файле - зависание ME.
#include <fxsaber\HistoryTicks\Data_String.mqh> // https://www.mql5.com/ru/code/20298

void OnStart()
{
  string Str;
  
  int i = DATA_STRING::FromString(Str);
}

Compilation causes hangs, where metaeditor64.exe eats up an extra gigabyte of memory every second.

Also ME hangs on ALT+G. Build 2374.


This dangerous thing is still relevant for 2375.

 

Here's a weird bug.

There's a code.

void funcL(const long id)
{
  Print(id);
}

void OnStart()
{
  funcL(rand() + (rand() << 32));
}

Under debugger and with compilation optimization turned off it gives random numbers. With optimization turned on it steadily gives 0.

 
Is it a mistake?
#define  MACROS(A) #A

void OnStart()
{
  Print(MACROS(Close BUY)); // CloseBUY - нет пробела.
}