{黃金分割}
TC1:=IF(H=HHV(H,10*UR),H,DRAWNULL);
TC2:=CONST(BARSLAST(TC1=H))+1;
UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));
BC1:=IF(L=LLV(L,10*LR),L,DRAWNULL);
BC2:=CONST(BARSLAST(BC1=L))+1;
LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));
MAR:=ABS(UPPER-LOWER);{幅度}
NOD:=(IF(TC2》BC2,TC2,BC2)-IF(TC2》BC2,BC2,TC2));{用時(shí)}
{按天比例增加輔助};
DBL:=BARSLAST(BC1=L)+1;
DBH:=BARSLAST(TC1=H)+1;
BSP:=IF(BC2》TC2,DBL,DBH),NODRAW;
LIN1:=IF(CURRBARSCOUNT《=MAX(BC2,TC2),IF(BC2》TC2,(LOWER+0.382*MAR)+0.236*MAR/NOD*(BSP-1),(UPPER-0.382*MAR)-0.236*MAR/NOD*(BSP-1)),DRAWNULL);
LIN2:=IF(BC2》TC2,LIN1-0.118*MAR,LIN1+0.118*MAR);
LIN3:=IF(BC2》TC2,LIN1-0.236*MAR,LIN1+0.236*MAR);
LIN4:=IF(BC2》TC2,LIN1-0.427*MAR,LIN1+0.427*MAR);
LIN5:=IF(BC2》TC2,LIN1-0.618*MAR,LIN1+0.618*MAR);
LIN6:=IF(BC2》TC2,LIN1+0.191*MAR,LIN1-0.191*MAR);
LIN7:=IF(BC2》TC2,LIN1+0.382*MAR,LIN1-0.382*MAR);
SLIN1:=IF(CURRBARSCOUNT《=MAX(BC2,TC2),IF(BC2》TC2,(UPPER-0.382*MAR)-0.236*MAR/NOD*(BSP-1),(LOWER+0.382*MAR)+0.236*MAR/NOD*(BSP-1)),DRAWNULL);
SLIN2:=IF(BC2》TC2,SLIN1-0.191*MAR,SLIN1+0.191*MAR);
SLIN3:=IF(BC2》TC2,SLIN1-0.382*MAR,SLIN1+0.382*MAR);
SLIN4:=IF(BC2》TC2,SLIN1+0.118*MAR,SLIN1-0.118*MAR);
SLIN5:=IF(BC2》TC2,SLIN1+0.236*MAR,SLIN1-0.236*MAR);
SLIN6:=IF(BC2》TC2,SLIN1+0.427*MAR,SLIN1-0.427*MAR);
SLIN7:=IF(BC2》TC2,SLIN1+0.618*MAR,SLIN1-0.618*MAR);
LAS1:IF(BETWEEN(LIN1,UPPER,LOWER),LIN1,DRAWNULL),COLOR89615F;
LAS2:IF(BETWEEN(LIN2,UPPER,LOWER),LIN2,DRAWNULL),COLOR89615F;
LAS3:IF(BETWEEN(LIN3,UPPER,LOWER),LIN3,DRAWNULL),COLOR89615F;
LAS4:IF(BETWEEN(LIN4,UPPER,LOWER),LIN4,DRAWNULL),COLOR89615F;
LAS5:IF(BETWEEN(LIN5,UPPER,LOWER),LIN5,DRAWNULL),COLOR89615F;
LAS6:IF(BETWEEN(LIN6,UPPER,LOWER),LIN6,DRAWNULL),COLOR89615F;
LAS7:IF(BETWEEN(LIN7,UPPER,LOWER),LIN7,DRAWNULL),COLOR89615F;
SLAS1:IF(BETWEEN(SLIN1,UPPER,LOWER),SLIN1,DRAWNULL),COLOR89615F;
SLAS2:IF(BETWEEN(SLIN2,UPPER,LOWER),SLIN2,DRAWNULL),COLOR89615F;
SLAS3:IF(BETWEEN(SLIN3,UPPER,LOWER),SLIN3,DRAWNULL),COLOR89615F;
SLAS4:IF(BETWEEN(SLIN4,UPPER,LOWER),SLIN4,DRAWNULL),COLOR89615F;
SLAS5:IF(BETWEEN(SLIN5,UPPER,LOWER),SLIN5,DRAWNULL),COLOR89615F;
SLAS6:IF(BETWEEN(SLIN6,UPPER,LOWER),SLIN6,DRAWNULL),COLOR89615F;
SLAS7:IF(BETWEEN(SLIN7,UPPER,LOWER),SLIN7,DRAWNULL),COLOR89615F;
X1:IF(CURRBARSCOUNT《=MAX(BC2,TC2),UPPER,DRAWNULL),POINTDOT,COLORBDA3A3;
X2:IF(CURRBARSCOUNT《=MAX(BC2,TC2),LOWER,DRAWNULL),POINTDOT,COLORBDA3A3;
X3:IF(CURRBARSCOUNT《=MAX(BC2,TC2),UPPER-(UPPER-LOWER)*0.191,DRAWNULL),POINTDOT,COLORBDA3A3;
X4:IF(CURRBARSCOUNT《=MAX(BC2,TC2),UPPER-(UPPER-LOWER)*0.382,DRAWNULL),POINTDOT,COLORBDA3A3;
X5:IF(CURRBARSCOUNT《=MAX(BC2,TC2),UPPER-(UPPER-LOWER)*0.5,DRAWNULL),POINTDOT,COLORBDA3A3;
X6:IF(CURRBARSCOUNT《=MAX(BC2,TC2),UPPER-(UPPER-LOWER)*0.618,DRAWNULL),POINTDOT,COLORBDA3A3;
X7:IF(CURRBARSCOUNT《=MAX(BC2,TC2),UPPER-(UPPER-LOWER)*0.809,DRAWNULL),POINTDOT,COLORBDA3A3;
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2),X1,‘UPPER’);
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2),X2,‘LOWER’);
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2),X3,IF(TC2《BC2,‘0.191’,‘0.809’));
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2),X4,IF(TC2《BC2,‘0.382’,‘0.618’));
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2),X5,‘0.5’);
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2),X6,IF(TC2《BC2,‘0.618’,‘0.382’));
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2),X7,IF(TC2《BC2,‘0.809’,‘0.191’));
{底部確認}
CB1:=CONST(IF(TC2》BC2,LOWER,LLV(L,TC2)));
CB2:=CONST(BARSLAST(L=CB1));
CB3:=CONST(REF(BARSLAST(O》C),CB2)+CB2);
CB4:=IF(CB1《UPPER-(UPPER-LOWER)*0.52,CONST(IF(CB2=0 AND O》C,C,REF(C,CB3))),DRAWNULL);
CB5:=IF(CAPITAL=0 AND BC2》TC2,CB4,DRAWNULL);
參考線(xiàn):IF(CAPITAL=0 AND BC2》TC2 AND CURRBARSCOUNT《=INTPART(CB2+(TC2-CB2)*0.382) AND CURRBARSCOUNT》CB2,CB4,DRAWNULL);
DRAWTEXT(CURRBARSCOUNT=INTPART(CB2+(TC2-CB2)*0.382),參考線(xiàn),‘參考線(xiàn)’);
確底線(xiàn):參考線(xiàn)*1.06;
DRAWTEXT(CURRBARSCOUNT=INTPART(CB2+(TC2-CB2)*0.382),確底線(xiàn),‘確底線(xiàn)’);
確防線(xiàn):確底線(xiàn)*1.06;
DRAWTEXT(CURRBARSCOUNT=INTPART(CB2+(TC2-CB2)*0.382),確防線(xiàn),‘確防線(xiàn)’);
{提醒語(yǔ)}
DRAWTEXT(CURRBARSCOUNT=TC2-8 AND CB5》0,UPPER-(UPPER-LOWER)*0.091,‘■確底線(xiàn)僅僅適用于指數’),COLOR3171D0;
DRAWTEXT(CURRBARSCOUNT=TC2-8 AND CB5》0,UPPER-(UPPER-LOWER)*0.151,‘■請確認已跌去前一波大行情漲幅的百分之52以上’),COLOR3171D0;
DRAWTEXT(CURRBARSCOUNT=TC2-8 AND CB5》0,UPPER-(UPPER-LOWER)*0.208,‘■跌幅不夠百分之52僅僅作為反彈看待而不是新底’),COLOR3171D0;
{變異BOLL-M}
MID:MA(C,N),COLOR5800B0,LINETHICK2;
VART1:=POW((C-MID),2);
VART2:=MA(VART1,N);
VART3:=SQRT(VART2);
UP1:MID+0.809*VART3,COLORGREEN;
UP2:MID+1.809*VART3,COLORLIGRAY;
LO1:MID-0.809*VART3,COLORYELLOW;
LO2:MID-1.809*VART3,COLORWHITE;
(南方財富網(wǎng)SOUTHMONEY.COM)