ihzx 发表于 2021-8-21 14:00:03

大智慧135四区主图指标公式

<p>W:=BARSLAST(DISPSTATUS=1);<br />
P:=BACKSET(DISPSTATUS=2,W/2+1);<br />
K:=BARSLAST(CROSS(P,0.5));<br />
KJ:=HHVALL(HIGH)-LLVALL(LOW);<br />
VERTLINE(CROSS(P,0.5),4),COLOR00FFFF;<br />
平衡:LLVALL(LOW)+KJ/2,COLOR00FFFF,DOTLINE,PRECIS2;<br />
FILLRGN(平衡,HHVALL(HIGH),W&gt;K,RGB(0,0,200)),PRECIS2;{该行设置背景色}<br />
压力:IF(K&gt;=0,HHVALL(HIGH)-KJ*0.191,平衡),COLORFF00FF,DOTLINE,PRECIS2;<br />
支撑:IF(K&gt;=0,LLVALL(LOW)+KJ*0.191,平衡),COLOR00FF00,DOTLINE,PRECIS2;<br />
低吸:K&gt;=0 and CROSS(平衡,LOW),COLORFF8899,LINETHICK0,PRECIS2;<br />
低涨:(C/LLV(LOW,W)-1)*100,COLOR0000FF,LINETHICK0,PRECIS2;<br />
天:BARSLAST(L=LLV(LOW,W)),COLOR00FFFF,LINETHICK0,PRECIS0;<br />
DRAWTEXT(HIGH=HHVALL(HIGH) and K&gt;=0,HIGH*1.01,'&larr;'+NUMTOSTRN(HIGH,2)),COLORFFFFFF;<br />
DRAWICON(低吸,LOW,6);<br />
M3: EMA(CLOSE,3);<br />
M8: EMA(CLOSE,8);<br />
{MA3:MA(CLOSE,3),COLORFFFFFF;<br />
MA8:MA(CLOSE,8),COLOR00FFFF;<br />
MA13:MA(C,13),COLORFF00FF;<br />
MA21: MA(CLOSE,21);<br />
MA34: MA(CLOSE,34);<br />
MA55: MA(CLOSE,55);<br />
MA89: MA(CLOSE,89);<br />
M1A44: MA(CLOSE,144);<br />
MA233: MA(CLOSE,233);}<br />
EMA13:EMA(C,13),COLORWHITE,LINETHICK2;<br />
M21: EMA(CLOSE,21);<br />
EMA34:EMA(C,34),COLORYELLOW,LINETHICK2;<br />
EMA55:EMA(C,55),COLORFF00FF,LINETHICK2;<br />
EMA120:EMA(C,120),COLORFFCC66,LINETHICK2;<br />
AR1:=EMA55&gt;EMA34 AND EMA34&gt;EMA13;<br />
AR2:=BARSLAST((C-EMA13)/EMA13*100&lt;-6);<br />
AR3:=EMA13&gt;=REF(EMA13,2);<br />
AR4:=COUNT(CROSS(C,EMA13),AR2)=1;<br />
AR5:=AR1 AND AR2 AND AR3 AND AR4;<br />
AR6:=AR5 AND FILTER(AR5,10);<br />
DRAWTEXT(AR6,L-0.09,'启动点'),COLORYELLOW;<br />
{STICKLINE(AR6,H,L,0.5,1),COLORYELLOW;}<br />
{STICKLINE(AR6,O,C,6,1),LINETHICK2,COLORYELLOW;}<br />
BR1:=COUNT(BETWEEN((C-REF(C,1))/REF(C,1)*100,0,5) ,5)=5;<br />
BR2:=ABS((EMA13-EMA34)+(EMA34-EMA55))/C&lt;0.2;<br />
BR3:=C&gt;EMA55 AND (REF(C,1)&lt;REF(EMA55,1) OR REF(C,2)&lt;REF(EMA55,2) OR REF(C,3)&lt;REF(EMA55,3) OR REF(C,4)&lt;REF(EMA55,4) OR REF<br />
(C,5)&lt;REF(EMA55,5));<br />
BR4:=BR1 AND BR2 AND BR3;<br />
DRAWTEXT(BR4 AND FILTER(BR4,10),L-0.09,'●底'),COLOR00C5FF;<br />
STICKLINE(BR4 AND FILTER(BR4,10),H,L,0.5,1),COLOR00C5FF;<br />
{STICKLINE(BR4 AND FILTER(BR4,10),O,C,6,1),LINETHICK2,COLOR00C5FF;}<br />
CR1:=(C-REF(C,1))/REF(C,1)*100&gt;0.5;<br />
CR2:=V&gt;MA(V,5)*0.6;<br />
CR3:=COUNT(CROSS(EMA13,EMA55),3)=1;<br />
CR4:=ABS(EMA34-EMA55)/EMA55&lt;0.03;<br />
CR5:=EMA55&lt;=EMA120 AND EMA55&gt;=REF(EMA55,1);<br />
CR6:=FILTER(CR1 AND CR2 AND CR3 AND CR4 AND CR5,2);<br />
{STICKLINE(CR6,H,L,0.5,1),COLORF00FF0;}<br />
{STICKLINE(CR6,O,C,6,1),LINETHICK2,COLORF00FF0;}<br />
DRAWTEXT(CR6,L-0.09,'&uarr;升'),COLORF00FF0;<br />
DR1:=EMA13&gt;EMA34 AND EMA34&lt;EMA55;<br />
DR2:=BARSLAST(CROSS(C,EMA55) );<br />
DR3:=H=HHV(H,DR2);<br />
DR4:=BARSLAST(DR3);<br />
DR5:=COUNT(O&gt;C AND C&lt;REF(C,1) AND C&gt;EMA55 AND BETWEEN((C-EMA55)/EMA55,0,0.02),DR4)=1;<br />
DR6:=C&gt;REF(C,1) ;<br />
DR7:= DR1 AND DR5 AND DR6 ;<br />
DR8:=DR7 AND FILTER(DR7 ,10);<br />
DRAWTEXT(DR8,L-0.09,'&uarr;升'),COLORD6BA63;<br />
{STICKLINE(DR8,H,L,0.5,1),COLORD6BA63;}<br />
STICKLINE(DR8,O,C,6,1),LINETHICK2,COLORD6BA63;<br />
ER:=BARSLAST(REF(CROSS(EMA55,EMA34),1)) AND CROSS(EMA34,EMA55);<br />
DRAWTEXT(ER,L-0.09,'&uarr;上行'),COLOR0099FF;<br />
{STICKLINE(ER,H,L,0.5,1),COLOR0099FF;}<br />
{STICKLINE(ER,O,C,6,1),LINETHICK2,COLOR0099FF;}<br />
FR:=BARSLAST(REF(CROSS(EMA34,EMA13),1)) AND CROSS(EMA13,EMA34);<br />
DRAWTEXT(FR,L-0.09,'&uarr;中继'),COLORWHITE;<br />
STICKLINE(FR,H,L,0.5,1),COLORWHITE;<br />
{STICKLINE(FR,O,C,6,1),LINETHICK2,COLORWHITE;}<br />
GR1:=BARSLAST(BETWEEN(&quot;BIAS.BIAS2&quot;(6,13,24),0,5) );<br />
GR2:=EMA13&gt;EMA34 AND EMA34&gt;EMA55 AND EMA13&gt;REF(EMA13,1);<br />
GR3:=COUNT(&quot;BIAS.BIAS2&quot;(6,13,24)&gt;10 AND H=HHV(H,GR1),GR1);<br />
GR4:=H=HHV(H,GR1);<br />
GR5:=&quot;MACD.MACD&quot;(12,26,9)&lt;REF(&quot;MACD.MACD&quot;(12,26,9),1);<br />
GR6:=GR2 AND GR3 AND GR4;<br />
GR7:=GR2 AND GR3 AND GR4 AND GR5;<br />
DRAWTEXT(GR6 AND GR7,H+0.13,'收!'),COLOR00FF00;<br />
STICKLINE(GR6 AND GR7,H,H+0.09,4,0),COLOR00FF00;<br />
HR2:=EMA13&gt;=REF(EMA13,3) AND EMA34&gt;=REF(EMA34,1) AND EMA55&gt;=REF(EMA55,1) AND CROSS(C,EMA13) AND CROSS(C,EMA34) AND CROSS<br />
(C,EMA55){ AND CROSS(C,EMA120)};<br />
DRAWTEXT(HR2 AND FILTER(HR2,10),L-0.09,'绝佳进场'),COLORFFC8FF;<br />
{以下设置提示文字部分}<br />
DRAWTEXT(DISPSTATUS=2,压力,'0.809'),COLOR0000FF,ALIGN0;<br />
DRAWTEXT(DISPSTATUS=2,平衡,'0.500'),COLORFFFFFF,ALIGN0;<br />
DRAWTEXT(DISPSTATUS=2,支撑,'0.191'),COLOR00FFFF,ALIGN0;<br />
DRAWTEXT(K=0,HHVALL(HIGH)-KJ/12,'★强势区域--急拉减仓!'),COLOR00FFFF,ALIGN1;<br />
DRAWTEXT(K=0,HHVALL(HIGH)-KJ/3,'●震荡整理--寻机低吸!'),COLOR00FF00,ALIGN1;<br />
DRAWTEXT(K=0,LLVALL(LOW)+KJ/3,'◆反弹中轨--逢高休息!'),COLORFFFFFF,ALIGN1;<br />
DRAWTEXT(K=0,LLVALL(LOW)+KJ/10,'■弱势区域--暂不参与!'),COLORFFFF00,ALIGN1;<br />
{以下设置个股信息}<br />
DRAWTEXTREL(10,50,'所属板块:'+BKNAME),COLORFFFFFF;<br />
DRAWTEXTREL(10,120,'股票名称:'+'【'+STKLABEL+' '+STKNAME+'】'),COLOR0000FF;<br />
DD:=FINANCE2(35);SS:=FINANCE2(37);<br />
DRAWTEXTREL(10,190,'总股本:'+NUMTOSTRN(DD,0)+'万' +'流通A股:'+NUMTOSTRN(SS,0)+'万'),COLOR00FFFF;<br />
DRAWTEXTREL(10,300,'■低点至今上涨:'+NUMTOSTRN(低涨,2)+'%'+NUMTOSTRN(天,0)+'天 '),COLOR0000FF;<br />
DRAWTEXTREL(10,360,'■目前可见K线:'+NUMTOSTRN(W+1,0)+'天'),COLOR00FF00;<br />
DRAWTEXTREL(10,420,'■建议查阅K线:短线30天,中长线120天!'),COLORFF8899;<br />
DRAWTEXTREL(10,920,'====【仅供参考】===='),COLOR889999;<br />
{以下设置五彩立体K线}<br />
STICKLINE(CLOSE&gt;OPEN or CLOSE=OPEN and CLOSE&gt;REF(CLOSE,1),LOW,HIGH,0.1,0),colorred;<br />
STICKLINE(CLOSE&gt;OPEN or CLOSE=OPEN and CLOSE&gt;REF(CLOSE,1),OPEN,CLOSE,7,0),colorred;<br />
STICKLINE(CLOSE&lt;OPEN or CLOSE=OPEN and CLOSE&lt;=REF(CLOSE,1),LOW,HIGH,0.1,0),colorcyan;<br />
STICKLINE(CLOSE&lt;OPEN or CLOSE=OPEN and CLOSE&lt;=REF(CLOSE,1),OPEN,CLOSE,7,0),colorcyan;<br />
STICKLINE(OPEN&gt;=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00FF00;<br />
STICKLINE(OPEN&gt;=CLOSE ,CLOSE ,OPEN,8,0 ),COLOR008800;<br />
STICKLINE(OPEN&gt;=CLOSE ,CLOSE ,OPEN,7,0 ),COLOR009900;<br />
STICKLINE(OPEN&gt;=CLOSE ,CLOSE ,OPEN,6,0 ),COLOR00AA00;<br />
STICKLINE(OPEN&gt;=CLOSE ,CLOSE ,OPEN,5,0 ),COLOR00BB00;<br />
STICKLINE(OPEN&gt;=CLOSE ,CLOSE ,OPEN,4,0 ),COLOR00CC00;<br />
STICKLINE(OPEN&gt;=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR00DD00;<br />
STICKLINE(OPEN&gt;=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00EE00;<br />
STICKLINE(OPEN&gt;=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00FF00;<br />
STICKLINE(CLOSE&gt;OPEN,CLOSE,OPEN,0,0) ,COLORFFBBFF;<br />
STICKLINE(CLOSE&gt;OPEN,CLOSE,OPEN,8,0) ,COLORFF00FF;<br />
STICKLINE(CLOSE&gt;OPEN,CLOSE,OPEN,7,0) ,COLORFF22FF;<br />
STICKLINE(CLOSE&gt;OPEN,CLOSE,OPEN,6,0) ,COLORFF44FF;<br />
STICKLINE(CLOSE&gt;OPEN,CLOSE,OPEN,5,0) ,COLORFF66FF;<br />
STICKLINE(CLOSE&gt;OPEN,CLOSE,OPEN,4,0) ,COLORFF88FF;<br />
STICKLINE(CLOSE&gt;OPEN,CLOSE,OPEN,3,0) ,COLORFF99FF;<br />
STICKLINE(CLOSE&gt;OPEN,CLOSE,OPEN,2,0) ,COLORFFAAFF;<br />
STICKLINE(CLOSE&gt;OPEN,CLOSE,OPEN,1,0) ,COLORFFBBFF;</p>
<p></p>
<p>&nbsp;</p>
页: [1]
查看完整版本: 大智慧135四区主图指标公式