Giving a name to a horizontal line in MT4

 
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 ?
 
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
 

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

 

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

 
description
 
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 ?

 
Alain Verleyen:

The question was :


Set description same as name.
 
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" ?
 
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.