Please would some kind person explain what I’m doing wrong here (MT4 EA).
Compile 0 errors and Charts/Objects/Object List confirms the object, but no text appears on the chart (background black for clrWhite).
Tried without the if condition also with Time[0], Close[0] but no difference.
Many thanks.
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
int h=TimeHour(TimeCurrent());
void OnTick()
{
If if(h==9)
{
ObjectCreate ("AtOpen",OBJ_TEXT,0,0,0);
ObjectCreate("AtOpen", OBJ_TEXT, 0,Time[1], Close[1] );
ObjectSetText ("AtOpen", "Opn:",10,"Calibri",clrWhite);
}
}