ので昔のやり方をメモしておく。
//昔のやり方
int start()
{
static int BarsBefore = 0;
int BarsNow = Bars;
int BarsCheck = BarsNow - BarsBefore;
if(BarsCheck==1){
Print("新規バー");
}
BarsBefore = BarsNow;
return(0);
}
//新しい微妙なやり方
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[])
{
static datetime mytime = TimeCurrent();
if(Time[0] != mytime)
{
Print("*** debug 新規バー取得 ***");
mytime = Time[0];
}
return(rates_total);
}
0 件のコメント:
コメントを投稿