ihzx 发表于 2021-8-21 14:01:51

大智慧分时抓涨停主图指标公式

<p>BU:=BARSLAST(CLOSE=HHV(CLOSE,60));<br />
SE:=BARSLAST(CLOSE=LLV(CLOSE,60));<br />
KK1:=SE;<br />
KK2:=BU;<br />
LM1:=SE;<br />
LM2:=BU;<br />
OK:=KK1&gt;KK2 AND LM1&gt;LM2;<br />
OK1:=KK1&gt;KK2 AND LM1&lt;LM2;<br />
NOK:=KK2&gt;KK1 AND LM2&gt;LM1;<br />
NOK1:=KK2&gt;KK1 AND LM2&lt;LM1;<br />
DRAWICON(CROSS(KK1,KK2),OPEN*1,1);<br />
DRAWTEXT(CROSS(KK1,KK2),OPEN*0.985,'抓'),color3cb371;</p>
<p>T:=barscount(c);<br />
均价:=DYNAINFO(11);<br />
总量:=SUM(VOL,T);<br />
总额:=SUM(AMOUNT,T);<br />
均价:=总额/(总量*100);<br />
次数:=COUNT(CLOSE&gt;均价,T);<br />
占比:=次数/T*100;<br />
分时强势:DRAWICON(CROSS(CLOSE,均价) AND CLOSE&gt;均价 AND 占比&gt;80 AND T&gt;5,CLOSE*0.99,7);<br />
DRAWTEXT(CROSS(CLOSE,均价) AND CLOSE&gt;均价 AND 占比&gt;80 AND T&gt;5,CLOSE*0.98,'涨价'),colorFFFF00;</p>
<p>VAR1:=AMOUNT/VOL/100;<br />
VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;<br />
VAR3:=SUM(AMOUNT,5)/VAR1/100;<br />
VAR4:=SUM(AMOUNT,13)/VAR1/100;<br />
VAR5:=SUM(AMOUNT,34)/VAR1/100;<br />
CYC5:=DMA(VAR2,VOL/VAR3);<br />
CYC13:=DMA(VAR2,VOL/VAR4);<br />
CYC34:=DMA(VAR2,VOL/VAR5);<br />
CYC&infin;:=DMA(VAR2,VOL/CAPITAL);<br />
一剑封喉:=CROSS(CLOSE,MA(CLOSE,13)) AND CROSS(CLOSE,MA(CLOSE,34)) AND CROSS(CLOSE,MA(CLOSE,55));<br />
A1:=(CLOSE-LLV(LOW,22))/(HHV(HIGH,22)-LLV(LOW,22))*100;<br />
A2:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;<br />
A:=3*SMA(A1,5,1)-2*SMA(SMA(A2,5,1),3,1);<br />
YNGS:=一剑封喉 AND A&lt;30;<br />
DRAWICON(一剑封喉 AND A&lt;30,LOW*0.985,10);<br />
DRAWTEXT(一剑封喉 AND A&lt;30,LOW*0.98,'停'),colorFF0000;</p>
<p>{明关键价位}<br />
c1:=ref(c,1);<br />
c2:=hhv(c1,2);<br />
c3:=llv(c1,1);<br />
et:=hhv(c1,2);<br />
et1:=ref(et,1);<br />
xb:=llv(c1,1);<br />
xb1:=ref(xb,1);<br />
m:=BARSLAST(c&lt;xb and c1&gt;=xb1);<br />
m11:=ref(m,1);<br />
n9:=BARSLAST(c&gt;et and c1&lt;=et1);<br />
n1:=ref(n9,1);<br />
m21:=BARSLAST(m-n9&gt;0 and m11&lt;=n1)+1;<br />
n2:=BARSLAST(n9-m&gt;0 and n1&lt;=m11)+1;<br />
et2:=hhv(et,m21);<br />
xb2:=llv(xb,n2);<br />
a:=if(m-n9&gt;0 and m11&lt;=n1,1,if(n9-m&gt;0 and n1&lt;=m11,0,2));<br />
h1:=if(m-n9&gt;0,c,et2);<br />
h2:=if(a=1,c,c2);<br />
h3:=if(m-n9&lt;0,c,xb2);<br />
h4:=if(a=1,c,xb2);<br />
h5:=if(m-n9&gt;0 or a=1,c,h3);<br />
明关键价位:ref(h5,1);</p>
<p>MA1:=MA(CLOSE,2);<br />
Var1:=MA(C, 1);<br />
Var2:=MA(C, 5);<br />
Var3:=MA(C, 10);<br />
Var4:=MA(C, 20);<br />
Var5:=MA(C, 30);<br />
Var6:=(Var1+Var2+Var3+Var4+Var5)/5;<br />
Var7:=(Var6-REF(Var6, 15))/REF(Var6,15)*100;<br />
Var8:=(Var6-REF(Var6, 15))/REF(Var6, 15)*100;<br />
Var9:=EMA(Var7, 8);<br />
平均价:=(H+4*L+C+O)/7;<br />
均价差:= EMA(平均价,13) - EMA(平均价,34);<br />
移动均价:= EMA(均价差,5);<br />
差:=(均价差-移动均价)*5;<br />
A:=IF(差&gt;=1000 ,1000 ,if(差&lt;=平均价,平均价,差) );<br />
分水岭:=FORCAST(FORCAST(A,31),10);<br />
涨&uarr;:if(A&gt;分水岭,A,分水岭),LINETHICK1,colorred;<br />
跌&darr;:if(A&lt;分水岭,A,分水岭),LINETHICK1,ColorGREEN;</p>
<p>ma6:=MA(c,6);<br />
ma18:=MA(c,18);<br />
ma55:=MA(c,55);<br />
ma125:=MA(c,125);<br />
ma250:=MA(c,250);<br />
TY:=C;<br />
A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=filter(A1,10); C1:=ref(B1,10+1); HD:=filter(C1,10);<br />
A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=filter(A2,10); C2:=ref(B2,10+1); LD:=ref(C2,10);<br />
AA:=REF(c,barslast(HD)); B:=ref(c,barslast(LD));<br />
t11:=barslast(HD)&lt;barslast(LD) AND not(HD) ;<br />
t21:=barslast(HD)&gt;barslast(LD) AND not(LD);<br />
波峰:if(t11,AA,AA),ColorFF00FF,pointdot;<br />
stickline(t11,AA,AA,9,0),ColorFF00FF;<br />
波谷:if(t21,B,B),Color80FF00,pointdot;<br />
stickline(t21,B,B,9,0),Color80FF00;<br />
买进价:=((c-ref(ma6,1))/6+ma6)*1.004;<br />
买进条件:=cross(c,买进价) and 买进价&gt;ref(买进价,1);<br />
黄点状线:if(买进条件,h,l),COLORYELLOW,linethick1,pointdot;<br />
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);<br />
DEA:=EMA(DIFF,8);<br />
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));<br />
B1:=REF(C,A1+1)&gt;C AND REF(DIFF,A1+1)&lt;DIFF AND CROSS(DIFF,DEA);<br />
DRAWTEXT(IF(B1&gt;0,1,0),L-0.1,'MACD底背'),COLORGREEN;<br />
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;<br />
K:=SMA(RSV,3,1);<br />
D:=SMA(K,3,1);<br />
A2:=BARSLAST(REF(CROSS(K,D),1));<br />
B2:=REF(C,A2+1)&gt;C AND REF(K,A2+1)&lt;K AND CROSS(K,D);<br />
DRAWTEXT(IF(B2&gt;0,1,0),L-0.25,'KDJ底背'),COLORYELLOW;<br />
LC:=REF(CLOSE,1);<br />
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;<br />
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;<br />
A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));<br />
B3:=REF(C,A3+1)&gt;C AND REF(RSI1,A3+1)&lt;RSI1 AND CROSS(RSI1,RSI2);<br />
DRAWTEXT(IF(B3&gt;0,1,0),L-0.4,'RSI底背'),COLORCYAN;<br />
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));<br />
D1:=REF(C,C1+1)&lt;C AND REF(DIFF,C1+1)&gt;DIFF AND CROSS(DEA,DIFF);<br />
DRAWTEXT(IF(D1&gt;0,1,0),H*1.01,'MACD顶背'),COLORWHITE;<br />
C2:=BARSLAST(REF(CROSS(D,K),1));<br />
D2:=REF(C,C2+1)&lt;C AND REF(K,C2+1)&gt;K AND CROSS(D,K);<br />
DRAWTEXT(IF(D2&gt;0,1,0),H+0.15,'KDJ顶背'),COLORWHITE;<br />
C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1));<br />
D3:=REF(C,C3+1)&lt;C AND REF(RSI1,C3+1)&gt;RSI1 AND CROSS(RSI2,RSI1);<br />
DRAWTEXT(IF(D3&gt;0,1,0),H+0.1,'RSI顶背'),COLORMAGENTA;<br />
ref(h,C1),colorB48246,pointdot;<br />
KK:=DATE&lt;1341231;<br />
PK:=VOL*(OPEN+CLOSE+HIGH+LOW)/4;<br />
PK1:=IF(VOL&gt;0,PK/VOL,(OPEN+CLOSE+HIGH+LOW)/4);<br />
C11:=PK1;<br />
A01:=(C11-LLV(C11,75))/(HHV(C11,75)-LLV(C11,75));<br />
A11:=SMA(A01,13,1);<br />
A21:=SMA(A11,13,1);<br />
A31:=3*A11-2*A21;<br />
A41:=2*A31-0.5;<br />
ZS:=DYNAINFO(3)*0.95;<br />
选1:=IF(KK,C11*(1-(A41-A21)/40),0);<br />
选2:=CROSS(C11,选1) AND CLOSE/REF(CLOSE,1)&lt;1.03;<br />
选3:IF(选2,ZS*1.03,ZS),colorGREEN;</p>
<p></p>
<p>&nbsp;</p>
页: [1]
查看完整版本: 大智慧分时抓涨停主图指标公式