intstart(){intlimit;
intcounted_bars=IndicatorCounted();
//---- check for possible errorsif(counted_bars<0)return(-1);
//---- last counted bar will be recountedif(counted_bars>0)counted_bars--;
limit=Bars-counted_bars;
if(limit>GV)limit = GV;
//---- main loopfor(inti=limit; i>=1; i--){{calculatesthevariableandfeedthebuffers}return(0);}
intstart(){intlimit;
intcounted_bars=IndicatorCounted();
//---- check for possible errorsif(counted_bars<0)return(-1);
//---- last counted bar will be recountedif(counted_bars>0)counted_bars--;
limit=Bars-counted_bars;
doublestartTime=GetTickCount();
if(limit>GV)limit = GV;
//---- main loopfor(inti=limit; i>=1; i--){{calculatesthevariableandfeedthebuffers}doublefinishTime=GetTickCount();
Print("Calculation time is ",(finishTime-startTime)/1000.0," seconds");
return(0);}
问题 "可能是指标使用了一个限制,即IndicatorCounted() 函数
以便不重新绘制条形图。
改变时间框架会重置,WindowRedraw()可能不会。它的功能是重绘对象,而不是指标索引。
我知道在我写的大多数东西上,我通常会去重新计算1000条左右,而这是由右键点击启动的。
这是由右键刷新开始的。
如果你不严格限制指标的循环,你会在每个tick上得到一个指标刷新。
非常感谢。
你是 "阅读困难 "吗?
在将近两个月后,我收到了你的最后一次回复。我只是不知道我是如何跳过的。我在 "重新绘制我的指标 "方面仍有问题。现在我将尝试用你给我的信息来解决这个问题。非常感谢你,,。
显示你的代码...
hi phy, 就在近两个月后,我收到了你的最后一次回复。我只是不知道我是怎么跳过的。我在 "重绘我的指标 "方面仍然有问题。现在我将尝试用你给我的信息来解决这个问题。非常感谢你,,,
,我想我是想重置指标,迫使它从头再画一遍!?我的问题是,我正在使用一个函数,在函数中改变过去的数据的新数据,结果是我的图表在时间上变成了一团。我需要定期重绘我的整个指标。最近,我一直在改变时间框架,所以当我回到原来的时间框架时,我的图表窗口是干净的(重绘)。以下是我的代码模式:
非常感谢,,。
什么是GV?
我最近一直在做的事情,是这样的。
for( int i = MathMax(WindowFirstVisibleBar(), Bars-IndicatorCounted()); i>= 0; i--) {
它在每个tick 上重绘指标的可见部分,但不重绘看不见的条。
什么是GV?
我最近一直在做的事情,是这样的。
for( int i = MathMax(WindowFirstVisibleBar(), Bars-IndicatorCounted()); i>= 0; i--) {
它在每个tick上重绘指标的可见部分,但不重绘看不见的条。
你们真了不起!我将在今天下午实现这段代码。
谢谢你们的慷慨解囊,,。