Download MetaTrader 5
To add comments, please log in or register
Make profit on MQL5 services. It's easy!
RudolfKrugstein
25
RudolfKrugstein 2013.10.18 01:30 

Hey,

 I am trying to draw horizontal lines in an indicator. Attached is a simple example program of how I am trying to do that. Basically, I am calling "ObjectCreate(chartId, "line", OBJ_HLINE, 0,0,price[n]) to create a horizontal line. But when testing the indicator, I do not see any lines.

 Any hint why?

 

Thanks!

Nathan 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types
Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types
  • www.mql5.com
Standard Constants, Enumerations and Structures / Objects Constants / Object Types - Documentation on MQL5
Files:
Alain Verleyen
Moderator
28564
Alain Verleyen 2013.10.18 08:02  

Do you know that price[i], for i=0 to 5, are price from the past ? In mql5, by default, timeseries are indexed from past (0) to present (rates_total-1).

Your lines are drawn, but you don't see it.

RudolfKrugstein
25
RudolfKrugstein 2013.10.18 10:40  
Yes, thank you very much.
/
To add comments, please log in or register