您需要 登录 才可以下载或查看,没有帐号?注册
我在主窗口上画垂直线,怎么程序会自动生成一个子窗口???这是为啥?我不需要这个子窗口啊,请高手赐教!
//+------------------------------------------------------------------+
//| ATR.mq4 |
//| Copyright 2005-2014, metaQuotes Software Corp. |
//| http://www.mql4.com |
//+------------------------------------------------------------------+
#property copyright 2005-2014, metaQuotes Software Corp.
#property link http://www.mql4.com
#property description Average True Range
#property strict
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int onInit(void)
{
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Average True Range |
//+------------------------------------------------------------------+
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[])
{
int myhour,mymin;
int i;
for(i = 0; i rates_total; i++)
{
myhour=TimeHour(time);
mymin=TimeMinute(time);
if((myhour==0 mymin==0) || (myhour==9 mymin==30))
{
ObjectCreate( time +string(i),OBJ_VLINE,0,time,0);
}
}
//--- return value of prev_calculated for next call
return(rates_total);
}
//+------------------------------------------------------------------+
外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!