DeleteAllObjects

DeleteAllObjects 最新版

官方版 无广告 71

更新日期:2022-03-02 分类标签: 语言:中文 平台:没限制

4 人已下载 手机查看

//+------------------------------------------------------------------+
//| DeleteAllObjects.mq4 |
//| Copyright 2014, ForexTradingAutomation.com |
//| http://ForexTradingAutomation.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2014, ForexTradingAutomation.com"
#property link "http://ForexTradingAutomation.com"
#property version "1.00"
#property strict
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//---
long currChart;
long prevChart=ChartFirst();
int deleted = ObjectsDeleteAll(prevChart);
int chartCount = 1;
// Loop through charts
while(true)
{
// Get next chart
currChart=ChartNext(prevChart);
// If currChart < 0 ==> we iterated through all charts, exit loop
if(currChart<0)
break;
deleted += ObjectsDeleteAll(currChart);
chartCount++;
prevChart=currChart;
}
PrintFormat("Deleted %d objects on %d charts", deleted, chartCount);
}
//+------------------------------------------------------------------+

相关资源

暂无评论

暂无评论...