mirror of
https://github.com/raa251/Liquidity_Predator.git
synced 2026-07-06 13:42:02 +00:00
22 lines
No EOL
814 B
MQL5
22 lines
No EOL
814 B
MQL5
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;
|
|
} |