追星 发表于 2024-4-23 16:50:06

3、接第二贴

析构在EA的 OnDeinit() 处理函数中释放指标句柄://+------------------------------------------------------------------+//| Expert deinitialization function                                 |//+------------------------------------------------------------------+void OnDeinit(const int reason){//--- destroy timer   EventKillTimer();   //--- Release handle of the indicator   ResetLastError();   if(!IndicatorRelease(handle))      PrintFormat("%s: IndicatorRelease failed. Error %ld",__FUNCTION__,GetLastError());//--- Clear all comments on the chart   Comment("");}创建的仪表板对象在EA析构时被删除://+------------------------------------------------------------------+//| Expert deinitialization function                                 |//+------------------------------------------------------------------+void OnDeinit(const int reason){//--- destroy timer   EventKillTimer();   //--- Release handle of the indicator   ResetLastError();   if(!IndicatorRelease(handle))      PrintFormat("%s: IndicatorRelease failed. Error %ld",__FUNCTION__,GetLastError());//--- Clear all comments on the chart   Comment("");   //--- If the panel object exists, delete it   if(panel!=NULL)      delete panel;}

兔斯基_5912 发表于 2024-4-23 16:53:49

奖励有没有?
页: [1]
查看完整版本: 3、接第二贴