Use the correct property modifier instead of the non existent OBJPROP_TIME1 or OBJPROP_TIME2 in MQL5.
Example:
ObjectSetInteger(0, name, OBJPROP_TIME, 0, time1); ObjectSetDouble(0, name, OBJPROP_PRICE, 0, price1); ObjectSetInteger(0, name, OBJPROP_TIME, 1, time2); ObjectSetDouble(0, name, OBJPROP_PRICE, 1, price2);

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have a problem that I don't know how to solve. I have code for an indicator, one of its functions is to show what the price is at a specific point - in this case, the value at the last closed bar.
The problem is that the indicator recognizes the start and end trend-line coordinates as the same and the message is "Undefined".