通达信古道西风主图指标公式

{古道西风主图 参数  K=12 P=4 K2=0(0-2) K3=8}

{卖出------------------------}
VAR55:=EMA(EMA(EMA(CLOSE,8),13),62);
 VAR56:=((REF(HIGH,1) + REF(LOW,1)) / 2);
 VAR57:=(MA(CLOSE,20) + (2 * STD(CLOSE,20)));
 VAR58:=((SMA(MAX((CLOSE - REF(CLOSE,1)),0),7,1) / SMA(ABS((CLOSE - REF(CLOSE,1))),7,1)) * 100);
卖出1:=FILTER(CROSS(79,VAR58),4);
 MA21:=REF(CLOSE,1);
 ZX:=((SMA(MAX((CLOSE - MA21),0),6,1) / SMA(ABS((CLOSE - MA21)),6,1)) * 100);
卖出2:=CROSS(84,ZX),COLORFF00FF;
卖出3:=CROSS(90,RSI);
卖出:=卖出1 OR 卖出2 OR 卖出3;
 DRAWICON(卖出,(HIGH * 1.002),15);
 {买入------------------------}
MA3:=MA(CLOSE,3);
 ZVAR4:=(((HIGH + LOW) + CLOSE) / 3);
 QQ2:=(CLOSE-LLV(LOW, 18))/(HHV(HIGH, 18)-LLV(LOW, 18))*100;
 QQ3:=SMA(QQ2, 9, 1);
 QQ4:=SMA(QQ3, 3, 1);
长趋势:=3*QQ3-2*QQ4,COLORWHITE,LINETHICK3;
趋势线:=EMA(QQ3, 3),COLORRED,LINETHICK3;
金叉:= CROSS(长趋势,趋势线);
AAAA1:=AMOUNT/V;
 BBB1:=L<AAAA1*0.9;
 CCC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
 DDD1:=L<MA(C,5)*0.921;
 EEE1:=V<MA(V,5)*1.5;
老鼠仓:=BBB1 AND CCC1 AND DDD1 AND EEE1,,NODRAW;
 X1:=(C+L+H)/3;
 BB5:=ATAN(EMA(X1,7)-REF(EMA(X1,7),1))*3.1416*10;
 VAR1:=(MA(CLOSE,80)-MA(CLOSE,13)/3);
 VAR2:=( MA((CLOSE-VAR1)/VAR1,1));
 VVAR3:=(CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100;
 VVAR4:=SMA(VVAR3,4,1);
 MMA:=EMA(VAR2,12)*0.7;
 MMB:=EMA(VAR2,3);
快到底:=IF(LLV(MMB-MMA,12)>0,0,-20),LINETHICK2,COLORGREEN;
 DIFF:=( EMA(CLOSE,12) - EMA(CLOSE,26))*100;
 DEA:=EMA(DIFF,9);
 MACD:= 2*(DIFF-DEA);
抄底:=IF(快到底<0 AND CROSS(MACD,0) AND ZVAR4<18,1,0);
 AVAR2:=(2*CLOSE+HIGH+LOW)/4;
 AVAR3:=IF(YEAR>=2099 AND MONTH>2,0,1);
 AVAR4:=LLV(LOW,5);
 AVAR5:=HHV(HIGH,4);
散户:= EMA((AVAR2-AVAR4)/(AVAR5-AVAR4)*100,4)*AVAR3;
庄家:= EMA(0.667*REF(散户,1)+0.333*散户,2)*AVAR3;
试买:=(((CROSS(散户,庄家) AND 散户<50 AND 29<散户)) NOT 大雪)
OR (CROSS(散户,庄家) AND 散户<30 { AND 角1>0}) OR 抄底;
AA05:=MA(C,5),COLOR0099CC;
五日乖离率:=(C-AA05)/AA05*100;
 BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);
加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;
 AA10:=MA(C,10);
 AA20:=MA(C,20);BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;
 AA30:=MA(C,30);
