公式名称:六玛几何
公式类型:主图叠加
适用平台:通达信
SIXSIGMARUN:=TDXDLL9(0,C,H,L); {六玛算法启动函数}
{时间形态}
PRICELASTBARS:=TDXDLL9(15,C,H,L); {价位台阶封闭信号发生周期数}
COSTLASTBARS:=TDXDLL9(16,C,H,L); {价格中枢封闭信号发生周期数}
VALUELASTBARS:=TDXDLL9(17,C,H,L); {价值区间封闭信号发生周期数}
{价格中枢}
ZSNO:=TDXDLL9(18,C,H,L); {中枢序号}
ZSZG:=TDXDLL9(19,C,H,L); {中枢上沿}
ZSZD:=TDXDLL9(20,C,H,L); {中枢下沿}
ZSSTART:=TDXDLL9(21,C,H,L); {中枢开始}
ZSEND:=TDXDLL9(22,C,H,L); {中枢结束}
ZSMONITOR:=TDXDLL9(23,C,H,L); {中枢监视器}
ZSUPSTEP:=TDXDLL9(24,C,H,L); {价位台阶}
ZSDNSTEP:=TDXDLL9(25,C,H,L); {价位台阶}
{价值区间}
QJNO:=TDXDLL9(26,C,H,L); {区间序号}
QJZG:=TDXDLL9(27,C,H,L); {区间上沿}
QJZD:=TDXDLL9(28,C,H,L); {区间下沿}
QJSTART:=TDXDLL9(29,C,H,L); {区间开始}
QJEND:=TDXDLL9(30,C,H,L); {区间结束}
QJMONITOR:=TDXDLL9(31,C,H,L); {区间监视器}
{线段}
XDNO:=TDXDLL9(32,C,H,L); {线段序号}
XDBARS:=TDXDLL9(33,C,H,L); {线段高低点K线序号}
XDFLAG:=TDXDLL9(34,C,H,L); {保存线段顶底标记(1顶,-1底)}
XDPRICE:=TDXDLL9(35,C,H,L); {线段高低点价格}
XDPOWER:=TDXDLL9(36,C,H,L); {线段高低点动能};
{画K线}
DRAWKLINE(H,O,L,C);
{上涨中枢}
IF(ZSNO>0 AND ZSZG>0 AND ZSZG=REF(ZSZG,1),ZSZG,DRAWNULL),COLORMAGENTA, LINETHICK2;
IF(ZSNO>0 AND ZSZD>0 AND ZSZD=REF(ZSZD,1),ZSZD,DRAWNULL),COLORMAGENTA, LINETHICK2;
STICKLINE(ZSSTART=1 AND ZSNO>0, ZSZG, ZSZD,1,0), COLORMAGENTA, LINETHICK2;
STICKLINE(ZSEND=1,ZSZG,ZSZD,1,0), COLORMAGENTA, LINETHICK2;
{下跌中枢}
IF(ZSNO<=0 AND ZSZG>0 AND ZSZG=REF(ZSZG,1),ZSZG,DRAWNULL), COLORCYAN, LINETHICK2;
IF(ZSNO<=0 AND ZSZD>0 AND ZSZD=REF(ZSZD,1),ZSZD,DRAWNULL), COLORCYAN, LINETHICK2;
STICKLINE(ZSSTART=-1 AND ZSNO<0, ZSZG, ZSZD,1,0), COLORCYAN, LINETHICK2;
STICKLINE(ZSEND=-1 AND ZSNO<0, ZSZG, ZSZD,1,0), COLORCYAN, LINETHICK2;
{中枢监视器}
IF(COSTLASTBARS>0,ZSMONITOR,DRAWNULL),COLORYELLOW, DOTLINE;
{上涨区间}
IF(QJNO>0 AND QJZG>0 AND QJZG=REF(QJZG,1),QJZG,DRAWNULL),COLORGREEN, DOTLINE;
IF(QJNO>0 AND QJZD>0 AND QJZD=REF(QJZD,1),QJZD,DRAWNULL),COLORGREEN, DOTLINE;
STICKLINE(QJSTART=1 AND QJNO>0, QJZG, QJZD,1,1), COLORGREEN;
STICKLINE(QJEND=1,QJZG,QJZD,1,1), COLORGREEN;
{下跌区间}
IF(QJNO<=0 AND QJZG>0 AND QJZG=REF(QJZG,1),QJZG,DRAWNULL),COLORGREEN, DOTLINE;
IF(QJNO<=0 AND QJZD>0 AND QJZD=REF(QJZD,1),QJZD,DRAWNULL),COLORGREEN, DOTLINE;
STICKLINE(QJSTART=-1 AND QJNO<0, QJZG, QJZD,1,1), COLORGREEN;
STICKLINE(QJEND=-1 AND QJNO<0, QJZG, QJZD,1,1), COLORGREEN;
{区间监视器}
{IF(VALUELASTBARS>0,QJMONITOR,DRAWNULL),COLORGREEN, DOTLINE; }
{画笔段}
DRAWLINE(XDFLAG=1,H,XDFLAG=-1,L,0),COLORGREEN,LINETHICK2;
DRAWLINE(XDFLAG=-1,L,XDFLAG=1,H,0),COLORRED,LINETHICK2;
{DRAWTEXT(XDFLAG=1,H,XDNO),COLORMAGENTA;}
{DRAWTEXT(XDFLAG=-1,L,XDNO),COLORGREEN;};
风险提示:本站所有算法模型仅作为学习研究、统计、模拟分析等辅助,不可作为投资决策依据。风险自担!