源码
{背景设置}
DRAWGBKLAST(C>0,STRIP(RGB(90,90,90),RGB(0,0,0),0));
{黄金分割}
x:=BARPOS-hhv(if(DISPSTATUS=1,BARPOS,0),0)+1;
hh:=hhv(h,x); ll:=llv(l,x); hl:=hh-ll;
a80:=.809*hl+ll;a61:=.618*hl+ll;a38:=.382*hl+ll;
a19:=.191*hl+ll; a5:=.5*hl+ll;
a0:=.001*hl+ll; a100:=1.00*hl+ll;
DRAWTEXTREL(0,0,'最高 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄' ),COLORRED;
DRAWTEXTREL(0,900+76,'最低.................................................................................................................................'),color00ff00;
DRAWTEXTREL(0,0.50*(900+76),'0.5..................................................................................................................................'),color0099ff;
DRAWTEXTREL(0,0.191*(900+76),'0.809................................................................................................................................'),COLORYELLOW;
DRAWTEXTREL(0,0.382*(900+76),'0.618................................................................................................................................'),COLORYELLOW;
DRAWTEXTREL(0,0.618*(900+76),'0.382................................................................................................................................'),COLORYELLOW;
DRAWTEXTREL(0,0.809*(900+76),'0.191................................................................................................................................'),COLORYELLOW;
DRAWTEXTREL(999,0.809*(900+76),NUMTOSTR(a19)),VALIGN2,ALIGN2,colorwhite;
DRAWTEXTREL(999,0.618*(900+76),NUMTOSTR(a38)),VALIGN2,ALIGN2,colorwhite;
DRAWTEXTREL(999,0.5*(900+76),NUMTOSTR(a5)),VALIGN2,ALIGN2,color0099ff;
DRAWTEXTREL(999,0.382*(900+76),NUMTOSTR(a61)),VALIGN2,ALIGN2,colorwhite;
DRAWTEXTREL(999,0.191*(900+76),NUMTOSTR(a80)),VALIGN2,ALIGN2,colorwhite;
DRAWTEXTREL(999,1.00*(900+76),NUMTOSTR(a0)),VALIGN2,ALIGN2,colorwhite;
DRAWTEXTREL(999,0.001*(900+76),NUMTOSTR(a100)),VALIGN0,ALIGN2,colorwhite;
主线:(WMA(CLOSE,5) * 0.98),LINETHICK2,COLORRED;
主线1:WMA(主线,2),color00ff00,linethick2;
DRAWICON((主线 > REF(主线,1)),主线,10);
VAR18:=(EMA(CLOSE,3) - EMA(CLOSE,6)) + (EMA(CLOSE,6) - EMA(CLOSE,12))*100;
VAR28:=EMA(VAR18,3);
VAR58:=CROSS(VAR18,VAR28);
VAR36:=CROSS(VAR28,VAR18);
STICKLINE(VAR36,OPEN,CLOSE,1.5,0),colorFFFFFF;
STICKLINE(VAR58,OPEN,CLOSE,8,0),COLORRED;
STICKLINE(VAR58,OPEN,(CLOSE - ((CLOSE - OPEN) * 0.33)),8,0),COLORYELLOW;
STICKLINE(VAR58,OPEN,(CLOSE - ((CLOSE - OPEN) * 0.66)),8,0),LINETHICK2,colorFF00FF;
拐点:=MA(CLOSE,4);
拐点1:=MA(CLOSE,4);
GD1:=(REF((COUNT((拐点 <= REF(拐点,1)),5) = 5),1) AND (拐点 > REF(拐点,1)));
GD2:=(REF((COUNT((拐点1 <= REF(拐点1,1)),5) = 5),1) AND (拐点1 > REF(拐点1,1)));
DRAWTEXT(GD1,L*0.985,'▲'),ALIGN1,VALIGN0,Colorff00ff;
DRAWTEXT(GD1,L*0.990,' ̄'),ALIGN1,VALIGN0,Colorff00ff;
KS:=(((CLOSE - SMA(CLOSE,13,1)) / SMA(CLOSE,13,1)) * (0 - 100));
RKS:=REF(KS,1);
MLS:=((((RKS / KS) > 1.23) AND (RKS > 13)) AND ((CLOSE / REF(CLOSE,1)) > 1.03));
开:=OPEN;
高:=HIGH;
低:=LOW;
收:=CLOSE;
超跌:STICKLINE((KS > 13),高,低,0,1),LINETHICK2,colorFFFFFF;
反弹:STICKLINE((MLS = 1),高,低,0,1),LINETHICK2,colorFF00FF;
STICKLINE((KS > 13),开,收,8,1),LINETHICK2,colorFFFFFF;
STICKLINE((MLS = 1),开,收,8,1),LINETHICK2,colorFF00FF;
VARk2:=((REF(HIGH,1) + REF(LOW,1)) / 2);
VARk3:=(MA(CLOSE,27) + (2 * STD(CLOSE,27)));
DRAWTEXT(CROSS(VARk2,VARk3),H*1.00,'▼'),ALIGN1,VALIGN2,COLORGREEN;
DRAWTEXT(CROSS(VARk2,VARk3),H*1.002,' ̄'),ALIGN1,VALIGN0,COLORGREEN;
上通道:=(EMA(EMA(EMA(HIGH,5),5),5) * 1.05);
DRAWTEXT(FILTER(((HIGH > 上通道) AND (CLOSE < 上通道)),3),(HIGH * 1.01),'逃'),ALIGN1,VALIGN2,colorEE00FF;
短期乖离率:=(((CLOSE - MA(CLOSE,13)) / MA(CLOSE,13)) * 100);
趋势:=(((5 * SMA((((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 80),5,1)) - (3 * SMA(SMA((((CLOSE - LLV(LOW,7)) / (HHV(HIGH,7) - LLV(LOW,7))) * 80),5,1),3,1))) - SMA(SMA(SMA((((CLOSE - LLV(LOW,20)) / (HHV(HIGH,20) - LLV(LOW,20))) * 80),5,1),3,1),2,1));
平衡线:=EMA(EMA(EMA(HIGH,3),3),1);
回挡线:=(平衡线 * 0.92);
DRAWTEXT((CROSS(趋势,0) AND (短期乖离率 > 3)) AND ((回挡线 - REF(回挡线,1)) > 0),L*0.985,'▲'),ALIGN1,VALIGN0,Colorff00ff;
DRAWTEXT((CROSS(趋势,0) AND (短期乖离率 > 3)) AND ((回挡线 - REF(回挡线,1)) > 0),L*0.990,' ̄'),ALIGN1,VALIGN0,Colorff00ff;
买进价:=((c-ref(ma(c,55),1))/6+ma(c,55))*1.004;
买进条件:=cross(c,买进价) and 买进价>ref(买进价,1);
买进:STICKLINE(买进条件,H,L,0,1),colormagenta,linethick2;
STICKLINE(买进条件,O,C,8,9),colormagenta,linethick2;
DRAWTEXT(买进条件,L*0.985,'▲'),ALIGN1,VALIGN0,Colorff00ff;
DRAWTEXT(买进条件,L*0.990,' ̄'),ALIGN1,VALIGN0,Colorff00ff;
DDD:=(EMA(CLOSE,10) - EMA(CLOSE,100));
AMA:=EMA(DDD,4);
BMA:=(EMA(CLOSE,3) - EMA(CLOSE,30));
BMB:=EMA(BMA,4);
SS:=(MA(CLOSE,8) * 0.998);
HH1:=FILTER(((DDD >= AMA) AND (BMA >= BMB)),33);
DRAWTEXT(HH1,L*0.985,'▲'),ALIGN1,VALIGN0,Colorff00ff;
DRAWTEXT(HH1,L*0.990,' ̄'),ALIGN1,VALIGN0,Colorff00ff;
中期大底:=(LLV(LOW,30) * 1.01);
DRAWTEXT((((LOW <= 中期大底) AND ((回挡线 - REF(回挡线,1)) >= (0 - 0.99999))) AND ((CLOSE / OPEN) > 1.025)),LOW,'买吧'),ALIGN1,VALIGN0,COLORYELLOW;
了结线:=(平衡线 * 1.06);
主线2:=WMA(CLOSE,8);
上:=(MA(HIGH,30) * 1.15);
WX:=MA(CLOSE,0);
M1:=(MA(CLOSE,15) * IF((20 < 5),WX,1));
M2:=(MA(CLOSE,20) * IF((20 < 7),WX,1));
DRAWTEXT((((((((REF(CLOSE,1) < M2) AND ((主线2 - REF(主线2,1)) > 0)) AND ((了结线 - REF(了结线,1)) > 0.01)) AND (LOW < M2)) AND (CLOSE > M2)) AND ((M1 - REF(M1,1)) > 0)) AND ((CLOSE / OPEN) > 1.052)),(LOW - 0.08),'★黄金'),COLORYELLOW;
MA10:=MA(CLOSE,10);
平均值:=((MA10 / -10) + MA10);
MX:=((平均值 * 2) * 0.54);
MA13:=MA(CLOSE,13);
MA34:=MA(CLOSE,25);
DRAWTEXT(FILTER((((((((上 - REF(上,1)) > 0) AND (短期乖离率 < (0 - 4))) AND (CLOSE < OPEN)) AND (LOW <= MA34)) AND (CLOSE < MA13)) AND ((MX - REF(MX,1)) > 0)),1),LOW,'★破多买入'),colorFFFFFF;
短期底:=(LLV(HIGH,30) * 0.93);
DRAWTEXT((((LOW <= 短期底) AND (CLOSE < MX)) AND (短期乖离率 > (0 - 8))),(LOW - 0.15),'★涨20%'),COLORYELLOW;