三拾日乖离率:=(C-AA30)/AA30*100;
加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND
 AA05>REF(AA05,1)  AND 三拾日乖离率>REF(三拾日乖离率,1) AND
 AA10>REF(AA10,1)
 AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1)  ,10) ;
 MV3:=EMA(V,3);
 MV3角度:=ATAN((MV3/REF(MV3,1)-1)*100)*180/3.1416;
 MA3角度:=ATAN((MA3/REF(MA3,1)-1)*100)*180/3.1416;
 MV5:=EMA(V,5);
 MA5:=EMA(C,5);
 MV5角度:=ATAN((MV5/REF(MV5,1)-1)*100)*180/3.1416;
 MA5角度:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;
 MV10:=EMA(V,10);
 MA10:=EMA(C,10);
 MV10角度:=ATAN((MV10/REF(MV10,1)-1)*100)*180/3.1416;
 MA10角度:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;
强弱度:=(MV3角度+MA3角度+MV5角度+MA5角度+MV10角度+MA10角度)/6,COLORFFFFFF;
 QBD:=CROSS(强弱度,50) AND COUNT(强弱度>50,7)<=3;
启爆点:=IF(K=0 AND QBD AND COUNT(QBD,4)=1,50,0),COLOR00FFFF;
半月相对价位:=(C-LLV(L,13))/(HHV(H,13)-LLV(L,13))*10;
半月相对价位M:=SMA(半月相对价位,3,2);
半月相对价位MM:=SMA(半月相对价位M,10,6);
 K13:=MA(半月相对价位MM,3);
福缘:=半月相对价位MM>=K13,COLORRED;
启爆福缘:=K=0 AND 启爆点 AND 福缘;
HD :=HIGH-REF(HIGH,1);
 LLD :=REF(LOW,1)-LOW;
 DMP:=EXPMEMA(IF(HD>0&&HD>LLD,HD,0),14);
 DMM:=EXPMEMA(IF(LLD>0&&LLD>HD,LLD,0),14);
 AK:=EMA((DMP-DMM)*1,3)*100+50,COLORFFFFFF;
 AD:=EMA((MA(DMP,3)-MA(DMM,3))*1,3)*100+50,COLORFFFFFF;
 DRAWICON(CROSS(AK,AD) AND 启爆点 AND 福缘,L*0.99 ,9);
 DRAWICON(老鼠仓 OR 金叉,(LOW - (LOW * 0.01)),1);
 MH:=K*10;
 MK:=K3*10;
 HH:=CONST(HHV(H,MH));
 LH:=CONST(LLV(H,MH));
 LC:=CONST(LLV(L,MK));
 HC:=CONST(HHV(H,MK));
幅1:=(L-LC)/LC*100;
 AAA:=IF(L=LC,1,0);
 AAB:=BARSLAST(AAA),NODRAW;
