大智慧K线形解主图源码
-
相关简介:DRAWGBKLAST(CLOSE0,STRIP(RGB(95,95,95),RGB(0,0,0),0)); MA5:=MA(C,5); MA10:=MA(C,10); MA20:=MA(C,20); MA40:=MA(C,40); MA60:=MA(C,60); BIAS:=(C-MA20)/MA20*100; SHOPEN:=OPEN; SHHIGH:=HIGH; SHLOW:=LOW; SHCLOSE:=CLOSE; SHAMOUNT:=AMOUNT; SHVOL:=VOL; J12:=(
-
文章来源:股海网作者:股海网发布时间:2016-08-07浏览次数:
DRAWGBKLAST(CLOSE>0,STRIP(RGB(95,95,95),RGB(0,0,0),0));
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA40:=MA(C,40);
MA60:=MA(C,60);
BIAS:=(C-MA20)/MA20*100;
SHOPEN:=OPEN;
SHHIGH:=HIGH;
SHLOW:=LOW;
SHCLOSE:=CLOSE;
SHAMOUNT:=AMOUNT;
SHVOL:=VOL;
J12:=(HIGH - ((HIGH - LOW) / 3));
J23:=(LOW + ((HIGH - LOW) / 3));
t1:=(((IF((CLOSE = OPEN),1,0) + IF((CLOSE >= J12),1,0)) + IF((CLOSE <= J23),1,0)) > 1);
t2:=((((CLOSE > J23) AND (CLOSE < J12)) AND (OPEN > J23)) AND (OPEN < J12));
t3:=((CLOSE >= J12) AND (OPEN <= J23));
t4:=(((OPEN <= J12) AND (OPEN >= J23)) AND (CLOSE > J12));
t5:=(((OPEN <= J23) AND (CLOSE <= J12)) AND (CLOSE >= J23));
t6:=((CLOSE <= J23) AND (OPEN >= J12));
t7:=(((OPEN <= J12) AND (OPEN >= J23)) AND (CLOSE < J23));
t8:=(((OPEN >= J12) AND (CLOSE <= J12)) AND (CLOSE >= J23));
t9:=(((SHAMOUNT / SHVOL) / 100) > REF(HIGH,1));
t10:=(((SHAMOUNT / SHVOL) / 100) < REF(LOW,1));
if DISPSTATUS=2 then begin;
var1000:='
if t1>0
if t2>0
if t3>0
if t4>0
if t5>0
if t6>0
if t7>0
if t8>0
if t9>0
if t10>0
if MA20>=MA60 AND CROSS(MA40,MA60) then var1000:=var1000+'☆ 形成季托,待股价回落到20天均线或40天均线时介入,20天均价为:'+MA20+'
if BIAS>9.5 AND (C-REF(C,1))/REF(C,1)*100<9.8 then var1000:=var1000+'☆ 短线涨幅过大,有整理要求
if MA20>=MA60 AND H>=MA20 AND L<=MIN(MA40,MA60) AND C>O AND C>REF(C,1) then var1000:=var1000+'☆ 芙蓉出水,趋势向好
if BIAS<-18 AND (C-REF(C,1))/REF(C,1)*100>-9.8 then var1000:=var1000+'☆ 股价严重超跌,有爆发要求
if BIAS<-7 AND ALL(CLOSE<OPEN,5) then var1000:=var1000+'☆ 连收五阴,超跌有反弹要求
if ABS(HIGH-REF(HIGH,1))/HIGH<0.001 then var1000:=var1000+'☆ 平顶 -该高点有一定阻力
if ABS(LOW-REF(LOW,1))/LOW<0.001 and abs(ref(low,1)-ref(low,2))/ref(low,1)<=0.00 then var1000:=var1000+'☆ 平底 -该低点有一定支撑
if CLOSE=OPEN AND
if OPEN/CLOSE > 1.05 AND HIGH/LOW < OPEN/CLOSE+0.018 then var1000:=var1000+'☆ 大阴烛 -今日空方有绝对优势
if REF(CLOSE,1)<REF(OPEN,1) AND CLOSE<OPEN AND CLOSE/OPEN<0.98 then var1000:=var1000+'☆ 双飞乌鸦 -多头力竭行情走软
{接上页}
if (MIN(CLOSE,OPEN)-LOW)/(HIGH-LOW)>0.667 then var1000:=var1000+'☆ 长下影 -下档支撑强或空方试探进攻
if (HIGH-MAX(CLOSE,OPEN))/(HIGH-LOW)>0.667 then var1000:=var1000+'☆ 长上影 -上档阻力大或多方试探进攻
if CLOSE=OPEN AND CLOSE=LOW AND CLOSE<>HIGH then var1000:=var1000+'☆ 垂死十字 -在顶部时重要表强力多头开始疲软
if HIGH=CLOSE AND HIGH<>LOW then var1000:=var1000+'☆ 光头阳线 -今日尾盘多方气盛可能延续到明天
if (HIGH<REF(LOW,1) OR LOW>REF(HIGH,1)) then var1000:=var1000+'☆ 跳空缺口 -当日未补有与跳空同向进行欲望强烈三日为回补观察期
if LOW=CLOSE AND HIGH<>LOW then var1000:=var1000+'☆ 赤脚阴线 -尾盘空方胜注意延续次日
if CLOSE=OPEN AND HIGH<>close and low<>close and high <>close then var1000:=var1000+'☆ 十字星 -警告信号 原趋势停顿或反转依上下影线长度判后市
if CLOSE/OPEN>1.05 AND HIGH/LOW < CLOSE/OPEN+0.018 then var1000:=var1000+'☆ 大阳烛 -上升行情中意味行情剧烈向上攀升下跌行情中意味行情剧烈向上反弹
IF REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND REF(OPEN,1) < REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1)AND CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2)
IF REF(CLOSE,4)/REF(OPEN,4)>1.03 AND REF(CLOSE,3)<REF(OPEN,3) AND REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND REF(LOW,4)<REF(LOW,3) AND REF(LOW,4)<REF(LOW,2) AND REF(LOW,4)<REF(LOW,1) AND REF(HIGH,4)>REF(HIGH,3) AND REF(HIGH,4)>REF(HIGH,2) AND REF(HIGH,4)>REF(HIGH,1) AND CLOSE/OPEN>1.03 AND CLOSE>REF(CLOSE,4)
IF (ref(high,2) -ref(o,2))/ref(high,2)<=0.0003 AND (c-low)/o<=0.0003 AND ref(c,2)<ref(o,2) AND ref(c,2)>ref(o,1) AND ref(c,1)>o AND ref(c,1)<ref(o,1) AND ref(high,1)-ref(o,1)>0 AND ref(low,1)-ref(c,1)<0 AND high-o>0 AND ref(c,2)-ref(low,2)>0
IF ((REF(CLOSE,1)<REF(OPEN,1) AND CLOSE>OPEN AND ABS(CLOSE-REF(CLOSE,1))/CLOSE<0.002) OR (REF(CLOSE,1)>REF(OPEN,1) AND CLOSE<OPEN AND ABS(CLOSE-REF(CLOSE,1))/CLOSE<0.002))
IF close<>open and MIN(OPEN,CLOSE)=LOW AND HIGH-LOW > 3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE > MA(CLOSE,5)
IF REF(CLOSE,1)-REF(OPEN,1)<0 AND CLOSE-OPEN>0 AND OPEN-REF(CLOSE,1)<0 AND CLOSE<REF(OPEN,1) AND CLOSE>REF(CLOSE,1) AND CLOSE>(REF(CLOSE,1)+REF(OPEN,1))/2
IF ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) > 0.04 AND ABS(CLOSE-OPEN)/CLOSE<0.005 AND MAX(CLOSE,OPEN) < MAX(REF(CLOSE,1),REF(OPEN,1)) AND MIN(CLOSE,OPEN) > MIN(REF(CLOSE,1),REF(OPEN,1))
IF (ref(c,1)-ref(o,1)<0 AND c-o>0 AND c>ref(o,1) AND o<ref(c,1))
IF ((ref(c,2)-ref(o,2)>0 AND (ABS(ref(c,2)-ref(o,2)))/(ABS(ref(c,3)-ref(o,3)))>2.4 AND ABS(c-o)>3 AND ABS(ref(c,2)-ref(o,2))>(ABS(ref(c,1)-ref(o,1))) AND ref(c,1)-ref(o,1)>0 AND c-o<0 AND ref(o,1) >ref(c,2) AND o<ref(o,1) AND c<ref(c,2) AND c>ref(o,2)) OR (ref(c,2)-ref(o,2)>0 AND (ABS(ref(c,2)-ref(o,2)))/(ABS(ref(c,3)-ref(o,3)))>2.4 AND ABS(c-o)>3 AND (ABS(ref(c,2)-ref(o,2)))>(ABS(ref(c,1)-ref(o,1))) AND ref(c,1)-ref(o,1)<0 AND c-o<0 AND ref(c,1) >ref(c,2)
IF ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) > 0.04 AND CLOSE=OPEN AND CLOSE < MAX(REF(CLOSE,1),REF(OPEN,1)) AND CLOSE > MIN(REF(CLOSE,1),REF(OPEN,1))
IF ref(c,1)<ref(o,1) AND c-o>0 AND c>ref(H,1) AND o<ref(L,1) and ref(O,1)>ref(max(O,C),2) and ref(C,1)>ref(min(O,C),2) and ref(max(O,C),2)>ref(max(O,C),3)
IF (ref(c,1)-ref(o,1)>0 AND c-o<0 AND c<ref(o,1) AND o>ref(c,1))
IF REF(CLOSE,1)/REF(OPEN,1)<0.97 AND CLOSE/OPEN>1.03 AND OPEN<REF(CLOSE,1) AND CLOSE>REF(CLOSE,1)
IF (ref(c,1)-ref(o,1)<0 AND c-o>0 AND c<ref(o,1) AND o>ref(c,1))
IF (ref(c,1)-ref(o,1)>0 AND (ABS(ref(c,1)-ref(o,1)))/(ABS(ref(c,2)-ref(o,2)))>2.4 AND c-o<0 AND c>ref(o,1) AND ref(c,1)-o>2)
IF (ref(c,1)-ref(o,1)<0 AND c-o<0 AND c>ref(c,1) AND o<ref(o,1) AND o-c <6)
IF REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND CLOSE<OPEN AND REF(CLOSE,1)<REF(CLOSE,2) AND CLOSE<REF(CLOSE,1)
IF REF(CLOSE,4)/REF(OPEN,4)<0.97 AND REF(CLOSE,3)>REF(OPEN,3) AND REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)>REF(OPEN,1) AND REF(LOW,4)<REF(LOW,3) AND REF(LOW,4)<REF(LOW,2) AND REF(LOW,4)<REF(LOW,1) AND REF(HIGH,4)>REF(HIGH,3) AND REF(HIGH,4)>REF(HIGH,2) AND REF(HIGH,4)>REF(HIGH,1) AND CLOSE/OPEN<0.97 AND CLOSE<REF(CLOSE,4)
IF REF(CLOSE,4)/REF(OPEN,4)>1.02 AND REF(CLOSE,3)<REF(OPEN,3) AND REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND REF(close,4)<=REF(close,3) AND REF(high,2)<REF(high,3) AND REF(LOW,2)>=REF(open,4) AND REF(high,1)<REF(close,4) AND REF(low,1)>REF(open,4) AND CLOSE/OPEN>1.01 AND open>=REF(open,1) AND CLOSE>=REF(HIGH,3)
IF ref(O,1)/ref(C,1) > 1.05 AND ref(H,1)/ref(L,1) < ref(O,1)/ref(C,1)+0.018 and C>O and O<ref(L,1) and C=ref(L,1)
IF (ref(c,1)-ref(o,1)>0 AND (ABS(ref(c,1)-ref(o,1)))/(ABS(ref(c,2)-ref(o,2)))>2.5 AND c-o<0 AND c>ref(o,1) AND c<(REF(CLOSE,1)+REF(OPEN,1))/2 AND o>ref(c,1))
IF (ref(c,1)-ref(o,1)>0 AND c-o<0 AND c<ref(o,1) AND o>ref(c,1))
IF ref(open,1)<>ref(close,1) and REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND REF(OPEN,1) < REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.03 AND CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2)
IF MIN(OPEN,CLOSE)=LOW AND HIGH-LOW > 3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE < MA(CLOSE,5)
IF HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW > 3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE < MA(CLOSE,5)
IF HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW > 3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE > MA(CLOSE,5)
IF ((REF(CLOSE,1)/REF(OPEN,1)>1.03 AND CLOSE/OPEN<0.96 AND CLOSE<REF(OPEN,1) AND OPEN>REF(CLOSE,1)) OR (REF(CLOSE,1)/REF(OPEN,1)<0.97 AND CLOSE/OPEN>1.04 AND CLOSE>REF(OPEN,1) AND OPEN<REF(CLOSE,1)))
IF ref(open,1)<>ref(close,1) and REF(CLOSE,2)/REF(OPEN,2) > 1.03 AND REF(OPEN,1) > REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.02 AND CLOSE/OPEN<0.97 AND CLOSE<REF(CLOSE,2)
IF REF(CLOSE,2)>REF(OPEN,2) AND (REF(CLOSE,2)-REF(OPEN,2))/REF(OPEN,2)>=2/100
IF OPEN=REF(OPEN,1) AND (CLOSE-OPEN)*(REF(CLOSE,1)-REF(OPEN,1))<0
IF ((O>C and open>MA(C,5) and Open>MA(C,10) and O>MA(C,20) and Close<MA(C,5) and Close<MA(C,10) and Close<MA(C,20)) OR (O<C and open<MA(C,5) and Open<MA(C,10) and O<MA(C,20) and Close>MA(C,5) and Close>MA(C,10) and Close>MA(C,20)))
TIPTEXT(DISPSTATUS=2,0,var1000);
{均线语言 箱体空间}
if DISPSTATUS=2 then aaa:=BARPOS;
if DISPSTATUS=1 then bbb:=BARPOS;
ddd:=aaa-bbb;
ee:=hhv(h,ddd);
MSTATUS:=BARSTATUS=2;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA30:=MA(C,30);
MA60:=MA(C,60);
MA125:=MA(C,125);
MA250:=MA(C,250);
i:=1;
IF MSTATUS and (MA5 > MA10 and MA10 > MA30 and MA5 > MA30) THEN BEGIN DRAWTEXTABS(0,i*16,'短期均线多头排列。股价高位谨防筑顶。中低位当股价向上突破5、10、30日均线,均线呈多头排列是最佳买入时机。'+ma5+' > '+ma10+' > '+ma30+';'),COLORRED,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (MA5 < MA10 and MA10 < MA30 and MA5 < MA30) THEN BEGIN DRAWTEXTABS(0,i*16,'短期均线空头排列。股价高位谨防弃庄,卖盘涌出破位下跌。中低位当股价向下突破5、10、30日均线,均线呈空头排列时,注意观察股价所处箱体位置。'+ma5+' < '+ma10+' < '+ma30+';'),COLORGREEN,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (MA30 > MA60 and MA30 > MA125 and MA60 > MA125) THEN BEGIN DRAWTEXTABS(0,i*16,'中期均线多头排列。注意股价突然下跌,当股价回档至当前盘面30、60、125日任一均线获得支撑,关注均线助涨,次日股价放量向上突破,是中长期最佳买入时机。'+ma30+' > '+ma60+' > '+ma125+';'),COLORRED,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (MA30 < MA60 and MA30 < MA125 and MA60 < MA125) THEN BEGIN DRAWTEXTABS(0,i*16,'中期均线空头列排。30、60、125日中长期均线下行呈空头排列,注意箱体上下撑压或无量空跌。'+ma30+' < '+ma60+' < '+ma125+';'),COLORGREEN,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (MA60 > MA125 and MA125 > MA250 and MA60 > MA250) THEN BEGIN DRAWTEXTABS(0,i*16,'长期均线多头排列。即60,125,250日均线向上多头排列。注意:当股价处于箱体顶部,所有均线多头排列,股价反复震荡不能突破,可能顶部即将形成。'+ma60+' > '+ma125+' > '+ma250+';'),COLORRED,ALIGN0,LINETHICK0;
i:=i+1; END;
IF MSTATUS and (MA60 < MA125 and MA125 < MA250 and MA60 < MA250) THEN BEGIN DRAWTEXTABS(0,i*16,'长期均线空头排列。即60,125,250日均线向下空头排列。注意:当所有均线空头排列的时候,股价处于箱体的一个次高位,中位,或箱体下沿,可能是阶段底部的形成。 '+ma60+' < '+ma125+' < '+ma250+';'),COLORGREEN,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (CROSS(MA5,MA10)) THEN BEGIN DRAWTEXTABS(0,i*16,'短期5日10日均线金叉。注意观察股价在箱体的位置,30日和其他均线是否成为股价上涨的阻力,或股价在高位的运行方向,判断是反转上涨还是下跌中途的小反弹。'),COLORRED,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (CROSS(MA10,MA5)) THEN BEGIN DRAWTEXTABS(0,i*16,'短期5日10日均线死叉。当股价反弹遭遇30日和其他均线的阻力形成死叉,可能是股价下跌中途的小反弹。高位区死叉,必须逃顶或止损。'),COLORGREEN,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (CROSS(C,MA125)) THEN BEGIN DRAWTEXTABS(0,i*16,'今日股价上穿半年线。在半年线上方运行的个股被称为强势股。适合中小资金根据短线技术指标套利操作。'),COLORFF00FF,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (CROSS(MA125,C)) THEN BEGIN DRAWTEXTABS(0,i*16,'今日股价跌破半年线。在半年线下方运行的个股被称为弱势股。适合大资金进场吸筹操作。'),COLORGREEN,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (CROSS(C,MA250)) THEN BEGIN DRAWTEXTABS(0,i*16,'今日股价上穿年线。股票筑底后,股价经过反复震荡洗盘上穿年线,予以锁定跟踪。'),COLORFF00FF,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (CROSS(MA250,C)) THEN BEGIN DRAWTEXTABS(0,i*16,'今日股价跌破年线。跌破年线,证明深度调整格局可能形成。如果后市股价继续深跌,调整时间和空间难以预测。'),COLORGREEN,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (CROSS(C,MA60) and CROSS(C,MA125) and CROSS(C,MA250)) THEN BEGIN DRAWTEXTABS(0,i*16,'股价一阳穿三线。5、10、30日均线三线合一,股价一阳穿三线,向上反转,可能变盘反转在即。'),COLORRED,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (MA30 > REF(MA30,1)) THEN BEGIN DRAWTEXTABS(0,i*16,'30日均线趋势向上。注意:如果股价在低位中位30日均线之上,围绕另一条重要均线缩量横盘,随后5-10日均线金叉,所有均线向上呈多头排列,是中长期绩优牛股的摇篮。'),COLORRED,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (MA30 > REF(MA30,1) AND MA30 < REF(MA30,1)*1.001) THEN BEGIN DRAWTEXTABS(0,i*16,'30日均线趋势走平。需观察5日和10日均线方向,如30日均线发出趋势向下信号,5日10日均线形成死叉,注意减仓或出货。'),COLORFFCC66,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (MA30 < REF(MA30,1)) THEN BEGIN DRAWTEXTABS(0,i*16,'30日均线趋势向下。关注股价所处箱体位置,如股价当前上涨或下跌时,则需观察箱体阻力支撑位置。如果股价处于远离30日均线位置,一般情况下股价反弹空间有限。'),COLORGREEN,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (MA5 > REF(MA5,1)*1.015) THEN BEGIN DRAWTEXTABS(0,i*16,'5日均线强劲向上。需观察股价所处其他均线和箱体位置,如果收盘时股价突然跌破5日均线,则需观察箱体下方支撑,提防空头陷阱,股价转向。'),COLORRED,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (MA5 > REF(MA5,1) AND MA5 < REF(MA5,1)*1.005) THEN BEGIN DRAWTEXTABS(0,i*16,'5日均线方向不明。当股价连续跌破5日均线和箱体下沿,导致股价方向开始向下,绩优股应适当做空;股价在箱体内则需观察股价下方的重要均线位置,可否获得支撑。'),COLORYELLOW,ALIGN0,LINETHICK0;
i:=i+1;
END;
IF MSTATUS and (MA5 < REF(MA5,1)*0.985) THEN BEGIN DRAWTEXTABS(0,i*16,'5日均线快速向下,短线风险可能降临。需结合其他均线运行方向分析,如果股价在一个大箱体中,则需观察下方均线支撑,偌收盘前股价获得支撑,5-10均线金叉并数日向上,则可顺势而为做多。'),COLORGREEN,ALIGN0,LINETHICK0;
i:=i+1;
END;
均线30天角度:atan((MA(C,30)/ref(MA(C,30),3)-1)*100)*180/3.14159,LINETHICK0;
均线60天角度:atan((MA(C,60)/ref(MA(C,60),3)-1)*100)*180/3.14159,LINETHICK0;
均线125天角度:atan((MA(C,125)/ref(MA(C,125),3)-1)*100)*180/3.14159,LINETHICK0;
均线250天角度:atan((MA(C,250)/ref(MA(C,250),3)-1)*100)*180/3.14159,LINETHICK0;
{DRAWTEXTABS(10,140,'■60天均线角度:'+NUMTOSTRN(均线60角度,2)+''),ColorFFFFFF;}
{DRAWTEXTABS(160,140,'■125天均线角度:'+NUMTOSTRN(均线125角度,2)+''),ColorFFFFFF;};