beyond202104 发表于 2023-8-28 16:43:48

系列指标: 密码系列 (源码)


VAR1:=("399139$C");   

VAR2:=("399190$C");   

VAR3:=("399132$C");   

VAR4:=("399150$C");   

VAR5:=("399138$C");   

VAR6:=("399200$C");   

VAR7:=("399110$C");   

VAR8:=("399136$C");   

VAR9:=("399135$C");   

VAR10:=("399130$C");   

VAR11:=("399160$C");   

VAR12:=("999999$C");   

VAR13:=("399137$C");   

医药:=SUM((VAR1/REF(VAR1,1)-1)*100,0);   

金融:=SUM((VAR2/REF(VAR2,1)-1)*100,0);   

纺织:=SUM((VAR3/REF(VAR3,1)-1)*100,0);   

建筑:=SUM((VAR4/REF(VAR4,1)-1)*100,0);   

机械:=SUM((VAR5/REF(VAR5,1)-1)*100,0);   

地产:=SUM((VAR6/REF(VAR6,1)-1)*100,0);   

农林:=SUM((VAR7/REF(VAR7,1)-1)*100,0);   

电子:=SUM((VAR8/REF(VAR8,1)-1)*100,0);   

石化:=SUM((VAR9/REF(VAR9,1)-1)*100,0);   

制造:=SUM((VAR10/REF(VAR10,1)-1)*100,0);   

运输:=SUM((VAR11/REF(VAR11,1)-1)*100,0);   

上证:SUM((VAR12/REF(VAR12,1)-1)*100,0),COLORRED;   

金属:=SUM((VAR13/REF(VAR13,1)-1)*100,0);   

VAR17:=CONST(MA(医药,N));   

VAR18:=CONST(MA(金融,N));   

VAR19:=CONST(MA(纺织,N));   

VAR20:=CONST(MA(建筑,N));   

VAR21:=CONST(MA(机械,N));   

VAR22:=CONST(MA(地产,N));   

VAR23:=CONST(MA(农林,N));   

VAR24:=CONST(MA(电子,N));   

VAR25:=CONST(MA(石化,N));   

VAR26:=CONST(MA(制造,N));   

VAR27:=CONST(MA(运输,N));   

VAR28:=CONST(MA(上证,N));   

VAR29:=CONST(MA(金属,N));   

PQ:=VAR29;   

P1:=IF(BARSLAST(CURRBARSCOUNT=4),1,0);   

P2:=IF(BARSLAST(CURRBARSCOUNT=6),1,0);   

P3:=IF(BARSLAST(CURRBARSCOUNT=8),1,0);   

P4:=IF(BARSLAST(CURRBARSCOUNT=10),1,0);   

P5:=IF(BARSLAST(CURRBARSCOUNT=12),1,0);   

P6:=IF(BARSLAST(CURRBARSCOUNT=14),1,0);   

P7:=IF(BARSLAST(CURRBARSCOUNT=16),1,0);   

P8:=IF(BARSLAST(CURRBARSCOUNT=18),1,0);   

P9:=IF(BARSLAST(CURRBARSCOUNT=20),1,0);   

P10:=IF(BARSLAST(CURRBARSCOUNT=22),1,0);   

P11:=IF(BARSLAST(CURRBARSCOUNT=24),1,0);   

P12:=IF(BARSLAST(CURRBARSCOUNT=26),1,0);   

P13:=IF(BARSLAST(CURRBARSCOUNT=28),1,0);   

P14:=IF(BARSLAST(CURRBARSCOUNT=2),1,0);   

STICKLINE(医药,VAR17,IF(P2-P1,CONST(医药),DRAWNULL),5,-2),COLORFF00FF;   

STICKLINE(金融,VAR18,IF(P3-P2,CONST(金融),DRAWNULL),5,-2),COLORFF00FF;   

STICKLINE(纺织,VAR19,IF(P4-P3,CONST(纺织),DRAWNULL),5,-2),COLORFF00FF;   

STICKLINE(建筑,VAR20,IF(P5-P4,CONST(建筑),DRAWNULL),5,-2),COLORFF00FF;   

STICKLINE(机械,VAR21,IF(P6-P5,CONST(机械),DRAWNULL),5,-2),COLORFF00FF;   

STICKLINE(地产,VAR22,IF(P7-P6,CONST(地产),DRAWNULL),5,-2),COLORFF00FF;   

STICKLINE(农林,VAR23,IF(P8-P7,CONST(农林),DRAWNULL),5,-2),COLORFF00FF;   

STICKLINE(电子,VAR24,IF(P9-P8,CONST(电子),DRAWNULL),5,-2),COLORFF00FF;   

STICKLINE(石化,VAR25,IF(P10-P9,CONST(石化),DRAWNULL),5,-2),COLORFF00FF;   

