I am trying to create a rectangle in main chart with following mql5 codes. Nothing created. what is wrong? Thanks in advance.
void OnTick()
{
// ObjectDelete(_Symbol,"Rectangle");
ObjectCreate
( _Symbol,
"Rectangle",
OBJ_RECTANGLE,
0,
0,
0,
1500,
1500
);
// Print ("Test");
ObjectSetInteger(0,"Rectangle", OBJPROP_COLOR,clrAliceBlue);
ObjectSetInteger(0,"Rectangle", OBJPROP_FILL,clrDarkSlateBlue);
}
//+------------------------------------------------------------------+
void OnTick()
{
// ObjectDelete(_Symbol,"Rectangle");
ObjectCreate
( _Symbol,
"Rectangle",
OBJ_RECTANGLE,
0,
0,
0,
1500,
1500
);
// Print ("Test");
ObjectSetInteger(0,"Rectangle", OBJPROP_COLOR,clrAliceBlue);
ObjectSetInteger(0,"Rectangle", OBJPROP_FILL,clrDarkSlateBlue);
}
//+------------------------------------------------------------------+