ihzx 发表于 2021-8-21 14:05:21

好用分时指标(大智慧)

<p>好用分时指标,请高手在优化一下,最好做个分时预警(机构买线上穿机构卖线)</p>
<p>VAR0:=VOL/CLOSE/2;<br />
VAR1:=SUM(IF(VAR0 &gt; 100 AND CLOSE &gt; REF(CLOSE,1),VAR0,0),0);<br />
VAR2:=SUM(IF(VAR0 &gt; 100 AND CLOSE &lt; REF(CLOSE,1),VAR0,0),0);<br />
VAR3:=SUM(IF(VAR0 &lt; 100 AND CLOSE &gt; REF(CLOSE,1),VAR0,0),0);<br />
VAR4:=SUM(IF(VAR0 &lt; 100 AND CLOSE &lt; REF(CLOSE,1),VAR0,0),0);<br />
VAR5:=VAR1 + VAR2 + VAR3 + VAR4;<br />
VAR6:=IF(BARSTATUS=2,100 * VAR1/VAR5,0);<br />
VAR7:=IF(BARSTATUS=2,100 * VAR2/VAR5,0);<br />
VAR8:=IF(BARSTATUS=2,100 * VAR3/VAR5,0);<br />
VAR9:=IF(BARSTATUS=2,100 * VAR4/VAR5,0);<br />
机构买盘:VAR1,LINETHICK3,COLORFF55FF;<br />
机构卖盘:VAR2,LINETHICK3,COLORFFFF55;<br />
散户买盘:VAR3,COLOR5555FF;<br />
散户卖盘:VAR4,COLOR55FF55;<br />
DRAWTEXTREL(950,870,'机构买盘'),COLORFF00ff;<br />
DRAWTEXTREL(950,570,'机构卖盘'),COLORFFFF00;<br />
DRAWTEXTREL(950,320,'散户买盘'),COLOR0000FF;<br />
DRAWTEXTREL(950,50,'散户卖盘'),COLOR00FF00;<br />
IF BARSTATUS=2 THEN BEGIN<br />
DRAWTEXTREL(1030,870,'' + FLOOR(VAR6) + '%'),COLORFF00FF;<br />
END<br />
IF BARSTATUS=2 THEN BEGIN<br />
LOOP0:=FLOOR(VAR7);<br />
VAR10:='' + LOOP0;<br />
VAR11:=VAR10 + '%';<br />
DRAWTEXTREL(1030,570,VAR11),COLORFFFF00;<br />
END<br />
IF BARSTATUS=2 THEN BEGIN<br />
LOOP1:=FLOOR(VAR8);<br />
VAR12:='' + LOOP1;<br />
VAR13:=VAR12 + '%';<br />
DRAWTEXTREL(1030,320,VAR13),COLOR0000FF;<br />
END<br />
IF BARSTATUS=2 THEN BEGIN<br />
LOOP2:=FLOOR(VAR9);<br />
VAR14:='' + LOOP2;<br />
VAR15:=VAR14 + '%';<br />
DRAWTEXTREL(1030,50,VAR15),COLOR00FF00;<br />
END;</p>
<p></p>
<p>&nbsp;</p>
页: [1]
查看完整版本: 好用分时指标(大智慧)