STICKLINE(制造,VAR26,IF(P11-P10,CONST(制造),DRAWNULL),5,-2),COLORFF00FF;   

STICKLINE(运输,VAR27,IF(P12-P11,CONST(运输),DRAWNULL),5,-2),COLORFF00FF;   

STICKLINE(上证,VAR28,IF(P1-P14,CONST(上证),DRAWNULL),5,-1),COLORFF00FF;   

STICKLINE(金属,VAR29,IF(P13-P12,CONST(金属),DRAWNULL),5,-2),COLORFF00FF;   

STICKLINE(医药,PQ,IF(P2-P1,VAR17,DRAWNULL),4,0),COLORRED;   

STICKLINE(金融,PQ,IF(P3-P2,VAR18,DRAWNULL),4,0),COLORRED;   

STICKLINE(纺织,PQ,IF(P4-P3,VAR19,DRAWNULL),4,0),COLORRED;   

STICKLINE(建筑,PQ,IF(P5-P4,VAR20,DRAWNULL),4,0),COLORRED;   

STICKLINE(机械,PQ,IF(P6-P5,VAR21,DRAWNULL),4,0),COLORRED;   

STICKLINE(地产,PQ,IF(P7-P6,VAR22,DRAWNULL),4,0),COLORRED;   

STICKLINE(农林,PQ,IF(P8-P7,VAR23,DRAWNULL),4,0),COLORRED;   

STICKLINE(电子,PQ,IF(P9-P8,VAR24,DRAWNULL),4,0),COLORRED;   

STICKLINE(石化,PQ,IF(P10-P9,VAR25,DRAWNULL),4,0),COLORRED;   

STICKLINE(制造,PQ,IF(P11-P10,VAR26,DRAWNULL),4,0),COLORRED;   

STICKLINE(运输,PQ,IF(P12-P11,VAR27,DRAWNULL),4,0),COLORRED;   

STICKLINE(医药,PQ,IF(P2-P1,CONST(MA(医药,M)),DRAWNULL),0.8,0),COLORAAAAFF;   

STICKLINE(金融,PQ,IF(P3-P2,CONST(MA(金融,M)),DRAWNULL),0.8,0),COLORAAAAFF;   

STICKLINE(纺织,PQ,IF(P4-P3,CONST(MA(纺织,M)),DRAWNULL),0.8,0),COLORAAAAFF;   

STICKLINE(建筑,PQ,IF(P5-P4,CONST(MA(建筑,M)),DRAWNULL),0.8,0),COLORAAAAFF;   

STICKLINE(机械,PQ,IF(P6-P5,CONST(MA(机械,M)),DRAWNULL),0.8,0),COLORAAAAFF;   

STICKLINE(地产,PQ,IF(P7-P6,CONST(MA(地产,M)),DRAWNULL),0.8,0),COLORAAAAFF;   

STICKLINE(农林,PQ,IF(P8-P7,CONST(MA(农林,M)),DRAWNULL),0.8,0),COLORAAAAFF;   

STICKLINE(电子,PQ,IF(P9-P8,CONST(MA(电子,M)),DRAWNULL),0.8,0),COLORAAAAFF;   

STICKLINE(石化,PQ,IF(P10-P9,CONST(MA(石化,M)),DRAWNULL),0.8,0),COLORAAAAFF;   

STICKLINE(制造,PQ,IF(P11-P10,CONST(MA(制造,M)),DRAWNULL),0.8,0),COLORAAAAFF;   

STICKLINE(运输,PQ,IF(P12-P11,CONST(MA(运输,M)),DRAWNULL),0.8,0),COLORAAAAFF;   

STICKLINE(金属,PQ,IF(P13-P12,CONST(MA(金属,M)),DRAWNULL),0.8,0),COLORAAAAFF;   

DRAWTEXT(P2-P1,PQ-2,'医药'),COLORYELLOW;   

DRAWTEXT(P3-P2,PQ-2,'金融'),COLORYELLOW;   

DRAWTEXT(P4-P3,PQ-2,'纺织'),COLORYELLOW;   

DRAWTEXT(P5-P4,PQ-2,'建筑'),COLORYELLOW;   

DRAWTEXT(P6-P5,PQ-2,'机械'),COLORYELLOW;   

DRAWTEXT(P7-P6,PQ-2,'地产'),COLORYELLOW;   

DRAWTEXT(P8-P7,PQ-2,'农林'),COLORYELLOW;   

DRAWTEXT(P9-P8,PQ-2,'电子'),COLORYELLOW;   

DRAWTEXT(P10-P9,PQ-2,'石化'),COLORYELLOW;   

DRAWTEXT(P11-P10,PQ-2,'制造'),COLORYELLOW;   

DRAWTEXT(P12-P11,PQ-2,'运输'),COLORYELLOW;   

DRAWTEXT(P13-P12,PQ-2,'金属'),COLORYELLOW; 



DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);   

DEA : EMA(DIFF,M);   

MACD : 2*(DIFF-DEA), COLORSTICK,COLOR5454FF;   

DD:=C=HHV(C,180);   

EE:=DEA< REF(DEA,1) AND REF(DEA< REF(DEA,1),1)=1;   

CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;   

上升背离:(CC AND EE)*DEA,COLOR00FFFF;   

顶背离:(DD AND EE AND DEA< HHV(DEA,180))*DEA,STICK,LINETHICK3,COLORGREEN;   

FF:=C=LLV(C,180);   

GG:= DEA> REF(DEA,1) AND REF(DEA> REF(DEA,1),1)=1;   

LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;   

下降背离:(LL AND GG)*DEA,COLORMAGENTA;   

底背离:(FF AND GG AND DEA> LLV(DEA,180))*DEA,STICK,LINETHICK3,COLORRED;   

MM:=IF(MACD< 0,MACD,0);   

JJ:=MM> REF(MM,1);   

ZZ:=REF(JJ,1)=1;   

介入区:(JJ AND ZZ)*DEA,POINTDOT,COLORYELLOW;{MACD蓝柱缩短---指今日比昨天短}   

STICKLINE(介入区=DEA,DEA,DIFF,0.5,1),COLORYELLOW;   

DRAWTEXT(CROSS(DIFF,DEA ),0,'金↗'),COLORYELLOW;   

DRAWTEXT(CROSS(DEA,DIFF ),0,'死↘'),COLORFFFF00; 



短趋势线:MA(CLOSE,13),COLORRED,LINETHICK3;   

中线:=MA(CLOSE,33),LINETHICK1;   

中趋势线:MA(CLOSE,55),LINETHICK1,COLORGRAY;   

年线:MA(CLOSE,250),LINETHICK1,COLORLIGRAY,POINTDOT;   

涨:IF(短趋势线>REF(短趋势线,1),短趋势线,DRAWNULL),COLORRED,LINETHICK3;   

平:=IF(短趋势线=REF(短趋势线,1),短趋势线,DRAWNULL),COLOR00FFFF,LINETHICK3;   

跌:IF(短趋势线<REF(短趋势线,1),短趋势线,DRAWNULL),COLORGREEN,LINETHICK3;   

上极限:=((C-REF(MA(CLOSE,20),1))/20+短趋势线)*1.20;   

DRAWTEXT(CROSS(CLOSE,上极限),H*1.02,'减仓'),COLORGREEN;   

DRAWTEXT(CROSS(CLOSE,MA(C,13)) AND 短趋势线<REF(短趋势线 ,1) AND 短趋势线<中趋势线 ,H*1.02,'减仓'),COLORGREEN;   

DRAWTEXT(CROSS(短趋势线,C) AND INDEXC>MA(INDEXC,13) AND 短趋势线>REF(短趋势线 ,1) AND V<REF(V,1) AND 短趋势线>中趋势线 ,L*0.97,'买入'),COLORRED;   

STICKLINE(CROSS(短趋势线,C) AND 短趋势线>REF(短趋势线 ,1) AND V<REF(V,1) AND 短趋势线>中趋势线 ,L,L*0.99,2,0),COLORYELLOW;   

VAR1:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;   

DRAWTEXT(VAR1>9 AND V<REF(V,1) AND FILTER(VAR1<REF(VAR1,1),5),H*1.02,'洗盘'),COLORYELLOW;   

DRAWTEXT(VAR1>9 AND V>REF(V,1) AND FILTER(VAR1<REF(VAR1,1),5),H*1.02,'减仓'),COLORGREEN;   

DRAWTEXT(VAR1>20 AND FILTER(VAR1<REF(VAR1,1),5),H*1.06,'卖出'),COLORYELLOW;   

VAR2:=HHV(VAR1>20,10);   

DRAWTEXT(FILTER(VAR1<-9 AND VAR1>REF(VAR1,1),18) AND V>REF(V,1),L*0.98,'反弹'),COLORRED;   

DRAWTEXT(VAR1<-20 AND FILTER(VAR1> REF(VAR1,1),5),L*0.95,'抄底'),COLORYELLOW;   

DRAWTEXT(VAR2 AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),H*1.1,'危险'),COLORYELLOW;   



VAR12:=(HIGH - LOW);   

VAR3:=ABS((OPEN - CLOSE));   

VAR4:=(HIGH - IF((CLOSE > OPEN),CLOSE,OPEN));   

VAR5:=(IF((CLOSE > OPEN),OPEN,CLOSE) - LOW);   

