ihzx 发表于 2021-8-21 12:52:07

半月线(飞狐)

<p>DRAWGBK(1,COLORRGB(20,20,110),COLORRGB(0,0,50),1);<br />
TBS:=POW(10,ABS(LOG(MINDIFF)));<br />
//半月线<br />
YB:=MOD(DAY,15)&lt;REF(MOD(DAY,15),1)OR DATETOD1970(DATE)-REF(DATETOD1970(DATE),1)&gt;14 OR BARPOS=1;<br />
w:BARSLAST(YB),LINETHICK;<br />
dg:=w=0 or ISLASTBAR;<br />
wx:=0*C;<br />
for P=datacount-1 downto lbound(dg) do<br />
if dg then<br />
wx:=0;<br />
else<br />
wx:=wx+1;<br />
r:=BACKSET(ISLASTBAR,w+1)-ISLASTBAR;<br />
wx:=refx(wx,1)+r,LINETHICK;<br />
oo:=ref(o,w);<br />
hh:=hhv(h,w+1);<br />
LL:=LLv(L,w+1);<br />
半月开:ROUND(OO*TBS)/TBS,LINETHICK;<br />
半月高:ROUND(refx(hh,wx)*TBS)/TBS,LINETHICK;<br />
半月低:ROUND(refx(LL,wx)*TBS)/TBS,LINETHICK;<br />
半月收:ROUND(refx(c,wx)*TBS)/TBS,LINETHICK;<br />
上半月收:=REF(半月收,W+1),LINETHICK;<br />
半月涨幅:半月收/上半月收*100-100,LINETHICK,COLORFFFFFF;<br />
f:=半月收&gt;半月开 or (半月收=半月开 and 半月收&gt;ref(半月收,W));<br />
j:=cross(w,wx);<br />
STICKLINE(w&gt;=0 and f AND NOT(YB OR REFX(YB,1)),半月低,半月高,20,0),COLORMAGENTA;<br />
STICKLINE(w&gt;=0 and not(f) AND NOT(YB OR REFX(YB,1)),半月低,半月高,20,0)COLORFFDD00;{}<br />
P:=BARPOS;<br />
DRAWTEXT(w&gt;0 and j AND DAY&lt;15,半月高*1.01,'月上半月'),COLOR00CCFF,ALIGN1;<br />
DRAWTEXT(w&gt;0 and j AND DAY&gt;15,半月高*1.01,'月下半月'),COLOR00CCFF,ALIGN1;<br />
DRAWNUMBER(w&gt;0 and j,半月高*1.01,MONTH,0),COLOR00CCFF,ALIGN2;<br />
//日线<br />
TJ:=CLOSE&gt;OPEN or CLOSE=OPEN and CLOSE&gt;REF(CLOSE,1);<br />
STICKLINE(TJ,LOW,HIGH,1,0),ColorE9;<br />
STICKLINE(TJ,LOW,CLOSE,8,0),Color80;<br />
STICKLINE(TJ,LOW,CLOSE,6,0),ColorA5;<br />
STICKLINE(TJ,LOW,CLOSE,4,0),ColorC0;<br />
STICKLINE(TJ,LOW,CLOSE,2,0),ColorE6;<br />
STICKLINE(NOT(TJ),HIGH,LOW,1,0),ColorAA00;<br />
STICKLINE(NOT(TJ),CLOSE,OPEN,8,0),Color5000;<br />
STICKLINE(NOT(TJ),CLOSE,OPEN,6,0),Color6600;<br />
STICKLINE(NOT(TJ),CLOSE,OPEN,4,0),Color8000;<br />
STICKLINE(NOT(TJ),CLOSE,OPEN,2,0),ColorA000;</p>
<p></p>
<p>&nbsp;</p>
页: [1]
查看完整版本: 半月线(飞狐)