Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1051

 
MakarFX:
This is true, but the TextSetFont flags are used to modify

They didn't work for me. Maybe it's the Win XP flags

 
Vitaly Muzichenko:

They didn't work for me. Maybe it's the Win XP flags

I don't know, these flags are also present in MQL5, so I don't think Windows plays a role
 

It's all about resources.

Документация по MQL5: Графические объекты / TextOut
Документация по MQL5: Графические объекты / TextOut
  • www.mql5.com
Выводит текст в пользовательский массив (буфер) и возвращает результат успешности этой операции. Данный массив предназначается для создания графического ресурса. [in]  Значение из набора 9 предопределенных способов расположения точки привязки  выводимого текста. Задаётся комбинацией двух флагов – флага выравнивания текста по горизонтали и флага...
 
And accordingly:
Документация по MQL5: Графические объекты / TextSetFont
Документация по MQL5: Графические объекты / TextSetFont
  • www.mql5.com
Устанавливает шрифт для вывода текста методами рисования и возвращает результат успешности этой операции. По умолчанию используется шрифт Arial и размер -120 (12 pt). [in]  Размер шрифта, который может задаваться положительными и отрицательными значениями. При положительных значениях размер выводимого текста не зависит от настроек размеров...
 
Artyom Trishkin:
And accordingly:

I'm not a programmer, can I have some Russian?

What I want is possible or not?

 
MakarFX:

I'm not a programmer, can I have some Russian?

Is what I want possible or not?

Maybe. But not with regular graphical objects.

The font flags you try to set to a graphical object are used for drawn text - text that is drawn in the resource object. Or on the canvas.

Документация по MQL5: Стандартная библиотека / Пользовательская графика / CCanvas
Документация по MQL5: Стандартная библиотека / Пользовательская графика / CCanvas
  • www.mql5.com
Стандартная библиотека / Пользовательская графика / CCanvas - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Artyom Trishkin:

Possibly. But not with regular graphical objects.

The font flags you are trying to set to a graphical object are used for drawn text - text that is drawn in the resource object. Or on the kanvas.

Thank you. I've solved the issue for myself.

I copied the system font timesbi.ttf, changed the name tag to MakarFX and ended up

ObjectSetText("Lev",StringConcatenate("Lev: ",DoubleToStr(MarketInfo(Symbol(),MODE_STOPLEVEL),0)),SizeInfo,"MakarFX",InfoColor);

 

A new conundrum!

Is there a function that detects the presence of a trailing stop?

To display:

"TrailingStop: NO" or "TrailingStop: 200p"

 
MakarFX:

A new conundrum!

Is there a function that detects the presence of a trailing stop?

To display:

"TrailingStop: NO" or "TrailingStop: 200p".

I suspect that we are talking about enabling trailing stop in the terminal (context menu) and you want to know if the user has clicked

then there is no access to such order properties from MQL-program

Everything is quite simple here, MQL4 sees everything concerning orders only through these functionshttps://docs.mql4.com/ru/trading.

if this task is vital for you, then you need only to memorize the stop loss value of all orders on a previous tick and compare it on a new tick to see if the stop loss has changed

 
Igor Makanu:

I suspect that we are talking about enabling trailing in the terminal (context menu) and you want to know if the user has clicked

then there is no access to such order properties from MQL-program

Thank you very much.

Reason: