副图公式 源码支持手机/电脑
趋势线:SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1),COLORYELLOW;
DRAWBAND(趋势线,RGB(155,50,50),50,RGB(0,100,50));
转牛:IF(趋势线>50,趋势线,DRAWNULL),COLORRED;
转熊:IF(趋势线<50,趋势线,DRAWNULL),COLORGREEN;
RSV:=(CLOSE-LLV(CLOSE,9))/(HHV(CLOSE,9)-LLV(CLOSE,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
DIFF:=EMA(CLOSE,2)-EMA(CLOSE,55);
DEA:=EMA(DIFF,6);
MACD:=2*(DIFF-DEA);
转向:=IF(K>D AND CCI>0 AND DIFF>DEA AND MACD>0,1,0);
STICKLINE(转向=1,50,50,2,0),COLORYELLOW;
STICKLINE(转向=0,50,50,2,0),COLORCYAN;
STICKLINE(C,90,90,1,0),COLORYELLOW;
STICKLINE(C,10,10,1,0),COLORCYAN;
辨势:SMA(趋势线,3,1),COLORYELLOW;
IF(辨势>50 AND 趋势线>辨势,辨势,DRAWNULL ),COLORYELLOW,LINETHICK2;
IF(辨势<50 AND 趋势线>辨势,辨势,DRAWNULL),COLORFF00FF;
IF(辨势>50 AND 趋势线<辨势,辨势,DRAWNULL),COLORGREEN,LINETHICK2;
危险区:80,COLORFF85FF;
安全区:20,COLORYELLOW,POINTDOT;
顶部:90,COLORFFFF00;
强弱线:50,COLORGREEN,POINTDOT;
DRAWICON(CROSS(趋势线,辨势) AND 趋势线<80,辨势,1);
DRAWICON(CROSS(趋势线,顶部),顶部,2);
卖出:=CROSS(82,RSI);
STICKLINE(卖出,卖出,20,3,0),COLORFF5500;
STICKLINE(卖出,卖出,30,2,0),COLORFF8800;
STICKLINE(卖出,卖出,30,1,0),COLORFFAA00;
STICKLINE(卖出,卖出,30,0.5,0),COLORFFCC00;
D1:=(C+L+H)/3;
D2:=EMA(D1,6);
D3:=EMA(D2,5);
买:=CROSS(D2,D3);
DRAWICON(买,10,38);
GUPR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;
DRAWICON(CROSS(82,GUPR1),10,2);
DRAWTEXT(CROSS(82,GUPR1),35,'抛'),COLORYELLOW;
选股公式源码
{选股公式一:红箭头图标}
趋势线:=SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1),COLORYELLOW;
{转牛:IF(趋势线>50,趋势线,DRAWNULL),COLORRED;
转熊:IF(趋势线<50,趋势线,DRAWNULL),COLORGREEN;}
辨势:=SMA(趋势线,3,1),COLORYELLOW;
{DRAWICON(CROSS(趋势线,辨势) AND 趋势线<80,辨势,1);}
红箭头图标:CROSS(趋势线,辨势) AND 趋势线<80;
{选股公式二:红三角图标}
RSV:=(CLOSE-LLV(CLOSE,9))/(HHV(CLOSE,9)-LLV(CLOSE,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
D1:=(C+L+H)/3;
D2:=EMA(D1,6);
D3:=EMA(D2,5);
买:=CROSS(D2,D3);
{DRAWICON(买,10,38);}
红三角图标:买;
{卖出公式一:绿箭头图标}
趋势线:=SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1),COLORYELLOW;
{转牛:IF(趋势线>50,趋势线,DRAWNULL),COLORRED;
转熊:IF(趋势线<50,趋势线,DRAWNULL),COLORGREEN;}
顶部:=90,COLORFFFF00;
{DRAWICON(CROSS(趋势线,顶部),顶部,2);}
绿箭头图标:CROSS(趋势线,顶部);
{卖出公式二:抛}
RSV:=(CLOSE-LLV(CLOSE,9))/(HHV(CLOSE,9)-LLV(CLOSE,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
GUPR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;
{DRAWICON(CROSS(82,GUPR1),10,2);
DRAWTEXT(CROSS(82,GUPR1),35,'抛'),COLORYELLOW;}
抛:CROSS(82,GUPR1);
|