Download MetaTrader 5

Giving a name to a horizontal line in MT4

To add comments, please log in or register
ian
134
ian  
Does anyone know if there is a way of naming a horizontal line so that the name stays just above the line on the right hand side of the screen ?
Roberto Jacobs
47973
Roberto Jacobs  
ian:
Does anyone know if there is a way of naming a horizontal line so that the name stays just above the line on the right hand side of the screen ?

May you can used OBJ_TEX and OBJPROP_TEXT

Read documentation:

https://www.mql5.com/en/docs/constants/objectconstants/enum_object_property#enum_object_property_double

Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Objects Constants / Object Properties - Reference on algorithmic/automated trading language for MetaTrader 5
Marco vd Heijden
Moderator
4952
Marco vd Heijden  

Or also

OBJPROP_TOOLTIP

The text of a tooltip. If the property is not set, then the tooltip generated automatically by the terminal is shown. A tooltip can be disabled by setting the "\n" (line feed) value to it

string

Keith Watford
Moderator
10376
Keith Watford  

if you can code mql4

You would need to create a label with the name. The problem is that you would have to check the position in OnChartEvent to get the y co-ordinate of the line as the scale changes, then re=position the label accordingly.

Otherwise, edit the line's properties and add the name in the description box.

Open chart properties and check "Show Object Descriptions"

That will show the description on the left of the chart

Vasyl Nosal
18836
Vasyl Nosal  
description
Alain Verleyen
Moderator
32007
Alain Verleyen  
Vasyl Nosal:
description

The question was :

Forum on trading, automated trading systems and testing trading strategies

Giving a name to a horizontal line in MT4

ian, 2016.02.20 09:38

Does anyone know if there is a way of naming a horizontal line so that the name stays just above the line on the right hand side of the screen ?

Vasyl Nosal
18836
Vasyl Nosal  
Alain Verleyen:

The question was :


Set description same as name.
Alain Verleyen
Moderator
32007
Alain Verleyen  
Vasyl Nosal:
Set description same as name.
And how will you place this description "above the line on the right hand side of the screen" ?
Vasyl Nosal
18836
Vasyl Nosal  
Alain Verleyen:
And how will you place this description "above the line on the right hand side of the screen" ?

On left.

On right only by coding. 

To add comments, please log in or register