Download MetaTrader 5
To add comments, please log in or register
Improve your rating. Execute orders in Freelance service!
ian
134
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 ?
Roberto Jacobs
46332
Roberto Jacobs 2016.02.21 06:30  
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
4680
Marco vd Heijden 2016.02.21 07:35  

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
9597
Keith Watford 2016.02.21 07:44  

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
18531
Vasyl Nosal 2016.02.23 15:36  
description
Alain Verleyen
Moderator
30635
Alain Verleyen 2016.02.23 19:49  
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
18531
Vasyl Nosal 2016.02.23 19:55  
Alain Verleyen:

The question was :


Set description same as name.
Alain Verleyen
Moderator
30635
Alain Verleyen 2016.02.23 20:00  
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
18531
Vasyl Nosal 2016.02.23 23:13  
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