Download MetaTrader 5

OBJPROP_RAY not working

To add comments, please log in or register
goocreations
331
goocreations 2015.04.26 12:15 

I want to draw a vertical line over multiple windows in a chart. I cannot use a OBJ_VLINE, since I don't want the value (date) of the line displayed on the axis, and it seems that there is no way to disable/hide this value box of a OBJ_VLINE on the axis.


Hence, I tried to add a OBJ_TREND and enable the ray to show over all sub-windows:

ObjectCreate(mChartId, name, OBJ_TREND, 0, time, 0, time, 1);
ObjectSetInteger(mChartId, name, OBJPROP_RAY, true);
ObjectSetInteger(mChartId, name, OBJPROP_RAY_LEFT,  true);
ObjectSetInteger(mChartId, name, OBJPROP_RAY_RIGHT, true);


However, the ray is only draw on one window (in this case the main window: 0). The documentation says that OBJPROP_RAY is "A vertical line goes through all the windows of a chart". What am I doing wrong?

goocreations
331
goocreations 2015.04.26 16:35  
Although this doesn't answer my RAY question, I found a solution to disable the VLINE value box: OBJPROP_BACK.
To add comments, please log in or register