通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
公式解读:
三连阴:=COUNT(C O,3)=3;去除股:=CAPITAL/1000000 12;{流通盘为15亿以下}A4:=DOWNNDAY(C,3);A1:=(REF(C,1)/C-1)*100 5;A3:=(REF(C,1)/C-1)*100 9.8;A5:=(C/REF(C,1)-1)*100 9.8;A6:=COUNT(A5,18) 0;A7:=(REF(C,1)/C-1)*100 (REF(C,2)/REF(C,1)-1)*100;A8:=COUNT(COUNT(A5,3)=3,22) 1;XG:A8ANDA7ANDCOUNT(A5,7) 1ANDA6AND三连阴ANDREF(C =O,3)AND去除大盘股ANDCOUNT(A1,3) 0AND(REF(C,3)/C-1)*100 9ANDV REF(V,1)ANDREF(V,1) REF(V,2);
NAA:=REF((MAX(MA(C,1),MA(C,55))-MIN(MA(C,1),MA(C,55)))/MIN(MA(C,1),MA
(C,55))*1000 60,1)ANDEMA((EMA(CLOSE,12)-EMA(CLOSE,26)),9) REF(EMA
((EMA(CLOSE,12)-EMA(CLOSE,26)),9),1)AND(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100 3;
NA1:=MIN(MA(C,5),MA(C,10)) MA(C,60)ANDCROSS(MA(C,5),MA(C,10));
NA2:=MIN(MA(C,5),MA(C,10))/MA(C,60) 1.05;
NA3:=COUNT(V MA(V,10),10) 6;
XG:NAAANDNA1ANDNA2ANDNA3,COLOR00FF00,LINETHICK2;
DRAWTEXT(XG,0.8, XG ),COLORRED;
{参数:N=40;M=3}
PC:(C+REF(C,1)+O)/3;
高:=REF(HHV(H,N),M);
低:=REF(LLV(L,N),M);
H19:=高-(高-低)*0.191;
H38:=高-(高-低)*0.382;
H中:=高-(高-低)*0.5;
H61:=高-(高-低)*0.618;
H80:=高-(高-低)*0.809;
顶点:REFDATE(高,DATE),COLORWHITE;
%19.8:REFDATE(H19,DATE),COLORYELLOW;
%38.2:REFDATE(H38,DATE),COLORMAGENTA;
%50:REFDATE(H中,DATE),COLORRED;
%61.8:REFDATE(H61,DATE),COLORMAGENTA;
%80.9:REFDATE(H80,DATE),COLORYELLOW;
低点:REFDATE(低,DATE),COLORWHITE;
DRAWTEXT(ISLASTBAR,顶点, 顶点 ),COLORWHITE;
DRAWTEXT(ISLASTBAR,%19.8, %19.8安全 ),COLORYELLOW;
DRAWTEXT(ISLASTBAR,%38.2, %38.2 ),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,%50, %50 ),COLORRED;
DRAWTEXT(ISLASTBAR,%61.8, %61.8 ),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,%80.9, %80.9 ),COLORYELLOW;
DRAWTEXT(ISLASTBAR,低点, 低点 ),COLORWHITE;
AAA:=(3*C+H+L+O)/6;
VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;
VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;
VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;
VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;
VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;
VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
STICKLINE(VAR1 VAR6,VAR1,VAR6,0.5,0),COLORFF00FF;
STICKLINE(C =O,C,O,3,0),COLOR000045;
STICKLINE(C =O,C,O,2,0),COLOR000085;
STICKLINE(C =O,C,O,1,0),COLOR0000E5;
STICKLINE(C =O,H,L,0,0),COLOR0000F5;
STICKLINE(C O,C,O,3,0),COLOR353500;
STICKLINE(C O,C,O,2,0),COLOR555500;
STICKLINE(C O,C,O,1,0),COLOR858500;
STICKLINE(C O,H,L,0,0),COLOR959500;
:VAR1,COLORWHITE;
:VAR6,COLORYELLOW;
下跌:IF(VAR1=VAR6,VAR6,DRAWNULL),COLORGREEN;
M3:MA(CLOSE,3);M13:MA(CLOSE,13);M34:MA(CLOSE,34),COLORRED,LINETHICK2;
X:=BARSLAST(REF(CROSS(C,MA(C,120)),1))ANDCROSS(MA(C,20),MA(C,120));
IF(M34 REF(M34,1),M34,DRAWNULL),COLORGREEN,LINETHICK2;
STICKLINE(M3 =M13ANDM34 =REF(M34,1),H,L,0.1,0),COLOR0000DD;
STICKLINE(M3 =M13ANDM34 =REF(M34,1)ANDC =O,O,C,3,1),COLOR0000DD;
STICKLINE(M3 =M13ANDM34 =REF(M34,1)ANDC O,O,C,3,0),COLOR0000DD;
STICKLINE(M3 M13ANDM34 =REF(M34,1),H,L,0.1,0),COLORFFBB00;
STICKLINE(M3 M13ANDM34 =REF(M34,1)ANDC =O,O,C,3,1),COLORFFBB00;
STICKLINE(M3 M13ANDM34 =REF(M34,1)ANDC O,O,C,3,0),COLORFFBB00;
STICKLINE(M3 M13ANDM34 REF(M34,1),H,L,0.1,0),COLORFF0000;
STICKLINE(M3 M13ANDM34 REF(M34,1)ANDC =O,O,C,3,1),COLORFF0000;
STICKLINE(M3 M13ANDM34 REF(M34,1)ANDC O,O,C,3,0),COLORFF0000;
STICKLINE(M3 =M13ANDM34 REF(M34,1),H,L,0.1,0),COLORFF00FF;
{参数:
P:1/100/6
N:1/100/3
RN:1/100/10
RM:1/30/3
}
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)*10;
金融:=SUM((VAR2/REF(VAR2,1)-1)*100,0)*10;
纺织:=SUM((VAR3/REF(VAR3,1)-1)*100,0)*10;
建筑:=SUM((VAR4/REF(VAR4,1)-1)*100,0)*10;
机械:=SUM((VAR5/REF(VAR5,1)-1)*100,0)*10;
地产:=SUM((VAR6/REF(VAR6,1)-1)*100,0)*10;
农林:=SUM((VAR7/REF(VAR7,1)-1)*100,0)*10;
电子:=SUM((VAR8/REF(VAR8,1)-1)*100,0)*10;
石化:=SUM((VAR9/REF(VAR9,1)-1)*100,0)*10;
制造:=SUM((VAR10/REF(VAR10,1)-1)*100,0)*10;
运输:=SUM((VAR11/REF(VAR11,1)-1)*100,0)*10;
上证:=SUM((VAR12/REF(VAR12,1)-1)*100,0)*10;
金属:=SUM((VAR13/REF(VAR13,1)-1)*100,0)*10;
医药A:SUM((VAR1/REF(VAR1,1)-1)*100,0)*2+100,COLORWHITE;
金融A:SUM((VAR2/REF(VAR2,1)-1)*100,0)*2+100,COLORRED;
纺织A:=SUM((VAR3/REF(VAR3,1)-1)*100,0)*2+100;
建筑A:=SUM((VAR4/REF(VAR4,1)-1)*100,0)*2+100;
机械A:=SUM((VAR5/REF(VAR5,1)-1)*100,0)*2+100;
地产A:SUM((VAR6/REF(VAR6,1)-1)*100,0)*2+100,LINETHICK1,COLORMAGENTA;
农林A:=SUM((VAR7/REF(VAR7,1)-1)*100,0)*2+100,COLORGREEN;
电子A:SUM((VAR8/REF(VAR8,1)-1)*100,0)*2+100;
石化A:=SUM((VAR9/REF(VAR9,1)-1)*100,0)*2+100;
制造A:=SUM((VAR10/REF(VAR10,1)-1)*100,0)*2+100;
运输A:SUM((VAR11/REF(VAR11,1)-1)*100,0)*2+100,LINETHICK1,COLORYELLOW;
上证A:SUM((VAR12/REF(VAR12,1)-1)*100,0)*2+100,LINETHICK3;
金属A:=SUM((VAR13/REF(VAR13,1)-1)*100,0)*2+100,LINETHICK1;
当前猎狼线:SUM((C/REF(C,1)-1)*100,0)*2+100,LINETHICK2,COLOR0000FF;
VAR17:=CONST(MA(医药,RN));
VAR18:=CONST(MA(金融,RN));
VAR19:=CONST(MA(纺织,RN));
VAR20:=CONST(MA(建筑,RN));
VAR21:=CONST(MA(机械,RN));
VAR22:=CONST(MA(地产,RN));
VAR23:=CONST(MA(农林,RN));
VAR24:=CONST(MA(电子,RN));
VAR25:=CONST(MA(石化,RN));
VAR26:=CONST(MA(制造,RN));
VAR27:=CONST(MA(运输,RN));
VAR28:=CONST(MA(上证,RN));
VAR29:=CONST(MA(金属,RN));
P1:=IF(BARSLAST(CURRBARSCOUNT=4+1),1,0);
P2:=IF(BARSLAST(CURRBARSCOUNT=6+2),1,0);
P3:=IF(BARSLAST(CURRBARSCOUNT=8+3),1,0);
P4:=IF(BARSLAST(CURRBARSCOUNT=10+4),1,0);
P5:=IF(BARSLAST(CURRBARSCOUNT=12+5),1,0);
P6:=IF(BARSLAST(CURRBARSCOUNT=14+6),1,0);
P7:=IF(BARSLAST(CURRBARSCOUNT=16+7),1,0);
P8:=IF(BARSLAST(CURRBARSCOUNT=18+8),1,0);
P9:=IF(BARSLAST(CURRBARSCOUNT=20+9),1,0);
P10:=IF(BARSLAST(CURRBARSCOUNT=22+10),1,0);
P11:=IF(BARSLAST(CURRBARSCOUNT=24+11),1,0);
P12:=IF(BARSLAST(CURRBARSCOUNT=26+12),1,0);
P13:=IF(BARSLAST(CURRBARSCOUNT=28+13),1,0);
P14:=IF(BARSLAST(CURRBARSCOUNT=2),1,0);
STICKLINE(医药,0,IF(P2-P1,CONST(医药)-(VAR17),DRAWNULL),5,-2),COLORFF00FF;
STICKLINE(金融,0,IF(P3-P2,CONST(金融)-(VAR18),DRAWNULL),5,-2),COLORFF00FF;
STICKLINE(纺织,0,IF(P4-P3,CONST(纺织)-(VAR19),DRAWNULL),5,-2),COLORFF00FF;
STICKLINE(建筑,0,IF(P5-P4,CONST(建筑)-(VAR20),DRAWNULL),5,-2),COLORFF00FF;
STICKLINE(机械,0,IF(P6-P5,CONST(机械)-(VAR21),DRAWNULL),5,-2),COLORFF00FF;
STICKLINE(地产,0,IF(P7-P6,CONST(地产)-(VAR22),DRAWNULL),5,-2),COLORFF00FF;
STICKLINE(农林,0,IF(P8-P7,CONST(农林)-(VAR23),DRAWNULL),5,-2),COLORFF00FF;
STICKLINE(电子,0,IF(P9-P8,CONST(电子)-(VAR24),DRAWNULL),5,-2),COLORFF00FF;
STICKLINE(石化,0,IF(P10-P9,CONST(石化)-(VAR25),DRAWNULL),5,-2),COLORFF00FF;
STICKLINE(制造,0,IF(P11-P10,CONST(制造)-(VAR26),DRAWNULL),5,-2),COLORFF00FF;
STICKLINE(运输,0,IF(P12-P11,CONST(运输)-(VAR27),DRAWNULL),5,-2),COLORFF00FF;
STICKLINE(上证,0,IF(P1-P14,CONST(上证)-(VAR28),DRAWNULL),5,-1),COLORFF00FF;
STICKLINE(金属,0,IF(P13-P12,CONST(金属)-(VAR29),DRAWNULL),5,-2),COLORFF00FF;
STICKLINE(医药,0,IF(P2-P1,CONST(MA(医药,RM))-(VAR17),DRAWNULL),2,0),COLORAAAAFF;
STICKLINE(金融,0,IF(P3-P2,CONST(MA(金融,RM))-(VAR18),DRAWNULL),2,0),COLORAAAAFF;
STICKLINE(纺织,0,IF(P4-P3,CONST(MA(纺织,RM))-(VAR19),DRAWNULL),2,0),COLORAAAAFF;
STICKLINE(建筑,0,IF(P5-P4,CONST(MA(建筑,RM))-(VAR20),DRAWNULL),2,0),COLORAAAAFF;
STICKLINE(机械,0,IF(P6-P5,CONST(MA(机械,RM))-(VAR21),DRAWNULL),2,0),COLORAAAAFF;
STICKLINE(地产,0,IF(P7-P6,CONST(MA(地产,RM))-(VAR22),DRAWNULL),2,0),COLORAAAAFF;
STICKLINE(农林,0,IF(P8-P7,CONST(MA(农林,RM))-(VAR23),DRAWNULL),2,0),COLORAAAAFF;
STICKLINE(电子,0,IF(P9-P8,CONST(MA(电子,RM))-(VAR24),DRAWNULL),2,0),COLORAAAAFF;
STICKLINE(石化,0,IF(P10-P9,CONST(MA(石化,RM))-(VAR25),DRAWNULL),2,0),COLORAAAAFF;
STICKLINE(制造,0,IF(P11-P10,CONST(MA(制造,RM))-(VAR26),DRAWNULL),2,0),COLORAAAAFF;
STICKLINE(运输,0,IF(P12-P11,CONST(MA(运输,RM))-(VAR27),DRAWNULL),2,0),COLORAAAAFF;
STICKLINE(上证,0,IF(P1-P14,CONST(MA(上证,RM))-(VAR28),DRAWNULL),2,0),COLORAAAAFF;
STICKLINE(金属,0,IF(P13-P12,CONST(MA(金属,RM))-(VAR29),DRAWNULL),2,0),COLORAAAAFF;
DRAWTEXT(P2-P1,-2, 医药 ),COLORYELLOW;
DRAWTEXT(P3-P2,-2, 金融 ),COLORYELLOW;
DRAWTEXT(P4-P3,-2, 纺织 ),COLORYELLOW;
DRAWTEXT(P5-P4,-2, 建筑 ),COLORYELLOW;
DRAWTEXT(P6-P5,-2, 机械 ),COLORYELLOW;
DRAWTEXT(P7-P6,-2, 地产 ),COLORYELLOW;
DRAWTEXT(P8-P7,-2, 农林 ),COLORYELLOW;
DRAWTEXT(P9-P8,-2, 电子 ),COLORYELLOW;
DRAWTEXT(P10-P9,-2, 石化 ),COLORYELLOW;
DRAWTEXT(P11-P10,-2, 制造 ),COLORYELLOW;
DRAWTEXT(P12-P11,-2, 运输 ),COLORYELLOW;
DRAWTEXT(P13-P12,-2, 金属 ),COLORYELLOW;
Q1:=IF(BARSLAST(CURRBARSCOUNT=2),10,0);
DRAWTEXT((Q1 =10ANDREF(Q1,1) =0),金融A, 金融 ),COLORRED;
DRAWTEXT((Q1 =10ANDREF(Q1,1) =0),地产A, 地产 ),COLORMAGENTA;
DRAWTEXT((Q1 =10ANDREF(Q1,1) =0),医药A, 医药 ),COLORWHITE;
DRAWTEXT((Q1 =10ANDREF(Q1,1) =0),农林A, 农林 ),COLORGREEN;
DRAWTEXT((Q1 =10ANDREF(Q1,1) =0),运输A, 运输 ),COLORYELLOW;
STICKLINE(M3 =M13ANDM34 REF(M34,1)ANDC =O,O,C,3,1),COLORFF00FF;
DRAWTEXT(X,MA(C,120)-0.13, ),LINETHICK3,COLORWHITE;
N1:=6;N2:=12;N3:=24;LC:=REF(CLOSE,1);RSI1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;RSI2:=SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100;RSI3:=SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100;BIAS1:=(CLOSE-MA(CLOSE,N1))/MA(CLOSE,N1)*100;BIAS2:=(CLOSE-MA(CLOSE,N2))/MA(CLOSE,N2)*100;BIAS3:=(CLOSE-MA(CLOSE,N3))/MA(CLOSE,N3)*100;强牛:BIAS1 2ANDRSI1 60ANDRSI2 50ANDRSI3 50ANDRSI1 RSI2ANDRSI2 RSI3ANDREF(RSI1,1) REF(RSI2,1)ANDREF(RSI2,1) REF(RSI3,1)ANDCYR 1ANDCLOSE/REF(CLOSE,1) 1.03;
公式解读:
[源码注释]通达信公式动态公式解读
公式解读:
每日通达信公式解答:
编写条件:
最近一次8%以上大阳线收盘价的公式。
编写方法:
AA:=(C/REF(C,1)-1)*100
BB:=BARSLAST(AA);
XG:REF(C,BB);