微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

当数据窗口显示的值与 iCustom 值不同时该怎么办?

如何解决当数据窗口显示的值与 iCustom 值不同时该怎么办?

当数据窗口显示的值与 iCustom 值不同时,有人可以给我一些指示/建议吗? 示例:缓冲区 0缓冲区 1 显示正确值,但 缓冲区 3 和缓冲区 2 显示错误

enter image description here

代码

#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 举报,一经查实,本站将立刻删除。