问题描述
当数据窗口显示的值与 iCustom 值不同时,有人可以给我一些指示/建议吗?
示例:缓冲区 0 和 缓冲区 1 显示正确值,但 缓冲区 3 和缓冲区 2 显示错误值
代码:
#property version "1.10"
#property strict
int handle;
//+------------------------------------------------------------------+
//| Initialization function of the expert |
//+------------------------------------------------------------------+
int OnInit()
{
handle=iCustom(_Symbol,"LTD by KDMfx");
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Deinitialization function of the expert |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
IndicatorRelease(handle);
}
void OnTick()
{
double LTdindicator1[],LTdindicator2[],LTdindicator3[],LTdindicator4[];
ArraySetAsSeries(LTdindicator1,true);
ArraySetAsSeries(LTdindicator2,true);
ArraySetAsSeries(LTdindicator3,true);
ArraySetAsSeries(LTdindicator4,true);
copyBuffer(handle,75,LTdindicator1);
copyBuffer(handle,1,LTdindicator2);
copyBuffer(handle,2,LTdindicator3);
copyBuffer(handle,3,LTdindicator4);
double val1= LTdindicator1[5] ;
double val2= LTdindicator2[5] ;
double val3= LTdindicator3[5] ;
double val4= LTdindicator4[5] ;
Comment(
"\nBuffer 0: ",val1,"\nBuffer 1: ",val2,"\nBuffer 2: ",val3,"\nBuffer 3: ",val4
);
return;
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)