VAR6:=((VAR3 / VAR12) * VOL);   

VAR7:=((VAR4 / VAR12) * VOL);   

VAR8:=((VAR5 / VAR12) * VOL);   

VARB:=(((MA(CLOSE,5) > MA(CLOSE,10)) AND (MA(CLOSE,10) > MA(CLOSE,30))) AND (MA(CLOSE,30) > MA(CLOSE,60)));   

VARA:=(((CLOSE - MA(CLOSE,5)) / MA(CLOSE,5)) * 100);   

DRAWTEXT((((((VAR6 > (MA(VOL,5) * 2)) AND 短趋势线>REF(短趋势线 ,1) AND (VAR6 >= VAR7)) AND (VAR6 >= VAR8)) AND (CLOSE > OPEN)) OR ((VOL > (MA(VOL,5) * 3)) AND VARB)) ,L*0.98,'主力介入'),COLORMAGENTA; 



VA1:=HHV(HIGH,9)-LLV(LOW,9);   

VA2:=HHV(HIGH,9)-CLOSE;   

VA3:=CLOSE-LLV(LOW,9);   

VA4:=VA2/VA1*100-70;   

VA5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;   

VA6:=(2*CLOSE+HIGH+LOW)/4;   

VA7:=SMA(VA3/VA1*100,3,1);   

VA8:=LLV(LOW,34);   

VA9:=SMA(VA7,3,1)-SMA(VA4,9,1);   

VARA:=IF(VA9>100,VA9-100,0);   

VARB:=HHV(HIGH,34);   

VARC:=EMA((VA6-VA8)/(VARB-VA8)*100,13);   

VARD:=EMA(0.667*REF(VARC,1)+0.333*VARC,2);   

VARE:=SMA(MAX(CLOSE-REF(CLOSE,1),0)/CLOSE,8,1)/SMA(ABS(INDEXC-REF(INDEXC,1))/INDEXC,8,1)*100-25;   

VARF:=MA(VARE,3);   

生命线:EMA(VARD,1), COLORFF00FF;   

VAR1:=HHV(HIGH,9)-LLV(LOW,9);   

VAR2:=HHV(HIGH,9)-CLOSE;   

VAR3:=CLOSE-LLV(LOW,9);   

VAR4:=((VAR2)/(VAR1))*(100)-70;   

VAR5:=((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60)))*(100);   

VAR6:=((2)*(CLOSE)+HIGH+LOW)/(4);   

VAR7:=SMA(((VAR3)/(VAR1))*(100),3,1);   

VAR8:=LLV(LOW,34);   

VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);   

VAR10:=IF((VAR9>100),VAR9-100,0);   

VAR11:=HHV(HIGH,34);   

B1:=EMA(((VAR6-VAR8)/(VAR11-VAR8))*(100),8);   

B2:EMA(B1,5),COLORFF7000;   

STICKLINE(B1-B2>0,B1,B2,2,0),COLORFFFFFF;   

STICKLINE(B1-B2<0,B1,B2,2,0),COLOR00FF00;   

V1:=MA(C,5)=HHV(MA(C,5),20);   

V2:=MA(C,5)>MA(C,10);   

V3:=MA(V,5)>MA(V,40)*1.01;   

V4:=COUNT(MA(C,1)>REF(C,1),2)=2;   

VV:=V1 AND V2 AND V3 AND V4;   

STICKLINE(V1 AND V2 AND V3 AND V4,100,110,2,0),COLOR00FF00;   

A1:=EMA(CLOSE,8);   

A2:=EMA(A1,20);   

A3:=CROSS(A1,A2);   

A4:=A1<EMA(CLOSE,120);   

STICKLINE(A3 AND A4,100,110,2,0),COLOR00FF00;   

A5:=3*SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,21,1)-2*   

SMA(SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,20,1),8,1);   

安全位:=20;   

低位转强:IF(CROSS(A5,安全位),50,0),COLORRED,STICK,LINETHICK4;   

开始拉升:IF(CROSS(VARC,生命线) AND VARC>VARD AND VARC<55 AND C>O,50,0),COLORFF00FF,STICK,LINETHICK4;   

A6:=LLV(C,500)=LLV(C,5) AND C/REF(C,1)>(1+9.8/100);   

极低涨:IF(A6,50,0),COLORYELLOW,STICK,LINETHICK4;{出现黄柱,呈现底部} 


淑侠 发表于 2024-1-20 21:22:46

不知该说些什么。。。。。。就是谢谢

白白彬彬 发表于 2024-1-25 19:22:34

真是 收益 匪浅

态形争 发表于 2024-3-14 18:24:50

真是 收益 匪浅
页: [1]
查看完整版本: 系列指标: 密码系列 (源码)