bool M_CreateLine(string tradeLineName, color lineColor, double Price) { ResetLastError(); ObjectCreate(0, tradeLineName, OBJ_TREND, 0, stGVL.dtCurrentLiquidity_Time, Price, stGVL.dtCurrentTime, Price); ObjectSetInteger(0, tradeLineName, OBJPROP_COLOR, lineColor); ObjectSetInteger(0, tradeLineName, OBJPROP_WIDTH, 2); ObjectSetInteger(0, tradeLineName, OBJPROP_STYLE, STYLE_SOLID); ObjectSetInteger(0, tradeLineName, OBJPROP_HIDDEN, false); ObjectSetInteger(0, tradeLineName, OBJPROP_RAY_RIGHT, false); if(GetLastError() != 0) { M_LogError("An error occured when creating line " + tradeLineName + ", Error: " + IntegerToString(GetLastError())); } else { string Message = "Line " + tradeLineName + " created"; M_LogInfo(Message); } return true; }