地瓜分时内部 合成版通达信公式 主图 源码附图
AF1:=1;
TT:=BARSLAST(HOUR=9 AND MINUTE=(30+AF1))+1;
均价:AMOUNT/VOL/100,COLORYELLOW;
价位:C,COLORWHITE,LINETHICK4;
盘整:IF(HOUR>9 AND RANGE(HHV(C,60)/LLV(C,60),1,1.02),C,DRAWNULL),COLORRED,LINETHICK2;
V1:=V;
HH:=C>REF(C,1) AND C/均价>(1+0.03);
LL:=C<REF(C,1) AND C/均价<(1-0.03);
HH1:=CROSS(SUM(HH,0),0.5);
LL1:=CROSS(SUM(LL,0),0.5);
SS1:=SUM(HH1,0)*CROSS(COUNT(C<REF(C,1),BARSLAST(HH1)),0.5);
BB1:=SUM(LL1,0)*CROSS(COUNT(C>REF(C,1),BARSLAST(LL1)),0.5);
CS1:CONST(SUM(IF(SS1,REF(C,1),DRAWNULL),0)),COLORGREEN,LINETHICK2;
CB1:CONST(SUM(IF(BB1,REF(C,1),DRAWNULL),0)),COLORRED,LINETHICK2;
HH2:=CROSS(SUM(HH AND C>CS1*1.03,0),0.5);
LL2:=CROSS(SUM(LL AND C<CB1*0.97,0),0.5);
SS2:=SUM(HH2,0)*CROSS(COUNT(C<REF(C,1),BARSLAST(HH2)),0.5);
BB2:=SUM(LL2,0)*CROSS(COUNT(C>REF(C,1),BARSLAST(LL2)),0.5);
CS2:CONST(SUM(IF(SS2,REF(C,1),DRAWNULL),0)),COLORGREEN,LINETHICK1;
CB2:CONST(SUM(IF(BB2,REF(C,1),DRAWNULL),0)),COLORRED,LINETHICK1;
DRAWICON(HH1 OR HH2,C*1.01,39);
DRAWICON(LL1 OR LL2,C*0.99,38);
DRAWICON(BB1 OR BB2,REF(C,1)*0.99,7);
DRAWICON(SS1 OR SS2,REF(C,1)*1.01,8);
成交额:=V*C/100,NODRAW;{万元}
A2:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
A3:=SUM((IF(((成交额/8>20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);
A6:=(A2+A3);
A7:=IF((ISLASTBAR),((100*A2)/A6),0);
A8:=IF((ISLASTBAR),((100*A3)/A6),0);
DD1:=1;{股票指标网70822}
AAA1:=STRCAT(STRCAT('机构买',CON2STR((100*A2)/A6,0)),'%');
AAA2:=STRCAT(STRCAT('机构卖',CON2STR((100*A3)/A6,0)),'%');
AAA3:=STRCAT(STRCAT('总买入',CON2STR((100*(A2-A3))/A6,0)),'%');
DRAWTEXT_FIX(DD1=1,0,0.02,0,AAA1),COLORRED;
DRAWTEXT_FIX(DD1=1,0,0.13,0,AAA2),COLOR00FF00;
DRAWTEXT_FIX(DD1=1,0,0.24,0,AAA3),COLOR00FFFF;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
H1:EMA(C,8);
H2:EMA(H1,20);
VAR1:=(HHV(H,36)-C)/(HHV(H,36)-LLV(L,36))*100;
VAR2:=SMA(VAR1,5,1);
VAR3:=SMA(VAR2,8,1);
VAR4:=CROSS(VAR2,VAR3) AND VAR3< 20;
VAR5:=C>LLV(C,60)*1.13 AND VAR4;
VAR6:=IF(C>200,VAR4,VAR5);
STICKLINE(H1>H2,H1,H2,0,1),COLORRED;
STICKLINE(H1< H2,H1,H2,0,1),COLORGREEN;
现价:C,COLORWHITE,LINETHICK2;
盘整1:IF(HOUR>8.75 AND RANGE(HHV(C,60)/LLV(C,60),1,1.02),C,DRAWNULL),COLORRED,LINETHICK6;
H11:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H11-L1;
阻力:L1+P1*7.7/8,NODRAW;
支撑:L1+P1*0.3/8,NODRAW;
STICKLINE(CROSS(支撑,现价),支撑,阻力,1,0),NODRAW;
DRAWTEXT(LONGCROSS(支撑,现价,8),支撑,'----★B吸'),COLORRED;{吸}
DRAWTEXT(LONGCROSS(现价,阻力,8),现价,'----★S抛'),COLORGREEN;{抛};
A:C,COLORWHITE,LINETHICK3;
未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
AF1赋值:1
TT赋值:上次HOUR=9 AND MINUTE=(30+AF1距今天数)+1
输出均价:AMOUNT/成交量/100,COLORYELLOW
输出价位:C,画白色,LINETHICK4
输出盘整:IF(HOUR>9 AND RANGE(60日内C最高值/60日内C最低值,1,1.02),C,DRAWNULL),画红色, 线宽为2
V1赋值:V
HH赋值:C>1日前的C AND C/均价>(1+0.03)
LL赋值:C<1日前的C AND C/均价<(1-0.03)
HH1:=CROSS(0的HH日累和,0.5)
LL1:=CROSS(0的LL日累和,0.5)
SS1赋值:0的HH1日累和*CROSS(COUNT(C<1日前的C,上次HH1距今天数),0.5)
BB1赋值:0的LL1日累和*CROSS(COUNT(C>1日前的C,上次LL1距今天数),0.5)
输出CS1:CONST(SUM(IF(SS1,1日前的C,DRAWNULL),0)),画绿色, 线宽为2
输出CB1:CONST(SUM(IF(BB1,1日前的C,DRAWNULL),0)),画红色, 线宽为2
HH2:=CROSS(0的HH AND C>CS1*1.03日累和,0.5)
LL2:=CROSS(0的LL AND C
SS2赋值:0的HH2日累和*CROSS(COUNT(C<1日前的C,上次HH2距今天数),0.5)
BB2赋值:0的LL2日累和*CROSS(COUNT(C>1日前的C,上次LL2距今天数),0.5)
输出CS2:CONST(SUM(IF(SS2,1日前的C,DRAWNULL),0)),画绿色,LINETHICK1
输出CB2:CONST(SUM(IF(BB2,1日前的C,DRAWNULL),0)),画红色,LINETHICK1
当满足条件HH1 OR HH2时,在C*1.01和39之间画图标
当满足条件LL1 OR LL2时,在C*0.99和38之间画图标
DRAWICON(BB1 OR BB2,1日前的C*0.99,7)
DRAWICON(SS1 OR SS2,1日前的C*1.01,8)
成交额赋值:V*C/100,NODRAW
{万元}
A2赋值:SUM((IF(((成交额/8>20) AND (收盘价>(1日前的收盘价))),成交额,0)),0)
A3赋值:SUM((IF(((成交额/8>20) AND (收盘价<(1日前的收盘价))),成交额,0)),0)
A6赋值:(A2+A3)
A7赋值:IF((ISLASTBAR),((100*A2)/A6),0)
A8赋值:IF((ISLASTBAR),((100*A3)/A6),0)
DD1赋值:1
{股票指标网70822}
AAA1赋值:STRCAT(STRCAT('机构买',CON2STR((100*A2)/A6,0)),'%')
AAA2赋值:STRCAT(STRCAT('机构卖',CON2STR((100*A3)/A6,0)),'%')
AAA3赋值:STRCAT(STRCAT('总买入',CON2STR((100*(A2-A3))/A6,0)),'%')
当满足条件DD1=1时,在横轴0纵轴0.02位置书写文字
当满足条件DD1=1时,在横轴0纵轴0.13位置书写文字
当满足条件DD1=1时,在横轴0纵轴0.24位置书写文字
DRAWKLINE(最高价,开盘价,最低价,收盘价)
输出H1:C的8日指数移动平均
输出H2:H1的20日指数移动平均
VAR1赋值:(36日内H最高值-C)/(36日内H最高值-36日内L最低值)*100
VAR1的5日[1日权重]移动平均
VAR2的8日[1日权重]移动平均
VAR4赋值:VAR2上穿VAR3 AND VAR3< 20
VAR5赋值:C>60日内C最低值*1.13 AND VAR4
如果C>200返回VAR4否则返回VAR5
当满足条件H1>H2时,在H1和H2之间画柱状线
当满足条件H1< H2时,在H1和H2之间画柱状线
输出现价:C,画白色, 线宽为2
盘整1:IF(HOUR>8.75 AND RANGE(60日内C最高值/60日内C最低值,1,1.02),C,DRAWNULL),画红色,LINETHICK6
H11:=MAX(DYNAINFO(3),DYNAINFO(5))
L1赋值:MIN(DYNAINFO(3),DYNAINFO(6))
P1赋值:H11-L1
输出阻力:L1+P1*7.7/8,NODRAW
输出支撑:L1+P1*0.3/8,NODRAW
STICKLINE(支撑上穿现价,支撑,阻力,1,0),NODRAW
DRAWTEXT(LONGCROSS(支撑,现价,8),支撑,'----★B吸'),画红色
{吸}
DRAWTEXT(LONGCROSS(现价,阻力,8),现价,'----★S抛'),画绿色
{抛}
输出A:C,画白色, 线宽为3