Download MetaTrader 5
To add comments, please log in or register
MQL5 language supports OpenCL. Try it!
chinaski
890
chinaski 2013.03.10 03:59 

that way, that even if you scroll the chart, the label remains fixed to time and price.

Thank you 

phi nuts
2184
phi nuts 2013.03.10 10:48  
chinaski:

that way, that even if you scroll the chart, the label remains fixed to time and price.

Thank you 

You should use CChartObjectText which anchored to time and price coordinates. 

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 - Documentation on MQL5
chinaski
890
chinaski 2013.03.11 15:31  

Hello Phi,

this seems to work. Thank you. My hope was you can also fix rectangles or generally any object to chart.

(For instance draw a rectangle around a specific bar). 

phi nuts
2184
phi nuts 2013.03.12 15:24  
chinaski:

Hello Phi,

this seems to work. Thank you. My hope was you can also fix rectangles or generally any object to chart.

(For instance draw a rectangle around a specific bar). 

Probably not planned. In the mean time we can use OnChartEvent and  ChartTimePriceToXY 
Alain Verleyen
Moderator
30635
Alain Verleyen 2013.03.12 19:10  
chinaski:

Hello Phi,

this seems to work. Thank you. My hope was you can also fix rectangles or generally any object to chart.

(For instance draw a rectangle around a specific bar). 

phi.nuts:
Probably not planned. In the mean time we can use OnChartEvent and  ChartTimePriceToXY 
I probably miss something, we can already "draw a rectangle around a specific bar", no ?
phi nuts
2184
phi nuts 2013.03.13 02:16  
angevoyageur:
I probably miss something, we can already "draw a rectangle around a specific bar", no ?

Yes, you right :), 

My answer there for pixel based object, like for example this one here (that's poor example actually, because we can draw triangle on time price coordinates).

Rectangle, as chinaski example, is using time price coordinates not pixel coordinates. 

/
To add comments, please log in or register