not2qubit
not2qubit

Reputation: 17037

How to set the default font used in the MT4 Comment() function?

The default font used for the Comment("some text") function is not not a fixed-width (aka monotype) and it is often too small.

How can I change the default font used for Comment()?

Upvotes: 0

Views: 4585

Answers (3)

user14193641
user14193641

Reputation: 21

If you are happy to change the default font for everything (not just comments) you can modify

#define CONTROLS_FONT_NAME                  "Tahoma"
#define CONTROLS_FONT_SIZE                  (8)//changed from 12

in the defines.mqh file.

Upvotes: 2

user3666197
user3666197

Reputation: 1

Q : How can I change the default font used for Comment()?

Having used MQL4 since 2007+ there is, so far, no way to change a font used for Comment() (or the graph Time-/Price-axes).


enter image description here

As @Daniel has remarked, there are some chances to build tools to circumvent this trouble.

enter image description here I have used a similarly motivated Comment()-based approach for a text-editor, for a (row,col)-addressable text-screen ( still inside a Comment()-text-block ), for an independent overlay with a (row,col,font,color)-text-screen and last, but not least, years ago I started to use a distributed-computing approach, so as not to remain blocked with the absence of screen-controls for the text-part of the GUI ( having a freedom of using several independent graphical views ( multi-time-frame views, views with AI/ML-analytical post-processing graphing and many others ).

Using the Terminal-GUI for a default look-and-feel is accompanied with any number of "remote"-screens ( implemented in python and other, non-MQL4, domain languages, some HPC-languages on remote computers ) that are used in-sync with the flow of MQL4-processed events.

This is the safest way to work with text-and-graphs in a user-controlled manner.

Upvotes: 2

Daniel Kniaz
Daniel Kniaz

Reputation: 4691

To the best of my belief, there is no way to change font type and size of the Comment() function. If they are too small for you - you have to draw Labels on the chart yourself(even though it might be a bit inconvenient to parse the text looking for "\n" objects in order to go next line).

Upvotes: 2

Related Questions