幅2:=(H-HC)/HC*100;
 BBA:=IF(H=HC,1,0);
 BBB:=BARSLAST(BBA),NODRAW;
 R1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));
 R2:=(REF(R1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
 R3:=(REF(R2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
 R4:=(REF(R3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
 R5:=(REF(R4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
 R6:=(REF(R5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
 R7:=(REF(R6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
 R8:=(REF(R7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
 R9:=(REF(R8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
 RA:=(REF(R9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
 RB:=(REF(RA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
 RC:=(REF(RB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
 RD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));
 RE:=(REF(RD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
 RF:=(REF(RE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
 R10:=(REF(RF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
 R11:=(REF(R10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
 R12:=(REF(R11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
 R13:=(REF(R12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
 R14:=(REF(R13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
 R15:=(REF(R14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
 R16:=(REF(R15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
 R17:=(REF(R16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
 R18:=(REF(R17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
 R19:=REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1) AND R1;
 R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);
 VAR3:=IF(C<200 ,MA(COST(80),3),2500),NODRAW;
 VAR4:=(((HIGH + LOW) + CLOSE) / 3);
 VAR5:=EMA(((((OPEN + HIGH) + LOW) + CLOSE) / 4),2330);
 VAR6:=(VAR5 + ((VAR5 * 6) / 100));
短买春:=R19,NODRAW,COLOR00DD00;
秋离场:=R1A,NODRAW,COLOR2288DD;
红持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,NODRAW,COLOR0000FF;
阴观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,NODRAW,COLOR999999;
急速超跌关注:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORBBBBBB,NODRAW;
 Q1:=CONST(IF(短买春,0,IF(秋离场,100,IF(红持股,100,IF(急速超跌关注,50,50))))),NODRAW;
 Q2:=CONST(IF(短买春,80,IF(秋离场,100,IF(红持股,0,IF(急速超跌关注,50,50))))),NODRAW;
 Q3:=CONST(IF(短买春,0,IF(秋离场,20,IF(红持股,50,IF(急速超跌关注,50,50))))),NODRAW;
 DRAWRECTREL(970,0,1000,990,RGB(Q1,Q2,Q3));
 DRAWRECTREL(970,189,1000,807,RGB(0,55,5));
 DRAWRECTREL(970,374,1000,610,RGB(0,5,55));
 DRAWRECTREL(970,495,1000,495,RGB(255,00,00));
 A:=EMA((EMA(C,29)+EMA(C,31)+EMA(C,33))/3,3);
 A1:=EMA((EMA(C,1)+EMA(C,3)+EMA(C,5))/3,3),COLOR1010FF;
 A2:=EMA((EMA(C,3)+EMA(C,5)+EMA( C,7))/3,3),COLOR1020FF;
 MT1:=IF(ISLASTBAR,REF((C*2-REF(C,3)),1),DRAWNULL);
 MT2:=IF(ISLASTBAR,REF((C*2-REF(C,3)),2),DRAWNULL);
 MT3:=IF(ISLASTBAR,C*2-REF(C,3),DRAWNULL);
 JRH:=HHV(C,2);
 JRL:=LLV(C,2);

离场:=IF(红持股,JRL,DRAWNULL);
今离场价:=REF(离场,1)COLOR0000FF,NODRAW;
进:=IF(阴观望,JRH,DRAWNULL);
今进场价:=REF(进,1),COLOR00FF00,NODRAW;
下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);
 RRRSV:=SMA(下档线,3,1);
 KKK:=SMA(RRRSV,3,1);
 DDDDD:=((3 * RRRSV) - (2 * KKK));
 JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);
 RSV24:=SMA(JJ12,3,1);
 K24:=SMA(RSV24,3,1);
 D24:=((3 * RSV24) - (2 * K24));
压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)))),COLORFFFFFF;
底部:=LLV(HIGH,30),COLOR00FF00;
压力位:=IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;
底部位:=IF(ISLASTBAR,底部,DRAWNULL),NODRAW;
 AA1:=IF(ISLASTBAR AND (红持股 OR REF(红持股,1)=1),1,0),NODRAW;
 AA2:=IF(ISLASTBAR AND (阴观望 OR REF(阴观望,1)=1),1,0),NODRAW;
 A99:=EMA((EMA(C,17)+EMA(C,19)+EMA( C,21))/3,3),COLOR1090FF;
 A233:=A-(A99-A),COLORFF9010;
中轴:=MA(C,21),COLORFFCC33;
压力1:=IF(K2=1 AND (中轴 + 2*STD(C,21))<=HH,中轴 + 2*STD(C,21),DRAWNULL);
支撑1:=IF(K2=1 AND (中轴 - 2*STD(C,21))>=LH,中轴 - 2*STD(C,21),DRAWNULL);
压力3:=中轴 + 2*STD(C,21);
支撑3:=中轴 - 2*STD(C,21);

压力:IF(K2=1,压力1,压力3),COLOR005555,LINETHICK3;
支撑:IF(K2=1,支撑1,支撑3),COLOR005555,LINETHICK3;
 A3:IF(K2!=2, EMA((EMA(C,5)+EMA(C,7)+EMA( C,9))/3,3),DRAWNULL)COLOR1030FF;
 A4:IF(K2!=2, EMA((EMA(C,7)+EMA(C,9)+EMA( C,11))/3,3),DRAWNULL),COLOR1040FF;
 A5:IF(K2!=2, EMA((EMA(C,9)+EMA(C,11)+EMA( C,13))/3,3),DRAWNULL)COLOR1050FF;
 A6:IF(K2!=2, EMA((EMA(C,11)+EMA(C,13)+EMA( C,15))/3,3),DRAWNULL)COLOR1060FF;
 A7:IF(K2!=2, EMA((EMA(C,13)+EMA(C,15)+EMA( C,17))/3,3),DRAWNULL)COLOR1070FF;
 A8:IF(K2!=2, EMA((EMA(C,15)+EMA(C,17)+EMA( C,19))/3,3),DRAWNULL)COLOR1080FF;
 A9:IF(K2!=2, EMA((EMA(C,17)+EMA(C,19)+EMA( C,21))/3,3),DRAWNULL)COLOR1080EF;
 A10:IF(K2!=2, EMA((EMA(C,19)+EMA(C,21)+EMA( C,23))/3,3),DRAWNULL)COLOR10C0FF;
 A11:IF(K2!=2, EMA((EMA(C,21)+EMA(C,23)+EMA( C,25))/3,3),DRAWNULL)COLOR10E0FF;
 A15:IF(K2!=2, A-(A1-A*0.997),DRAWNULL)COLORFF1010;
 A16:IF(K2!=2, A-(A2-A),DRAWNULL)COLORFF2010;
 A17:IF(K2!=2, A-(A3-A),DRAWNULL)COLORFF3010;
 A18:IF(K2!=2, A-(A4-A),DRAWNULL)COLORFF4010;
 A19:IF(K2!=2, A-(A5-A),DRAWNULL)COLORFF5010;
 A20:IF(K2!=2, A-(A6-A),DRAWNULL)COLORFF6010;
 A21:IF(K2!=2, A-(A7-A),DRAWNULL)COLORFF7010;
 A22:IF(K2!=2, A-(A8-A),DRAWNULL)COLORFF8010;
 A23:IF(K2!=2, A-(A9-A),DRAWNULL)COLORFF9010;
 A24:IF(K2!=2, A-(A10-A),DRAWNULL)COLORFFC010;
 A25:=IF(K2!=2, A-(A11-A*0.997),DRAWNULL)COLORFFE010;
 AK2:=IF(K2=2,EMA((EMA(C,5)+EMA(C,7)+EMA( C,9))/3,3),DRAWNULL);
 AK1:=IF(K2=2,A-(A1-A*0.997),DRAWNULL);
 DRAWBAND(AK2,RGB(250,250,250),EMA((EMA(C,1)+EMA(C,3)+EMA(C,5))/3,3),RGB(250,00,00));
 DRAWBAND(AK1,RGB(250,250,0),A-(A2-A),RGB(00,00,250));
 DRAWNUMBER(ISLASTBAR AND BBB>3,HC,幅2);
 DRAWNUMBER(ISLASTBAR AND AAB>3,LC+(HC-LC)*0.05,幅1);
 FD:=(H-L)/3;
 OPEN1:=O>FD*2+L;
 OPEN3:=O<FD+L;
 OPEN2:=NOT(OPEN1 OR OPEN3);
 CLOSE1:=C>FD*2+L;
 CLOSE3:=C<FD+L;
 CLOSE2:=NOT(CLOSE1 OR CLOSE3);
 DFZD:=CLOSE1 OR (OPEN3 AND CLOSE2);
 WQS1:=OPEN2 AND CLOSE2;
 KFZD:=NOT(DFZD OR WQS1);
 ZD:=(H+L)/2;
 QSXS:=ZD>REF(H,1);
 QSXX:=ZD<REF(L,1);
 WQS2:=NOT(QSXS OR QSXX);
 ZTDL:=V>REF(V,1)*1.1;
 FTDL:=V<REF(V,1)*0.7;
 ZTDL2:=ZTDL AND FTDL<1;
 FTDL2:=FTDL AND ZTDL<1;
 MFI1:=(H-L)/(V/10000);
 MFI2:=(H-L)/(V/1000000);
 ZMFI1:=MFI1>REF(MFI1,1);
 ZMFI2:=MFI2>REF(MFI2,1);
 ZMFI:=ZMFI1 OR ZMFI2;
 FMFI:=NOT(ZMFI);
 LD:=ZTDL2 AND ZMFI;
 ST:=FTDL2 AND FMFI;
 WZ:=FTDL2 AND ZMFI;
 QF:=ZTDL2 AND FMFI;
 S11:=DFZD AND QSXS ;
 S22:=KFZD AND QSXX ;
 S33:=DFZD AND QSXX;
 S44:=KFZD AND QSXS;
 S55:=DFZD AND WQS2;
 S66:=KFZD AND WQS2;
 S77:=WQS1 AND (QSXS OR QSXX OR WQS2);
 DRAWKLINE(H,O,L,C);
 STICKLINE(S22 ,C ,O,3,0 ),COLORFF2020;
 STICKLINE(S11,C,O,3 ,0 ),COLOR2020FF;
 STICKLINE(S33,C,O,3,0),COLORYELLOW;
 STICKLINE(S44,C,O,3,0),COLORFFCC66;
 STICKLINE(S55,C,O,3,0),COLORFF00FF;
 STICKLINE(S66,C,O,3,0),COLOR00FF00;
 STICKLINE(S77,C,O,3,0),COLORGRAY;
 STICKLINE(1,C,O,0,0),COLOREEEEEE;
 STICKLINE(ISLASTBAR ,压力位,压力位,70,0),COLORFFFFFF;
 STICKLINE(ISLASTBAR ,底部位,底部位,60,0),COLOR00FF00;
 N:=IF(TOTALBARSCOUNT>=120,120,TOTALBARSCOUNT);
 HH0:=HHV(H,N);
 LL0:=LLV(L,N);
 MM0:=CONST((HH0+LL0)*0.5);
 T1:=IF(FINDSTR(EXTERNSTR(0,13),'万元'),STRCAT('敢死队席位:',EXTERNSTR(0,13)),'');
 T2:=IF(FINDSTR(EXTERNSTR(0,12),'。'),STRCAT('智能诊断:',EXTERNSTR(0,12)),'');
 T3:=IF(FINDSTR(EXTERNSTR(0,8),'公告'),STRCAT('年报业绩:',EXTERNSTR(0,8)),'');
 T4:=IF(FINDSTR(EXTERNSTR(0,10),','),STRCAT('主题投资:',EXTERNSTR(0,10)),'');
 T5:=IF(FINDSTR(EXTERNSTR(0,15),'-'),STRCAT('解禁日期:',EXTERNSTR(0,15)),'');
 T6:=IF(FINDSTR(EXTERNSTR(0,1),','),STRCAT('千股千评:',EXTERNSTR(0,1)),'');
 T7:=IF(FINDSTR(EXTERNSTR(0,14),'-'),STRCAT('业绩预报:',EXTERNSTR(0,14)),'');
 T8:=IF(FINDSTR(EXTERNSTR(0,11),'-'),STRCAT('机构评级:',EXTERNSTR(0,11)),'');
 T9:=IF(FINDSTR(EXTERNSTR(0,9),'-'),STRCAT('中报业绩:',EXTERNSTR(0,9)),'');
 S01:=CONST(IF(REF(C,N-15)>MM0,1.00,-0.08));
 S02:=CONST(IF(REF(C,N-15)>MM0,-1,1));
 S1:=IF(FINDSTR(EXTERNSTR(0,13),'万元'),S01+(0.08*S02),S01);
 S2:=IF(FINDSTR(EXTERNSTR(0,12),'。'),S1+(0.08*S02),S1);
 S3:=IF(FINDSTR(EXTERNSTR(0,8),'公告'),S2+(0.08*S02),S2);
 S4:=IF(FINDSTR(EXTERNSTR(0,10),','),S3+(0.08*S02),S3);
 S5:=IF(FINDSTR(EXTERNSTR(0,15),'-'),S4+(0.08*S02),S4);
 S6:=IF(FINDSTR(EXTERNSTR(0,1),','),S5+(0.08*S02),S5);
 S7:=IF(FINDSTR(EXTERNSTR(0,14),'-'),S6+(0.08*S02),S6);
 S8:=IF(FINDSTR(EXTERNSTR(0,11),'-'),S7+(0.08*S02),S7);
 S9:=IF(FINDSTR(EXTERNSTR(0,9),'-'),S8+(0.08*S02),S8);
 K:=IF(S1<=0,0.06,IF(S1>=0,-0.05,0));
 {DRAWTEXT_FIX(K2!=1,0,S1+K,0,T1)COLOR00FFFF;
 DRAWTEXT_FIX(K2!=1,0,S2+K,0,T2)COLORFFFFFF;
 DRAWTEXT_FIX(K2!=1,0,S3+K,0,T3)COLORFF00FF;
 DRAWTEXT_FIX(K2!=1,0,S4+K,0,T4)COLOR0088FF;
 DRAWTEXT_FIX(K2!=1,0,S5+K,0,T5)COLOR00FF00;
 DRAWTEXT_FIX(K2!=1,0,S6+K,0,T6)COLOR0000FF;
 DRAWTEXT_FIX(K2!=1,0,S7+K,0,T7)COLOR00CCFF;
 DRAWTEXT_FIX(K2!=1,0,S8+K,0,T8)COLORFF88FF;
 DRAWTEXT_FIX(K2!=1,0,S9+K,0,T9)COLORBBFFFF;}
 WN:=P;{原码 N:=3;}
 WA1:=REF(H,WN)=HHV(H,2*WN+1); WB1:=FILTER(WA1,WN);
 WC1:=BACKSET(WB1,WN+1);
 WD1:=FILTER(WC1,WN);{高点}
WA2:=REF(L,WN)=LLV(L,2*WN+1); WB2:=FILTER(WA2,WN);
 WC2:=BACKSET(WB2,WN+1);
 WD2:=FILTER(WC2,WN);{低点}
WR1:=BACKSET(ISLASTBAR,BARSLAST(WD1)+1); WS1:=WR1>REF(WR1,1); {前一高}
WT1:=BACKSET(ISLASTBAR,BARSLAST(WD2)+1); WU1:=WT1>REF(WT1,1); {前一低}
WR2:=BACKSET(WS1,REF(BARSLAST(WD1),1)+2); WS2:=WR2>REF(WR2,1); {前二高}
WT2:=BACKSET(WU1,REF(BARSLAST(WD2),1)+2); WU2:=WT2>REF(WT2,1); {前二低}
WR3:=BACKSET(WS2,REF(BARSLAST(WD1),1)+2); WS3:=WR3>REF(WR3,1); {前三高}
WT3:=BACKSET(WU2,REF(BARSLAST(WD2),1)+2); WU3:=WT3>REF(WT3,1); {前三低}
WR4:=BACKSET(WS3,REF(BARSLAST(WD1),1)+2); WS4:=WR4>REF(WR4,1); {前四高}
WT4:=BACKSET(WU3,REF(BARSLAST(WD2),1)+2); WU4:=WT4>REF(WT4,1); {前四高}
压力A:=DRAWLINE(WS2,H,WS1,H,1),COLOR0000FF; {★压力1:}        
支撑A:=DRAWLINE(WU2,L,WU1,L,1),COLOR0000FF;{★支撑1:}
压力B:=DRAWLINE(WS3,H,WS2,H,1),COLOR999999; {★压力2:}
支撑B:=DRAWLINE(WU3,L, WU2,L,1),COLOR999999;{★支撑2:}        
IF(BETWEEN(压力A,HH,LH),压力A,DRAWNULL),COLOR999900;
 IF(BETWEEN(支撑A,HH,LH),支撑A,DRAWNULL),COLOR999900;
 IF(BETWEEN(压力B,HH,LH),压力B,DRAWNULL),COLOR999999;
 IF(BETWEEN(支撑B,HH,LH),支撑B,DRAWNULL),COLOR999999;
 {DRAWLINE(WS4,H,WS3,H,1),COLOR00CCCC;
 DRAWLINE(WU4,L, WU3,L,1),POINTDOT;}




未来函数检测结果如下:
该公式包含未来函数:BACKSET
该公式包含未来函数:COST
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图