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.
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).
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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