Is it possible to adjust price scale when objects that go off the chart window.

 
Hi, 

So for example OBJ_TEXT set with coordinates of price/time
Anchor set to ANCHOR_LOWER

My code works as I expect but sometimes OBJ_TEXT goes outside of the chart window. This is because price is either high or low on the chart and objects are anchored as UPPER or LOWER so this makes them off the chart.  

I see code for CHART_SCALE but nothing tor PRICE_SCALE that I know of.

Is there such a thing for this ? 

Thanks
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Methods of Object Binding
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Methods of Object Binding
  • www.mql5.com
Methods of Object Binding - Objects Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Agent86: So for example OBJ_TEXT set with coordinates of price/time. Anchor set to ANCHOR_LOWER. My code works as I expect but sometimes OBJ_TEXT goes outside of the chart window. This is because price is either high or low on the chart and objects are anchored as UPPER or LOWER so this makes them off the chart. I see code for CHART_SCALE but nothing tor PRICE_SCALE that I know of. Is there such a thing for this ?

ENUM_CHART_PROPERTY_DOUBLE

ID

Description

Property Type

CHART_FIXED_MAX

Fixed  chart maximum

double

CHART_FIXED_MIN

Fixed  chart minimum

double

CHART_POINTS_PER_BAR

Scale in points per bar

double

CHART_PRICE_MIN

Chart minimum

double r/o   modifier - subwindow number

CHART_PRICE_MAX

Chart maximum

double r/o   modifier - subwindow number

 
Fernando Carreiro #:

ENUM_CHART_PROPERTY_DOUBLE

ID

Description

Property Type

CHART_FIXED_MAX

Fixed  chart maximum

double

CHART_FIXED_MIN

Fixed  chart minimum

double

CHART_POINTS_PER_BAR

Scale in points per bar

double

CHART_PRICE_MIN

Chart minimum

double r/o   modifier - subwindow number

CHART_PRICE_MAX

Chart maximum

double r/o   modifier - subwindow number

YES, thanks. 

For some reason I scrolled through the long list of chart properties and thought all these only pertained to scale and not price. 

This should do it thanks. 

 
Agent86 #: YES, thanks. For some reason I scrolled through the long list of chart properties and thought all these only pertained to scale and not price. This should do it thanks. 
You are welcome!