OnChartEvent() and creating / deleting objects

 

When an object is CREATED by an indicator, it doesn't trigger OnChartEvent().

But when an object in DELETED by an indicator, it does.

#property strict
#property indicator_chart_window

int OnInit()
  {
   ChartSetInteger(0,CHART_EVENT_OBJECT_CREATE,true);
   ChartSetInteger(0,CHART_EVENT_OBJECT_DELETE,true);
   EventSetTimer(5);
   return(INIT_SUCCEEDED);
  }

void OnTimer()
  {
   static bool flag=false;
   if(!flag) ObjectCreate(0,"test",OBJ_ARROW,0,Time[0],High[0]);
   else      ObjectDelete(0,"test");
   flag=!flag;
  }

void OnChartEvent(const int id, const long& lparam, const double& dparam, const string& sparam)
  {
   Print(EnumToString((ENUM_CHART_EVENT)id));
  }

int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   return(rates_total);
  }

 

Does anybody know if this is a foible of Build 971, or has it always been like this?

 
honest_knave:

When an object is CREATED by an indicator, it doesn't trigger OnChartEvent().

But when an object in DELETED by an indicator, it does.

 

Does anybody know if this is a foible of Build 971, or has it always been like this?

 

 

I confirm. Doesn't work either in build 950 and 962. It works with MT5.
 
Thanks angevoyageur - looks like a bug then!
Reason: