2560战法之主图
{★ 2560战法【主图指标】均线之主图}
{MACD通用型参数设置: SHORT 2 200 12 LONG 2 200 26 MID 2 200 9}
{布林多空之布林带参数设置: N:2 100 11 M:2 100 6}
平均成本线:COST(50)COLORLICYAN,NODRAW;
年线:MA(C,250)COLOR222222,LINETHICK2; {NODRAW}
MA5:MA(C,05)COLORFFEFD5,DOTLINE;
MA20:MA(C, 20),LINETHICK1,COLOR666666,DOTLINE;
MA25:MA(C, 25),LINETHICK1,COLORGREEN;
多:IF(MA25>REF(MA25,1),MA25,DRAWNULL),COLORRED;
空:IF(MA25<REF(MA25,1),MA25,DRAWNULL),COLORGREEN;
选股预警:DRAWTEXT_FIX(CURRBARSCOUNT=1 AND LONGCROSS(C,MA5,3),0.82,0.08,0,'股价上穿五日均 ★★★')COLORMAGENTA;
五日平均股价:=MA(C,5)NODRAW;
选股预警2:DRAWICON(CROSS(REF(C,0),REF(五日平均股价,0))AND REF(MA25,0)>=REF(MA25,1),L-0.6,15);
{筹码分级【副图指标】}
获利盘走势:=WINNER(C)*100,COLORFFFFFF,LINETHICK2;
白色:=STICKLINE(获利比例<10,0,获利比例,2.6,1),COLORBLUE; {COLORFFEFDB}
黄色:=STICKLINE(获利比例>=10 AND 获利比例<45,0,获利比例,2.6,1),COLOR0099FF;
红色:=STICKLINE(获利比例>=45 AND 获利比例<=85,0,获利比例,2.6,1),COLORRED;
紫色:=STICKLINE(获利比例>=85 AND 获利比例<=100,0,获利比例,2.6,1),COLORMAGENTA;
获利盘走势1:=EXPMEMA(获利盘走势,3),COLORWHITE,LINETHICK1;
获利盘走势2:=EXPMEMA(获利盘走势,5),COLORCYAN,LINETHICK1;
获利盘走势3:=EXPMEMA(获利盘走势,5),COLORRED,LINETHICK1;
获利盘走势4:=EXPMEMA(获利盘走势,10),COLORGREEN,LINETHICK1;
中线:=50,COLOR555555,DOTLINE;
短线:=DRAWICON(CROSS(REF(获利盘走势3,0),REF(获利盘走势3,1)),L-0.3,41);
{现价止盈位与现价止损位}
现价:DYNAINFO(7)COLORWHITE,NODRAW;
现价止盈位:REF(现价*1.045,1)COLORRED,NODRAW; {按 +4.5 % 止盈的止盈位 }
现价止损位:REF(现价*0.97,1)COLORGREEN,NODRAW; {按 -3.0 % 止损的止损位 }
短期:100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5))NODRAW,COLORWHITE;
中期:100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10))NODRAW,COLORYELLOW;
中长期:100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20))NODRAW,COLORRED;
长期:100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30))NODRAW,COLORMAGENTA,LINETHICK2;
短线预警:DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 短期=(100)AND 中期=(100)AND 中长期=(100)AND 长期=(100),0.90,0.01,0,'小心短线见顶 ★★★')COLOR0099FF;
短线提醒:DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 短期<=(6)AND 中期<=(6)AND 中长期<=(6)AND 长期<=(6),0.90,0.98,0,'短线已然超跌 ★★★')COLORGREEN;
{涨幅}
日涨幅:((C-REF(C,1))/REF(C,1))*100,COLORRED,NODRAW;
周涨幅:((C-REF(C,5))/REF(C,5))*100,COLORYELLOW,NODRAW;
月涨幅:=((C-REF(C,20))/REF(C,20))*100,COLORGREEN,NODRAW;
季涨幅:=((C-REF(C,60))/REF(C,60))*100,COLORMAGENTA,NODRAW;
标识25:STICKLINE(日涨幅>=9.95,O,C,2,0),COLORYELLOW;
所属行业:DRAWTEXT_FIX(1,0.02,0.02,0,'所属行业:'),COLORFF6000;
行业标识:DRAWTEXT_FIX(1,0.059,0.02,0,HYBLOCK),COLORRED;
地域标识:DRAWTEXT_FIX(1,0.095,0.02,0,DYBLOCK),COLORGREEN;
名称代码:=STRCAT(STRCAT(STRCAT(STRCAT('名称: ',STKNAME),' 代码: '),CODE),' ' );
概念板块:=STRCAT('概念板块: ',GNBLOCK);
名称代码标识:DRAWTEXT_FIX(ISLASTBAR,0.14,0.02,0,STRCAT(名称代码,概念板块)),COLORYELLOW;
量:=VOL;
洗盘_60:=MA(量,60);
启动_05:=EMA(量,5);
AMV0:=VOL*(O+C+H+L)/4;
势:=EMA(AMV0,21)/EMA(VOL,21)COLORLICYAN,LINETHICK1;
压:=6*HHV(势,2)-5*势,COLORGREEN,NODRAW;
托:=2*势-压,COLORYELLOW,NODRAW;
多头:=IF(势>REF(势,1),势,DRAWNULL),COLORRED;
空头:=IF(势<REF(势,1),势,DRAWNULL),COLORGREEN;
多1:=CROSS(C,压),NODRAW;
势1:=STICKLINE(CLOSE>势,OPEN,CLOSE,3,1), COLORRED;
势2:=STICKLINE(CLOSE=势,OPEN,CLOSE,3,0), COLORRED;
势3:=STICKLINE(CLOSE>势 AND CLOSE>(OPEN),LOW,OPEN,0,1), COLORRED;
势4:=STICKLINE(CLOSE=势,LOW,OPEN,0,0), COLORRED;
势5:=STICKLINE(CLOSE>势 AND CLOSE>(OPEN),CLOSE,HIGH,0,1),COLORRED;
势6:=STICKLINE(CLOSE=势,CLOSE,HIGH,0,0),COLORRED;
势7:=STICKLINE(CLOSE>势 AND CLOSE<(OPEN),LOW,OPEN,0,1), COLORRED;
势8:=STICKLINE(CLOSE>势 AND CLOSE<(OPEN),CLOSE,HIGH,0,1),COLORRED;
势9:=STICKLINE(CLOSE>势 AND CLOSE<(OPEN),OPEN,CLOSE,3,0),COLORRED;
势01:=STICKLINE(CLOSE<势,OPEN,CLOSE,3,1), COLOR666666;
势02:=STICKLINE(CLOSE=势,OPEN,CLOSE,3,0), COLOR333333;
势03:=STICKLINE(CLOSE<势 AND CLOSE>(OPEN),LOW,OPEN,0,1), COLOR555555;
势04:=STICKLINE(CLOSE=势,LOW,OPEN,0,0), COLOR333333;
势05:=STICKLINE(CLOSE<势 AND CLOSE>(OPEN),CLOSE,HIGH,0,1),COLOR555555;
势06:=STICKLINE(CLOSE=势,CLOSE,HIGH,0,0),COLOR444444;
势07:=STICKLINE(CLOSE<势 AND CLOSE<(OPEN),LOW,OPEN,0,1), COLOR333333;
势08:=STICKLINE(CLOSE<势 AND CLOSE<(OPEN),CLOSE,HIGH,0,1),COLOR333333;
势09:=STICKLINE(CLOSE<势 AND CLOSE<(OPEN),OPEN,CLOSE,3,0),COLOR333333;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG)COLORGREEN,LINETHICK1;
DEA:=EMA(DIF,MID)COLORFFFF33,LINETHICK1;
MACD:=(DIF-DEA)/0.5,COLORSTICK;
{多空 K线【副图指标】}
AAA:=(MA (CLOSE,13)+MA (CLOSE,17))/2;
CCC:=(STD(CLOSE,13)+STD(CLOSE,17))/2;
BBB:=AAA+2.1*CCC;
DDD:=AAA+0.72*CCC;
ZZZ:=IF(CCC>1.88 ,MA (DDD,3),DDD);
平仓:=ZZZ*1.145,COLORCYAN,NODRAW;
风险:=ZZZ*1.095,COLORGREEN,NODRAW;
回档:=ZZZ*1.04,COLORYELLOW,NODRAW;
平衡:=ZZZ*0.986,COLORLICYAN,NODRAW;
反弹:=ZZZ*0.918,COLORMAGENTA,NODRAW;
超跌:=ZZZ*0.880,COLORRED,NODRAW;
满仓:=ZZZ*0.83,COLORBLUE,LINETHICK1,NODRAW;
多2:=CROSS(C,平衡);
CV:=CLOSE;
BBIBOLL:=(MA(CV,3)+MA(CV,6)+MA(CV,12)+MA(CV,24))/4,COLORFFFF00,LINETHICK1;
UPR:=BBIBOLL+M*STD(BBIBOLL,N)COLOR888888,DOTLINE; {COLOR0099FF}
DWN:=BBIBOLL-M*STD(BBIBOLL,N)COLOR888888,DOTLINE; {COLOR00FF99}
多3:=CROSS(C,BBIBOLL);
{SAR指标}
持仓:=IF(CLOSE>=SAR(4,2,20),SAR(4,2,20),DRAWNULL)COLORRED;
空仓:=IF(CLOSE<=SAR(4,2,20),SAR(4,2,20),DRAWNULL)COLORGREEN;
BS:STICKLINE(C/REF(C,1)>1.095,O,C,1.5,0),COLORYELLOW;
SAR持仓标识:DRAWTEXT(CLOSE>=SAR(4,2,20),SAR(4,2,20)-0.3,'●')COLORMAGENTA;
SAR空仓标识:DRAWTEXT(CLOSE<=SAR(4,2,20),SAR(4,2,20)+0.3,'●')COLORCYAN;
穿线:DRAWTEXT((CROSS(C,五日平均股价)AND REF(MA25,0)>=REF(MA25,1)AND C>BBIBOLL AND DIF>0 AND REF(量,0)>REF(洗盘_60,0)),L-0.2,'多')COLORRED;
放量:DRAWTEXT(CROSS(C,REF(MA5,0))AND REF(MA25,0)>=REF(MA25,1) AND 启动_05>=洗盘_60,L-0.5,'量')COLORYELLOW;
提示1:=DRAWTEXT_FIX(C!=0,0.01,0.07,0,' 买股: ①_股价上穿均线 + 指标均线拐头 ②_25日均线向上 + 5日均量线拐头 + 成交量量柱站上60日均量线 ③_MACD上穿0轴 或,DIF接近0轴 '),COLORRED;
提示2:=DRAWTEXT_FIX(C!=0,0.01,0.13,0,' ④_《薛斯通道》外下轨上行 ⑤_股价上穿《布林线》中轨,K线翻红 ⑥_股价上穿《宝塔线》,K线翻红 '),COLOR0099FF;
提示3:=DRAWTEXT_FIX(C!=0,0.01,0.19,0,' ⑦_股价上穿《台湾力道》,K线翻红 ⑧_股价上穿“50成本均线”。 只要上述八项条件共振达标,就可以放心进场,买股待涨。 '),COLORGREEN;
提示4:=DRAWTEXT_FIX(C!=0,0.01,0.26,0,' 设置: 盈亏比:1.5 : 1 , 胜率:大于50% , 单笔交易单位:3万元 , 止损位:-3% , 止盈位:+4.5% - +10% 。'),COLORLICYAN;
提示5:=DRAWTEXT_FIX(C!=0,0.01,0.33,0,' 市场风向标:以日K线上穿(平均股价 880003)5日均以及MACD转向为标尺,来辨识短线多空、平衡做票仓位之大小。 '),COLOR0099FF;
提示6:=DRAWTEXT_FIX(C!=0,0.01,0.40,0,' 持仓标准:★ 线上 + MACD0轴之上 _ 仓位 50%-100% ★ 线下 + MACD0轴之下 _ 仓位 10%-20% ★ 线下 + MACD0轴之上 _ 仓位 20%-50% '),COLOR0099FF;
提示7:=DRAWTEXT_FIX(C!=0,0.01,0.47,0,' 交易提示:★ 市场强势时段,可以早盘买股。★ 市场弱势时段,只宜尾盘买股。★ 市场强弱平衡时段,早盘也要少买,多放在尾盘买股。'),COLOR0099FF;
{蓝色打底K线}
标识02:STICKLINE(CLOSE=OPEN,HIGH,LOW,0,0),COLORGREEN;
标识03:STICKLINE(CLOSE=OPEN,CLOSE,OPEN,3,0),COLORGREEN;
标识04:STICKLINE(CLOSE>OPEN,HIGH,CLOSE,0,0),COLORGREEN;
标识05:STICKLINE(CLOSE>OPEN,LOW,OPEN,0,0),COLORGREEN;
标识06:STICKLINE(CLOSE>OPEN,OPEN,CLOSE,3,1),COLORGREEN;
标识07:STICKLINE(OPEN>CLOSE,HIGH,LOW,0,0),COLORGREEN;
标识08:STICKLINE(OPEN>CLOSE,OPEN,CLOSE,3,0),COLORGREEN;
标识09:STICKLINE(CLOSE<MA5 AND OPEN>=CLOSE,HIGH,LOW,0,0),COLORGREEN;
标识10:STICKLINE(CLOSE<MA5 AND OPEN>=CLOSE,OPEN,CLOSE,3,0),COLORGREEN;
标识11:STICKLINE(CLOSE<MA5 AND OPEN<CLOSE,HIGH,CLOSE,0,0),COLORGREEN;
标识12:STICKLINE(CLOSE<MA5 AND OPEN<CLOSE,OPEN,LOW,0,0),COLORGREEN;
标识13:STICKLINE(CLOSE<MA5 AND OPEN<CLOSE,OPEN,CLOSE,3,1),COLORGREEN;
{红K线系列}
标识14:STICKLINE(CLOSE>MA5 AND CLOSE>OPEN,HIGH,CLOSE,0,0),COLORRED;
标识15:STICKLINE(CLOSE>MA5 AND CLOSE>OPEN,LOW,OPEN,0,0),COLORRED;
标识16:STICKLINE(CLOSE>MA5 AND CLOSE>OPEN,OPEN,CLOSE,3,1),COLORRED;
标识17:STICKLINE(CLOSE>MA5 AND CLOSE<=OPEN,HIGH,LOW,0,0),COLORRED;
标识18:STICKLINE(CLOSE>MA5 AND CLOSE<=OPEN,OPEN,CLOSE,3,0),COLORRED;
标识19:STICKLINE(CLOSE>MA5 AND MA25>REF(MA25,1) AND CLOSE>OPEN,HIGH,CLOSE,0,0),COLORRED;
标识20:STICKLINE(CLOSE>MA5 AND MA25>REF(MA25,1) AND CLOSE>OPEN,OPEN,LOW,0,0),COLORRED;
标识22:STICKLINE(CLOSE>MA5 AND MA25>REF(MA25,1) AND CLOSE>OPEN,OPEN,CLOSE,3,1),COLORRED;
标识23:STICKLINE(CLOSE>MA5 AND MA25>REF(MA25,1) AND CLOSE<=OPEN,HIGH,LOW,0,0),COLORRED;
标识24:STICKLINE(CLOSE>MA5 AND MA25>REF(MA25,1) AND CLOSE<=OPEN,OPEN,CLOSE,3,0),COLORRED;
支撑均线:=LLV(HIGH,20),DOTLINE,COLORFFCC00;
支撑均线选股:DRAWICON(FILTERX(CROSS(C,支撑均线),10),L-0.5,1); {只做位置在红色多头区间的个股,位置在白色空头区间的个股概不参与。};