Download MetaTrader 5

How to program these lines on a chart.

To add comments, please log in or register
bigbear92
19
bigbear92  


Hi all I would like to know how to create these little line markers just above the time line y axis. They are not able to be selected or moved around. I cannot find a OBJ_TYPE corresponding to it in ObjectCreate(). 

Keith Watford
Moderator
10561
Keith Watford  

You may be able to use 

OBJ_RECTANGLE_LABEL

whroeder1
16353
whroeder1  
bigbear92: They are not able to be selected or moved around.

Then they are probably not objects but buffer lines. And likely redrawn when the chart scale changes.

See 'Forex market session indicator' indicator by 'OldZ1' for MetaTrader 4 in the MQL5 Code Base
bigbear92
19
bigbear92  
whroeder1:

Then they are probably not objects but buffer lines. And likely redrawn when the chart scale changes.

See 'Forex market session indicator' indicator by 'OldZ1' for MetaTrader 4 in the MQL5 Code Base

Hi, is there a way to put buffer lines on the main chart window line in the above picture instead of a separate window?

Alain Verleyen
Moderator
33621
Alain Verleyen  
whroeder1:

Then they are probably not objects but buffer lines. And likely redrawn when the chart scale changes.

See 'Forex market session indicator' indicator by 'OldZ1' for MetaTrader 4 in the MQL5 Code Base

Why do you think it's buffer lines ?

I would say objects as Keith.

whroeder1
16353
whroeder1  
bigbear92: Hi, is there a way to put buffer lines on the main chart window line in the above picture instead of a separate window?

Your image shows they aren't in a separate window, they are at the bottom of the only window. Compare to image in the link I provided.

Alain Verleyen: Why do you think it's buffer lines ?

Non-selectable "objects" are usually buffers, especially in MT4, where non-selectable wasn't an option pre-build 600.

Alain Verleyen
Moderator
33621
Alain Verleyen  
whroeder1:

Your image shows they aren't in a separate window, they are at the bottom of the only window. Compare to image in the link I provided.

Non-selectable "objects" are usually buffers, especially in MT4, where non-selectable wasn't an option pre-build 600.

Yes, it makes sense, I missed that point.
bigbear92
19
bigbear92  
whroeder1:

Then they are probably not objects but buffer lines. And likely redrawn when the chart scale changes.

See 'Forex market session indicator' indicator by 'OldZ1' for MetaTrader 4 in the MQL5 Code Base

I still have no idea how to go about creating these lines at the bottom of the chart. Any help leading me to the right direction would be greatly appreciated :)


#property       indicator_separate_window

#property indicator_chart_window // I have tried changing it to this but then no lines show up


I have tried changing from separate_window to the chart_window but then the lines dissappear. No idea how to set to the lowest price of the visible y axis.

bigbear92
19
bigbear92  

Never Mind I found out the

WindowPriceMin

function works.

whroeder1
16353
whroeder1  
bigbear92: . but then the lines dissappear. No idea how to set to the lowest price of the visible y axis.
  1. whroeder1: And likely redrawn when the chart scale changes.
  2. Chart Price Max/Min - MQL4 and MetaTrader 4 - MQL4 programming forum
To add comments, please log in or register