【谁能修改下德马克指标】

| 发表于 2022-11-21 10:16:52 | 显示全部楼层 |复制链接
我这里有个德马克指标编译不通过 但我不会修改 谁会修改帮忙修改下 指标只是作为辅助 如果你认为也不错 拿去用,别忘了修改后发我一份 QQ截图20221121101519.png
///////////

TD序列源码:

int start()
  {
   int counted_bars=IndicatorCounted();
   int bSetup, sSetup, bCountdown, sCountdown;
   int x;
   double tfm=Space*Point;
   double CountTest;
   bool bSetupInd, sSetupInd, bPerfect, sPerfect;
//----
   for(int i=NumBars; i>=0; i--)
     {
     ObjectDelete(""+i);
     ObjectDelete("cd"+i);
//+------------------------------------------------------------------+
//| Buy Setup                                                       |
//+------------------------------------------------------------------+
     if(Close<=Close[i+4] && Close[i+1]>=Close[i+5] && bSetup==0)//start setup
        {
        bSetup++;
        ObjectCreate(""+i,OBJ_TEXT,0,Time,Low-tfm);
        ObjectSetText(""+i,""+bSetup,8,"Arial",Setup);
        }
     if(Close<Close[i+4] && bSetup!=0 && ObjectFind(""+i)==-1)
        {
        bSetup++;
        if(bSetup==9)
           {
           ObjectCreate(""+i,OBJ_TEXT,0,Time,Low-tfm);
           ObjectSetText(""+i,""+bSetup,10,"Arial Black",Setup);
           bSetup=0;
           bSetupInd=true;
           sSetupInd=false;
           sCountdown=0;
           }
        else
           {
           ObjectCreate(""+i,OBJ_TEXT,0,Time,Low-tfm);
           ObjectSetText(""+i,""+bSetup,8,"Arial",Setup);
           }
        }
     //if setup is completed look for criteria for perfect setup
     if(bSetupInd==true)
        {
        if(Low[i+1]<=Low[i+3] || Low<=Low[i+2])
           {
           bSetupInd=false;
           bPerfect=true;
           bPerfected=Low-tfm*2;
           bCountdown=1;
           }
         if(Alerts==True && last_alert!=Time[0])
           {
           last_alert = Time[0];
           Alert("TD Sequential - ", Symbol(), " Buy Signal Perfected");
           }
         }        
     //Deletes numbers that were created if there is a break in sequence before 9 is reached
     else if(Close>=Close[i+4] && bSetup!=0)
        {
        for(x=i+1; x<=i+bSetup+1; x++) ObjectDelete(""+x);
        bSetup=0;
        }
//+------------------------------------------------------------------+
//| Buy Countdown Setup                                             |
//+------------------------------------------------------------------+
     if(bCountdown==13 && Close<=Close[i+1] && Close>CountTest)
        {
        ObjectCreate("cd"+i,OBJ_TEXT,0,Time,Low-tfm*2.5);
        ObjectSetText("cd"+i,"+",8,"Arial",Countdown);
        }
     if(bCountdown==13 && Close<=Close[i+1] && Close<=CountTest)
        {
        ObjectCreate("cd"+i,OBJ_TEXT,0,Time,Low-tfm*2.5);
        ObjectSetText("cd"+i,""+bCountdown,8,"Arial",Countdown);
        bCountdown=0;
        if(Alerts==True && last_alert!=Time[0])
           {
           last_alert = Time[0];
           Alert("TD Sequential - ", Symbol(), " Buy Countdown Completed");
           }
        Buy=Low-tfm*4;
        }
     if(bCountdown>=1 && bCountdown<13 && Close<=Close[i+2])
        {
        if(bCountdown==8)CountTest=Close;
        ObjectCreate("cd"+i,OBJ_TEXT,0,Time,Low-tfm*2.5);
        ObjectSetText("cd"+i,""+bCountdown,8,"Arial",Countdown);
        bCountdown++;
        }
//+------------------------------------------------------------------+
//| Sell Setup                                                      |
//+------------------------------------------------------------------+
     if(Close>=Close[i+4] && Close[i+1]<=Close[i+5] && bSetup==0)//start setup
        {
        sSetup++;
        ObjectCreate(""+i,OBJ_TEXT,0,Time,High+tfm);
        ObjectSetText(""+i,""+sSetup,8,"Arial",Setup);
        }
     if(Close>=Close[i+4] && sSetup!=0 && ObjectFind(""+i)==-1)
        {
        sSetup++;
        if(sSetup==9)
           {
           ObjectCreate(""+i,OBJ_TEXT,0,Time,High+tfm);
           ObjectSetText(""+i,""+sSetup,10,"Arial Black",Setup);
           sSetup=0;
           sSetupInd=true;
           bSetupInd=false;
           bCountdown=0;
           }
        else
           {
           ObjectCreate(""+i,OBJ_TEXT,0,Time,High+tfm);
           ObjectSetText(""+i,""+sSetup,8,"Arial",Setup);
           }
        }
     //Perfected Setup
     if(sSetupInd==true)
        {
        if(Low[i+1]>=Low[i+3] || Low>=Low[i+2])
           {
           sSetupInd=false;
           sPerfect=true;
           sPerfected=High+tfm*2;
           sCountdown=1;
           }
        if(Alerts==True && last_alert!=Time[0])
           {
           last_alert = Time[0];
           Alert("TD Sequential - ", Symbol(), " Sell Signal Perfected");
           }
         }
     //Deletes numbers that were created if there is a break in sequence before 9 is reached
     else if(Close<=Close[i+4] && sSetup!=0)
        {
        for(x=i+1; x<=i+sSetup; x++) ObjectDelete(""+x);
        sSetup=0;
        }
//+------------------------------------------------------------------+
//| Sell Countdown Setup                                            |
//+------------------------------------------------------------------+
     if(sCountdown==13 && Close>=Close[i+2] && Close>=CountTest)
        {
        ObjectCreate("cd"+i,OBJ_TEXT,0,Time,High+tfm*2.5);
        ObjectSetText("cd"+i,""+sCountdown,8,"Arial",Countdown);
        sCountdown=0;
        Sell=High+tfm*4;
        if(Alerts==True && last_alert!=Time[0])
           {
           last_alert = Time[0];
           Alert("TD Sequential - ", Symbol(), " Sell Countdown Completed");
           }
        }
     if(sCountdown==13 && Close>=Close[i+2] && Close<CountTest)
        {
        ObjectCreate("cd"+i,OBJ_TEXT,0,Time,High+tfm*2.5);
        ObjectSetText("cd"+i,"+",8,"Arial",Countdown);
        }
     if(sCountdown>=1 && sCountdown<13 && Close>=Close[i+2])
        {
        if(sCountdown==8)CountTest=Close;
        ObjectCreate("cd"+i,OBJ_TEXT,0,Time,High+tfm*2.5);
        ObjectSetText("cd"+i,""+sCountdown,8,"Arial",Countdown);
        sCountdown++;
        }
     }
//+------------------------------------------------------------------+
//| TDST Support and Resistance lines                               |
//+------------------------------------------------------------------+
   for(int j=Bars-counted_bars+10; j>=0; j--)
     {
     //TDST Support
     if(Close[j]<=Close[j+4]&& Close[j+1]>=Close[j+5] && Close[j-1]<=Close[j+3] && Close[j-2]<=Close[j+2] &&
     Close[j-3]<=Close[j+1] && Close[j-4]<=Close[j] && Close[j-5]<=Close[j-1] && Close[j-6]<=Close[j-2] &&
     Close[j-7]<=Close[j-3] && Close[j-8]<=Close[j-4])
        {
        Support[j]=High[j];
        Support[j+1]=EMPTY_VALUE;
        }
     else Support[j]=Support[j+1];
     //TDST Resistance
     if(Close[j]>=Close[j+4]&& Close[j+1]<=Close[j+5] && Close[j-1]>=Close[j+3] && Close[j-2]>=Close[j+2] &&
     Close[j-3]>=Close[j+1] && Close[j-4]>=Close[j] && Close[j-5]>=Close[j-1] && Close[j-6]>=Close[j-2] &&
     Close[j-7]>=Close[j-3] && Close[j-8]>=Close[j-4])
        {
        Resistance[j]=Low[j];
        Resistance[j+1]=EMPTY_VALUE;
        }
     else Resistance[j]=Resistance[j+1];
     }
//----
   return(0);
  }
