{启动金三角主图源码如下}
{启动金三角主图指标,无未来函数}
MA5:MA(C,5),COLORYELLOW;
MA10:MA(CLOSE,10),COLORFF00FF;
MA30:MA(C,30),COLORRED,LINETHICK2;
跌:IF(MA(CLOSE,30)<=REF(MA(CLOSE,30),1),MA(CLOSE,30),DRAWNULL),COLORGREEN,LINETHICK2;
MA60:MA(CLOSE,60),COLORFFCC66;
DCZ1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
DCZ2:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
DC1:=BARSLAST(CROSS(50,DCZ1))<3 AND BARSLAST(CROSS(DCZ1,50))<3;
DC2:=BARSLAST(CROSS(DCZ2,DCZ1))<2 AND DCZ1>DCZ2;
DRAWTEXT(DC1 AND DC2,L-0.03,'黄金'),COLORYELLOW;
STICKLINE(DC1 AND DC2,OPEN,CLOSE,1,0),COLORYELLOW;
XG:=BARSLAST(CROSS(DCZ2,DCZ1))<5 AND DCZ1>DCZ2;
DRAWTEXT(COUNT(XG,3)=1 AND XG AND C>MA(C,20),L-0.02,'启动金三角'),COLORYELLOW;
STICKLINE(COUNT(XG,3)=1 AND XG AND C>MA(C,20),OPEN,CLOSE,1,0),COLORFF00FF;
DRAWICON(COUNT(XG,3)=1 AND XG AND C>MA(C,20),LOW,9);
{启动金三角副图源码如下}
{启动金三角副图指标,无未来函数}
MA5:=MA(C,5),COLORYELLOW;
MA10:=MA(CLOSE,10),COLORFF00FF;
MA30:=MA(C,30),COLORRED,LINETHICK2;
跌:=IF(MA(CLOSE,30)<=REF(MA(CLOSE,30),1),MA(CLOSE,30),DRAWNULL),COLORGREEN,LINETHICK2;
MA60:=MA(CLOSE,60),COLORFFCC66;
DCZ1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
DCZ2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
DCZ3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
DCZ4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
DC1:=BARSLAST(CROSS(30,DCZ1))<2 AND BARSLAST(CROSS(DCZ1,50))<2;
DC2:=BARSLAST(CROSS(DCZ4,DCZ1))<2 AND DCZ1>DCZ4;
DC3:=DCZ1>60 AND DCZ4>70;
DCZA:=DC1 AND DC2 AND DC3;
ZBGS1:=BARSLAST(CROSS(50,DCZ1))<3 AND BARSLAST(CROSS(DCZ1,50))<3;
ZBGS2:=BARSLAST(CROSS(DCZ4,DCZ1))<2 AND DCZ1>DCZ4;
DCZB:=ZBGS1 AND ZBGS2;
XG:=BARSLAST(CROSS(DCZ4,DCZ1))<5 AND DCZ1>DCZ4;
DCZC:=COUNT(XG,3)=1 AND XG AND C>MA(C,20);
XG1:DCZA OR DCZB OR DCZC;