Questions from Beginners MQL5 MT5 MetaTrader 5 - page 961

 

Can you please tell me if the indicator lines of this style are made from multiple buffers or is it done differently?


 
Artyom Trishkin:

It always returns long - see SymbolInfoInteger() property identifiers

So I've already seen it, I looked it up first.

SYMBOL_DIGITS

Number of decimal places

int

The dizziness and bewilderment continued... and only stopped about 20 minutes later. Just how "always" was it???

 
Nauris Zukas:

Can you please tell me if the indicator lines of this style are made from multiple buffers or is it done differently?


Two buffers are enough. One 5 pixels thick and on top of the second 2 pixels thick.

Maybe three. "The monkey's eyes are weak in his old age" ©
 
Alexey Viktorov:

Two buffers are sufficient. One 5 pixels thick and on top of the other 2 pixels thick.

Got it, thanks. Yes, that makes three.

 
How can you tell what is causing the long compile time (over 10 minutes). The resulting ex5 file weighs about 12mb, not much. How to diagnose and eliminate the causes of such a long compilation?
 
Artyom Trishkin:

The compiler does not swear, but warns you that you are trying to put double into int.

Thank you. This operation was silent in 4...

 
Nauris Zukas:
Thank you! Short and clear. (otherwise it gets clogged up with those swearwords when compiling)
 
Alexey Viktorov:

So saw it already, I did look it up first.

SYMBOL_DIGITS

Number of decimal places

int

The dizziness and bewilderment continued... and only stopped about 20 minutes later. Just how much was it "always"??

SYMBOL_DIGITS is int, but the function itself returns long. For the reason that the specification has parameters of type long:)

 
Alexey Viktorov:

Two buffers are enough. One is 5 pixels thick and on top of the other is 2 pixels thick.

Maybe three. "The monkey's eyes are weak in his old age" ©

DRAW_COLOR_HISTOGRAM2 somehow has a disproportionate change in line thickness, so that when the graph is reduced, the line segment is not displayed correctly. Is it a bug?

P.S. The adjacent DRAW_COLOR_SECTION is displayed correctly.


 
Nauris Zukas:

DRAW_COLOR_HISTOGRAM2 somehow has a disproportionate change in line thickness, so that when the graph is reduced, the line segment is not displayed correctly. Is it a bug?

P.S.Nearby DRAW_COLOR_SECTION is displayed correctly.


Try also DRAW_COLOR_CANDLES

Документация по MQL5: Пользовательские индикаторы / Стили индикаторов в примерах / DRAW_COLOR_CANDLES
Документация по MQL5: Пользовательские индикаторы / Стили индикаторов в примерах / DRAW_COLOR_CANDLES
  • www.mql5.com
//|                                           DRAW_COLOR_CANDLES.mq5 | //|                        Copyright 2011, MetaQuotes Software Corp. | //|                                             https://www.mql5.com | "Рисует в отдельном окне разным цветом свечи по случайно выбранному из MarketWatch символу...
Reason: