找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
首页论坛EAHub 外汇论坛
查看: 14|回复: 0

一个可以任意更改为多周期的模板

[复制链接]

4万

主题

54

回帖

4万

积分

管理员

积分
45954
发表于 2026-8-22 18:13:00 | 显示全部楼层 |阅读模式
核心代码如下,有问题可以问我


int limit;

     int counted_bars=IndicatorCounted();

  //---- check for possible errors

     if(counted_bars<0) return(-1);

  //---- the last counted bar will be recounted

     if(counted_bars>0) counted_bars--;

    limit=rates_total-prev_calculated;

   datetime TimeArray[];

   int    i,i_1,y=0,y_1;

   ArrayCopySeries(TimeArray,MODE_TIME,NULL,TimeFrame);

   int TimeDiff=(Time[0]-TimeArray[0])/(60*ChartPeriod());   

   for(i=TimeDiff,y=1;i<=limit;i++)

   {

    if(Time<TimeArray[y])y++;

      {

       ExtMapBuffer1=iCustom(NULL,TimeFrame,"Signal3",36,58,9,1,30,0,0,y);

       ExtMapBuffer2=iCustom(NULL,TimeFrame,"Signal3",36,58,9,1,30,0,1,y);

      }   

   }


   for(i_1=0,y_1=0;i_1<=TimeDiff;i_1++)

   {


       if(Time[i_1]<TimeArray[y_1])y_1++;

        {

          ExtMapBuffer1[i_1]=iCustom(NULL,TimeFrame,"Signal3",36,58,9,1,30,0,0,y_1);

          ExtMapBuffer2[i_1]=iCustom(NULL,TimeFrame,"Signal3",36,58,9,1,30,0,1,y_1);

        }   


   }


  return(rates_total);
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|EAHub外汇论坛

GMT+8, 2026-10-12 07:43 , Processed in 0.096351 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表