在飛狐分時(shí)窗口圖疊MACD、BOLL、分筆分段公式,編輯MACD分時(shí)公式時(shí),要選中主圖疊加。 分時(shí)主圖(悟多分筆分段,可以替換成其他主圖公式) var1:="chzhshch@kxian"; var2:="chzhshch@bi";{處理筆關(guān)系} drawline(var2=1,h,var2=-1,l,0),linedot,coloryellow; drawline(var2=-1,l,var2=1,h,0),linedot,coloryellow; var3:="chzhshch@duan";{處理段關(guān)系} drawnumber(var3=1,h,h,2),pxup20,colormagenta,align2; drawnumber(var3=-1,l,l,2),pxdn5,colorgreen; drawline(var3=1,h,var3=-1,l,0),colorFF6600; drawline(var3=-1,l,var3=1,h,0),colorFF6600; 分時(shí)主圖疊加BOLL副圖疊加MACD,類(lèi)似的可以替換成其他指標 iEnd:=DATACOUNT; R0:=DYNAINFO(3); Hd:=MAX(DYNAINFO(5)-R0,R0-DYNAINFO(6)); Y2:=R0-2*Hd*1.0125; Y3:=R0-3*Hd*1.041; DIFF:MA(CLOSE,12)-EMA(CLOSE,26); DEA:EMA(DIFF,9); MACD:(DIFF-DEA)*2; kh:=MAX(MAX(HHV(DIFF,0),HHV(DEA,0)),HHV(MACD,0)); kl:=MIN(MIN(LLV(DIFF,0),LLV(DEA,0)),LLV(MACD,0)); kb:=(Y2-Y3)/(kh-kL)*0.85; ky1:=(Y2+Y3-kb*(kh+kL))/2,color0000ff; ky:ky1[iEnd],color0000aa; MACD1:=MACD*kb[iEnd]+ky,color0000ff; STICKLINE(MACD1>=ky ,ky,MACD1,1,0),color0000ff; STICKLINE(MACD1>=ky and MACD1<=REF(MACD1,1),ky,MACD1,1,0),COLORYELLOW; STICKLINE(MACD1<=ky ,ky,MACD1,1,0),colorffff00; STICKLINE(MACD1<=ky and MACD1>=REF(MACD1,1),ky,MACD1,1,0),COLORFF00FF,LINETHICK2;
diff1:DIFF*kb[iEnd]+ky,coloraaaaaa; PARTLINE(diff1>REF(diff1,1),diff1),colorred,LINETHICK2; DEA1:DEA*kb[iEnd]+ky,color00aaaa;
MID : MA(CLOSE,20),COLORYELLOW,POINTDOT ,LINETHICK1; UPPER: MID + 2*STD(CLOSE,20),COLORYELLOW ,POINTDOT ,LINETHICK1; LOWER: MID - 2*STD(CLOSE,20),COLORYELLOW,POINTDOT ,LINETHICK1; 使用方法: 在分時(shí)窗口里,點(diǎn)擊上面標準工具條最后一項的“切換實(shí)時(shí)圖模式”,切換出副圖到量比狀態(tài),然后敲出公式(象敲股票代碼一樣敲fsmacd),或者在管理面版的技術(shù)指標下點(diǎn)擊公式,在分時(shí)圖下面就顯示出macd指標,上面分時(shí)線(xiàn)出現分筆分段線(xiàn). |