Code problem!
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);
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".