Perhaps you should read the manual. ObjectGetTimeByValue
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
Do you see HLine listed there?
Perhaps you should read the manual. ObjectGetTimeByValue
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
Do you see HLine listed there?
Good morning, I use ObjectGetTimeByValue to receive the start/first date for OBJ_TREND objects. For just one object the function throws the error 4204. This object is a horizontal trend line having, apparently, the same price for both ends of the line. I think that the function ObjectGetTimeByValue throws the error because it does not know which date to return (beginning or end of trendline). Here is my code:
ObjectGetDouble returns the correct price and does not throw any errors. Same applies to the ObjectName function. The name is received correctly and no error is thrown.
Can anybody confirm my assumption? I cannot think of any other reason.
Thank you
Good morning Dominik, thank's for your additional and helpful thoughts!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Good morning, I use ObjectGetTimeByValue to receive the start/first date for OBJ_TREND objects. For just one object the function throws the error 4204. This object is a horizontal trend line having, apparently, the same price for both ends of the line. I think that the function ObjectGetTimeByValue throws the error because it does not know which date to return (beginning or end of trendline). Here is my code:
ObjectGetDouble returns the correct price and does not throw any errors. Same applies to the ObjectName function. The name is received correctly and no error is thrown.
Can anybody confirm my assumption? I cannot think of any other reason.
Thank you