//+------------------------------------------------------------------

QQ截图20221121101519.png
如果有帮助,就支持一下我呗
举报

评论 使用道具

精彩评论6

peterzhu2004
CC
| 发表于 2022-11-21 10:30:19 | 显示全部楼层
重绘的指标,真的要修改?
举报

点赞 评论 使用道具

xinhun88
D
| 发表于 2022-11-21 12:25:37 | 显示全部楼层
这个有用
举报

点赞 评论 使用道具

qwe11
CC
| 发表于 2022-11-21 14:23:52 | 显示全部楼层
不会修改
举报

点赞 评论 使用道具

hksl1023
DDD
 楼主 | 发表于 2022-11-21 19:39:19 | 显示全部楼层
peterzhu2004 发表于 2022-11-21 10:30
重绘的指标,真的要修改?

会重绘嘛
举报

点赞 评论 使用道具

peterzhu2004
CC
| 发表于 2022-11-21 21:29:43 | 显示全部楼层
我以前就盯着这个看了很久,信号会消失
举报

点赞 评论 使用道具

674961053
D
| 发表于 2022-11-22 16:36:49 | 显示全部楼层
感觉想股市的神奇九转
举报

点赞 评论 使用道具

发新帖
EA交易
您需要登录后才可以评论 登录 | 立即注册