Alert As Object
richard1138:
It does work . . . maybe you can explain in what way you think it doesn't work ?
Can someone help explain why this does not work?
Can someone help explain why this does not work?
You agree to website policy and terms of use
Can someone help explain why this does not work?
extern int AccountWarningLevel = 500;
int start()
{
double EquityMarginLevel = AccountStopoutLevel();
if (EquityMarginLevel < AccountWarningLevel)
{
ObjectCreate("Warning",OBJ_LABEL, 0, 0, 0);
ObjectSet ("Warning", OBJPROP_COLOR, Red);
ObjectSet ("Warning", OBJPROP_CORNER, 3);
ObjectSet ("Warning", OBJPROP_XDISTANCE, 50);
ObjectSet ("Warning", OBJPROP_YDISTANCE, 50);
ObjectSetText ("Warning", "Account Funding Warning", 20, "Veranda", Red);
}
else
{
ObjectDelete("Warning");
}
//----
//----
return(0);
}