C/C++ www.gszb.com 股票公式指标网提供 Code复制内容到剪贴板
- 通达信版源码:
- 七剑下天山
-
-
- E1:=BARSCOUNT(C);
- AH:=HHV(H,200);
- AL:=LLV(L,200);
- B0:=(AH-AL)/40;
- KB1:=H+B0;
- KB2:=L-B0;
- STICKLINE((E1+0)/34=FLOOR((E1+0)/34),KB2,KB2-3*B0,1,0),COLORYELLOW,LINETHICK3;
- DRAWTEXT((E1+0)/34=FLOOR((E1+0)/34),KB2-2*B0,'时间窗'),COLORWHITE;
- {STICKLINE((OPEN >=
- CLOSE),CLOSE,OPEN,5,0),COLORFF6C00;
- STICKLINE((OPEN >=
- CLOSE),CLOSE,OPEN,4,0),COLORFF7B00;
- STICKLINE((OPEN >=
- CLOSE),CLOSE,OPEN,3,0),COLORFF9C00;
- STICKLINE((OPEN >=
- CLOSE),CLOSE,OPEN,2,0),COLORFFBE00;
- STICKLINE((OPEN >=
- CLOSE),CLOSE,OPEN,2.5,0),COLORFFCC00;
- STICKLINE((OPEN >=
- CLOSE),CLOSE,OPEN,1.5,0),COLORFFFF00;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,6,0),COLOR070084;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,5,0),COLOR0000A3;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,4,0),COLOR0000B7;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,3,0),COLOR0000CD;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,2,0),COLOR0000E9;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,2,0),COLOR0754E9;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,1.5,0),COLOR076EF3;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,1,0),COLOR077BF3;
- STICKLINE((CLOSE >
- OPEN),OPEN,LOW,1,0),COLOR0726CA;
- STICKLINE((CLOSE >
- OPEN),CLOSE,HIGH,1,0),COLOR0726CA;
- STICKLINE((OPEN >
- CLOSE),CLOSE,LOW,1,0),COLORDE9100;
- STICKLINE((OPEN >
- CLOSE),OPEN,HIGH,1,0),COLORDE9100;}
- 卖出线:=98;
- 阶段卖:=96;
- 趋势4:=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);
- 底部:=10;
- 买入信号RAWICON(CROSS(趋势4,底部),LOW,1);
- 卖出RAWICON(CROSS(卖出线,趋势4),HIGH,2);
- 顶压:HHV(MA(H,11),50),COLORFF9900,LINETHICK3;
- 短压:HHV(MA(H,11),15),COLOR0066FF,LINETHICK3;
- XL1:=LLV(MA(H,11),1);
- 趋势3:IF(XL1>=短压,短压,XL1),COLORRED,LINETHICK2;
- K1:=BACKSET(趋势3<REF(趋势3,1),2);
- IF(K1,趋势3,DRAWNULL),COLOR00CC33,LINETHICK2;
-
- RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
- KK1:=REF(RSV,1);KK2:=REF(RSV,2);KA:=RSV;KK3:=REF(RSV,3);KK4:=REF(RSV,4);KK5:=REF(RSV,5);
- KK80:=3*80-(POW(2/3,1)*KK1+POW(2/3,2)*KK2+POW(2/3,3)*KK3+POW(2/3,4)*KK4+3*POW(2/3,5)*KK5);
- KKK80:=SMA((KK80*(HHV(H,9)-LLV(L,9))/100)+LLV(L,9),3,1);
- 交叉:=3*SMA(SMA(KA,3,1),3,1)-(POW(2/3,1)*KK1+POW(2/3,2)*KK2+POW(2/3,3)*KK3+POW(2/3,4)*KK4+3*POW(2/3,5)*KK5);
- K转折:=3*SMA(KA,3,1)-(POW(2/3,1)*KK1+POW(2/3,2)*KK2+POW(2/3,3)*KK3+POW(2/3,4)*KK4+3*POW(2/3,5)*KK5);
- K转折价0:=SMA((K转折*(HHV(H,9)-LLV(L,9))/100)+LLV(L,9),3,1);
- 日交叉0:=SMA((交叉*(HHV(H,9)-LLV(L,9))/100)+LLV(L,9),3,1);
- DRAWTEXT(K转折价0>=KKK80 AND
- K转折价0>=日交叉0,日交叉0,'◆'),COLORFF00FF;
- 趋势:=
- 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),
- COLORYELLOW,LINETHICK2;
- 警戒:=趋势<=5 ;
- D1:=C/L>1.05 AND COUNT(警戒,3)>=1 AND
- C/REF(C,1)>1.01;
- DRAWTEXT(D1>0,L,'★长生剑'),COLOR00FF00;
- 趋势1:=
- MA(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),5);
-
- 买入1:= C/O>1.04 AND COUNT(趋势1<10,3)>=1;
- D2:=(买入1);
- DRAWTEXT(D2>0,L,'☆孔雀翎'),COLORFF00FF;
- M1:=(CLOSE-MA(CLOSE,30))/STD(CLOSE,15)*100;
- K:=SMA(M1,3,1);
- D:=SMA(K,3,1);
- J:=3*K-2*D;
- DD:=M1<-300;
- DA:=C/O>1.04 AND COUNT(M1<-300,3)>=1;
- D3:=DA;
- DRAWTEXT(D3>0,L,'★碧玉刀'),COLOR006EFF;
- 个股:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
- D4:=COUNT(个股<-8,3)>=1 AND ( C/L>1.05 ) ;
- DRAWTEXT(D4>0,L,'◎多情环'),COLORRED;
- LCA:=REF(CLOSE,1);
- E:=-100*(HHV(HIGH,84)-CLOSE)/(HHV(HIGH,84)-LLV(LOW,84));
-
- 底:=(( E<-98)*2000);
- D5:=( C/L>1.04 AND C>REF(C,1)) AND
- UNT(底,2)>=1;
- DRAWTEXT(D5>0,L,'Ψ离别钩'),COLOR0090E0;
- DIFFA:=(EMA(CLOSE,12) - EMA(CLOSE,26))*100+50;
- DC:=C/L>1.05 AND DIFFA<40;
- D6 :=FILTER(DC,5);
- DRAWTEXT(D6>0,L,'↑霸王枪'),COLOR00FF00;
- BB1:=LLV(LOW,5)=LLV(LOW,45) AND
- CLOSE>=OPEN*1.035 ;
- BB2:=CLOSE>(REF(HIGH,1)+REF(LOW,1))/2;
- BB3:=(CLOSE-OPEN)/OPEN*100;
- BB4:=REF(CLOSE,1);
- BB5:=SMA(MAX(CLOSE-BB4,0),6,1)/SMA(ABS(CLOSE-BB4),6,1)*100;
-
- BB6:=COUNT(BB5<20,20)>=1;
- BB108:=BB3>9 AND BB6;
- BB7:=(CLOSE-OPEN)/OPEN*100;
- BB8:=REF(CLOSE,1);
- BB9:=SMA(MAX(CLOSE-BB8,0),6,1)/SMA(ABS(CLOSE-BB8),6,1)*100;
-
- BB10:=COUNT(BB9<20,20)>=1;
- BB109:=BB7>9 AND BB10;
- DRAWTEXT(BB108 OR BB109>0,L,'★拳头'),COLORWHITE;
C/C++ www.gszb.com 股票公式指标网提供 Code复制内容到剪贴板
- 大智慧,飞狐版源码:
- e1:=BARSCOUNT(c);
- ah:=hhv(h,200);
- al:=llv(l,200);
- b0:=(ah-al)/40;
- kb1:=h+b0;
- kb2:=l-b0;
- stickline((e1+0)/34=FLOOR((e1+0)/34),kb2,kb2-3*b0,2,0),COLOryellow,LINETHICK3;
- drawtext((e1+0)/34=FLOOR((e1+0)/34),kb2-2*b0,'时间窗'),COLORwhite;
- STICKLINE((OPEN >=
- CLOSE),CLOSE,OPEN,5,0),colorFF6C00;
- STICKLINE((OPEN >=
- CLOSE),CLOSE,OPEN,4,0),colorFF7B00;
- STICKLINE((OPEN >=
- CLOSE),CLOSE,OPEN,3,0),colorFF9C00;
- STICKLINE((OPEN >=
- CLOSE),CLOSE,OPEN,2,0),colorFFBE00;
- STICKLINE((OPEN >=
- CLOSE),CLOSE,OPEN,2.5,0),colorFFCC00;
- STICKLINE((OPEN >=
- CLOSE),CLOSE,OPEN,1.5,0),colorFFFF00;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,6,0),color070084;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,5,0),color0000A3;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,4,0),color0000B7;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,3,0),color0000CD;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,2,0),color0000E9;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,2,0),color0754E9;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,1.5,0),color076EF3;
- STICKLINE((CLOSE >=
- OPEN),CLOSE,OPEN,1,0),color077BF3;
- STICKLINE((CLOSE >
- OPEN),OPEN,LOW,1,0),color0726CA;
- STICKLINE((CLOSE >
- OPEN),CLOSE,HIGH,1,0),color0726CA;
- STICKLINE((OPEN >
- CLOSE),CLOSE,LOW,1,0),colorDE9100;
- STICKLINE((OPEN >
- CLOSE),OPEN,HIGH,1,0),colorDE9100;
- 卖出线:=98;
- 阶段卖:=96;
- 趋势4:=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);
- 底部:=10;
- 买入信号:drawicon(CROSS(趋势4,底部),low,1);
- 卖出:drawicon(cross(卖出线,趋势4),high,2);
- 顶压:HHv(ma(h,11),50),Color00FF00,LINETHICK3;
- 短压:HHv(ma(h,11),15),Color0090E0,LINETHICK2;
- XL1:=llv(ma(h,11),1);
- 趋势3:IF(XL1>=短压,短压,XL1),Colorwhite,LINETHICK1;
- RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
- Kk1:=ref(RSV,1);Kk2:=ref(RSV,2);ka:=rsv;Kk3:=ref(RSV,3);Kk4:=ref(RSV,4);kk5:=ref(rsv,5);
- kk80:=3*80-(pow(2/3,1)*kk1+pow(2/3,2)*kk2+pow(2/3,3)*kk3+pow(2/3,4)*kk4+3*pow(2/3,5)*kk5);
- kkk80:=sma((kk80*(HHV(H,9)-LLV(L,9))/100)+LLV(L,9),3,1);
- 交叉:=3*sma(sma(ka,3,1),3,1)-(pow(2/3,1)*kk1+pow(2/3,2)*kk2+pow(2/3,3)*kk3+pow(2/3,4)*kk4+3*pow(2/3,5)*kk5);
- k转折:=3*sma(ka,3,1)-(pow(2/3,1)*kk1+pow(2/3,2)*kk2+pow(2/3,3)*kk3+pow(2/3,4)*kk4+3*pow(2/3,5)*kk5);
- k转折价0:=sma((k转折*(HHV(H,9)-LLV(L,9))/100)+LLV(L,9),3,1);
- 日交叉0:=sma((交叉*(HHV(H,9)-LLV(L,9))/100)+LLV(L,9),3,1);
- DRAWTEXT(k转折价0>=kkk80 and
- k转折价0>=日交叉0,日交叉0,'●'),COLORff00ff;
- 趋势:=
- 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),
- COLORYELLOW,linethick2;
- 警戒:=趋势<=5 ;
- d1:=c/l>1.05 and count(警戒,3)>=1 and
- c/ref(c,1)>1.01;
- DRAWTEXT(d1>0,L,'★长生剑'),Color00FF00;
- 趋势1:=
- MA(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),5);
-
- 买入1:= c/o>1.04 and count(趋势1<10,3)>=1;
- D2:=(买入1);
- DRAWTEXT(D2>0,L,'☆孔雀翎'),Colorff00FF;
- m1:=(CLOSE-MA(CLOSE,30))/STD(CLOSE,15)*100;
- K:=SMA(M1,3,1);
- D:=SMA(K,3,1);
- J:=3*K-2*D;
- dd:=m1<-300;
- DA:=c/o>1.04 and count(m1<-300,3)>=1;
- D3:=DA;
- DRAWTEXT(D3>0,L,'★碧玉刀'),Color006EFF;
- 个股:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
- D4:=count(个股<-8,3)>=1 and ( c/l>1.05 ) ;
- DRAWTEXT(D4>0,L,'◎多情环'),Colorred;
- LCa:=REF(CLOSE,1);
- E:=-100*(HHV(HIGH,84)-CLOSE)/(HHV(HIGH,84)-LLV(LOW,84));
-
- 底:=(( E<-98)*2000);
- D5:=( c/l>1.04 and c>ref(c,1)) and
- count(底,2)>=1;
- DRAWTEXT(D5>0,L,'Ψ离别钩'),Color0090E0;
- DIFFA:=(EMA(CLOSE,12) - EMA(CLOSE,26))*100+50;
- Dc:=c/L>1.05 and DIFFa<40;
- d6 :=filter(Dc,5);
- DRAWTEXT(D6>0,L,'↑霸王枪'),Color00ff00;
- BB1:=LLV(LOW,5)=LLV(LOW,45) AND
- CLOSE>=OPEN*1.035 ;
- BB2:=CLOSE>(REF(HIGH,1)+REF(LOW,1))/2;
- BB3:=(CLOSE-OPEN)/OPEN*100;
- BB4:=REF(CLOSE,1);
- BB5:=SMA(MAX(CLOSE-BB4,0),6,1)/SMA(ABS(CLOSE-BB4),6,1)*100;
-
- BB6:=COUNT(BB5<20,20)>=1;
- BB108:=BB3>9 AND BB6;
- BB7:=(CLOSE-OPEN)/OPEN*100;
- BB8:=REF(CLOSE,1);
- BB9:=SMA(MAX(CLOSE-BB8,0),6,1)/SMA(ABS(CLOSE-BB8),6,1)*100;
-
- BB10:=COUNT(BB9<20,20)>=1;
- BB109:=BB7>9 AND BB10;
- DRAWTEXT(bb108 or bb109>0,L,'★拳头'),Colorwhite;