C/C++ www.gszb.com 股票公式指标网提供 Code复制内容到剪贴板
- VAR1:=SMA(MAX(OPEN-REF(OPEN,1),0),6,1)/SMA(ABS(OPEN-REF(OPEN,1)),6,1)*100;
- VAR2:=SMA(MAX(CLOSE- REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE- REF(CLOSE,1)),6,1)*100;
- VAR3:=SMA(MAX(HIGH-REF(HIGH,1),0),6,1)/SMA(ABS(HIGH-REF(HIGH,1)),6,1)*100;
- VAR4:=SMA(MAX(LOW- REF(LOW,1),0),6,1)/SMA(ABS(LOW- REF(LOW,1)),6,1)*100;
- VAR5:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
- 短:SMA(VAR5,6,1),COLORWHITE;
- 中:SMA(短,3,1),COLORYELLOW;
- 领先:3*短-2*中,COLORLIMAGENTA;
- DRAWKLINE(VAR3,VAR1,VAR4,VAR2);
- STICKLINE(短>0 AND 短-中>=0,79,80,6,0),COLORRED;
- STICKLINE(短>0 AND 短-中<0,79,80,6,0),COLORYELLOW;
- STICKLINE(短>0 AND 短-中>=0,49,50,6,0),COLORRED;
- STICKLINE(短>0 AND 短-中<0,49,50,6,0),COLORYELLOW;
- STICKLINE(短>0 AND 短-中>=0,9,10,6,0),COLORRED;
- STICKLINE(短>0 AND 短-中<0,9,10,6,0), COLORYELLOW;
- 顶:90, LINETHICK2 ,COLOR55AA77;
- 底:0, LINETHICK2 ,COLOR55AA77;
-
- VAR3A:=3;
- VAR2A:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
- MTM:=C-REF(C,1);
- DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
- YXF:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
- {加仓:IF(FILTER(YXF=1,5),20,-10)=20;}
- DRAWTEXT(IF(FILTER(YXF=1,5),20,-10)=20,LOW,'←短线买'),COLORRED,LINETHICK2;
- DRAWTEXT(CCI>180,CLOSE,'CCI卖出'),LINETHICK1,COLOR9593FF;