Liquidity_Predator/Visualize/Line/M_SetLine.mqh

17 lines
433 B
MQL5
Raw Permalink Normal View History

void M_SetLine(string LineName, int LineNumber, double price, color Clr)
2026-02-11 17:37:48 +01:00
{
string FullLineName = LineName + IntegerToString(LineNumber);
// check if object exists, otherwise create a new one
if(ObjectFind(0, FullLineName) < 0)
{
M_CreateLine(FullLineName, Clr, price);
}
else
{
// Move endpoint to actual time
ObjectMove(0, FullLineName, 1, TimeCurrent(), price);
}
2026-02-11 17:37:48 +01:00
}