交易系统指标模板(1)
交易系统指标模板(1)共三个窗口(指标)
{★ 2560战法【主图指标】均线之主图}
{MACD通用型参数设置: SHORT 2 200 12 LONG 2 200 26 MID 2 200 9}
{布林多空之布林带参数设置: N:2 100 11 M:2 100 6}
平均成本线:COST(50)COLORRED,NODRAW;
MA100中长线:MA(C,100),NODRAW,COLOR0099FF;
年线:=MA(C,250)COLOR222222,LINETHICK2; {NODRAW}
MA5短线:MA(C,05)COLORWHITE,DOTLINE;
MA17中线快线: MA(C, 17),DOTLINE,COLORRED;
MA25中线慢线:MA(C, 25),LINETHICK1,COLORGREEN;
多:IF(MA25中线慢线>REF(MA25中线慢线,1),MA25中线慢线,DRAWNULL)LINETHICK2,COLOR0099FF;
空:IF(MA25中线慢线<REF(MA25中线慢线,1),MA25中线慢线,DRAWNULL)LINETHICK2,COLORGREEN;
选股预警:DRAWTEXT_FIX(CURRBARSCOUNT=1 AND LONGCROSS(C,MA25中线慢线,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),H+0.3,15);
{筹码分级【副图指标】}
{现价止盈位与现价止损位}
现价: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)COLORYELLOW;
启动_05:=EMA(量,5)COLORWHITE;
{MACD指标}
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG)COLORGREEN,LINETHICK1;
DEA:=EMA(DIF,MID)COLORFFFF33,LINETHICK1;
MACD:=(DIF-DEA)/0.5,COLORSTICK;
{BOLL指标}
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,'●')COLORRED;
SAR空仓标识:DRAWTEXT(CLOSE<=SAR(4,2,20),SAR(4,2,20)+0.3,'●')COLORGREEN;
穿线:=DRAWTEXT((CROSS(C,五日平均股价)AND REF(MA25中线慢线,0)>=REF(MA25中线慢线,1)AND C>BBIBOLL AND DIF>0 AND REF(量,0)>REF(洗盘_60,0)),LOW-0.45,'多')COLORRED;
放量:DRAWICON(CROSS(C,REF(MA25中线慢线,0))AND REF(MA25中线慢线,0)>=REF(MA25中线慢线,1) AND 启动_05>=洗盘_60,LOW-0.2,7)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),COLORCYAN;
标识03:STICKLINE(CLOSE=OPEN,CLOSE,OPEN,3,0),COLORCYAN;
标识04:STICKLINE(CLOSE>OPEN,HIGH,CLOSE,0,0),COLORCYAN;
标识05:STICKLINE(CLOSE>OPEN,LOW,OPEN,0,0),COLORCYAN;
标识06:STICKLINE(CLOSE>OPEN,OPEN,CLOSE,3,1),COLORCYAN;
标识07:STICKLINE(OPEN>CLOSE,HIGH,LOW,0,0),COLORCYAN;
标识08:STICKLINE(OPEN>CLOSE,OPEN,CLOSE,3,0),COLORCYAN;
标识09:STICKLINE(CLOSE<MA5短线 AND OPEN>=CLOSE,HIGH,LOW,0,0),COLORCYAN;
标识10:STICKLINE(CLOSE<MA5短线 AND OPEN>=CLOSE,OPEN,CLOSE,3,0),COLORCYAN;
标识11:STICKLINE(CLOSE<MA5短线 AND OPEN<CLOSE,HIGH,CLOSE,0,0),COLORCYAN;
标识12:STICKLINE(CLOSE<MA5短线 AND OPEN<CLOSE,OPEN,LOW,0,0),COLORCYAN;
标识13:STICKLINE(CLOSE<MA5短线 AND OPEN<CLOSE,OPEN,CLOSE,3,1),COLORCYAN;
{红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); {只做位置在红色多头区间的个股,位置在白色空头区间的个股概不参与。};
{2560Z战法【副图】成交量指标}
{参数设置 N: 2 100 2 M: 2 100 5}
流通股_亿:=CAPITAL/1000000,LINETHICK0,COLORWHITE;
量:=VOL,VOLSTICK,COLORRED;
VAR01:=DYNAINFO(17)*REF(MA(VOL,5),1);
VAR02:=DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT;
预测:=IF(DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,VAR01,VAR02)/10000;
预测量1:=STICKLINE(IF(DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,VAR01,VAR02),VAR01,0,3,1),COLOR8B5736;
预测量2:STICKLINE(IF(DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,VAR01,VAR02),VAR01,0,3,1),COLOR3B8B00;
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
买:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+ (CLOSE-LOW)),VOL /2)),POINTDOT,COLORRED;
卖:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0- AA*(HIGH-LOW),0-VOL /2))NODRAW,COLORGREEN;
量(万手):=VOL/10000,NODRAW,VOLSTICK,COLORGREEN;
N2:=5;
HSCOL:=IF((SETCODE==0||SETCODE==1),100*VOL,VOL)/(FINANCE(7)/100);
MAHSL:=MA(HSCOL,N2);
B:DRAWICON(CROSS(HSCOL,MAHSL)AND V>REF(V,1)*1.6,0,41);
买盘占比%:=买/VOL*100,COLORRED,NODRAW;
卖盘占比%:=-卖/VOL*100,COLORGREEN,POINTDOT,NODRAW;
买卖盘差值:(买盘占比%-卖盘占比%),COLORWHITE;
上涨标识01:=STICKLINE(C>=REF(C,1) ,0,VOL,3,0),COLOR8B5736;
下跌标识02:=STICKLINE(C<REF(C,1),0,VOL,3,0),COLOR8B5736;
多量标识:STICKLINE(买盘占比%>卖盘占比%,0,VOL,3,1),COLORRED;
空量标识:STICKLINE(买盘占比%<卖盘占比%,0,VOL,3,0),COLORGREEN;
多头量标识:=STICKLINE(买盘占比%>卖盘占比%,0,VOL,3,1),COLORRED;
空头量标识:=STICKLINE(买盘占比%<卖盘占比%,0,VOL,3,0),COLORGREEN;
平量标识:=STICKLINE(买盘占比%=卖盘占比%,0,VOL,3,1),COLORBROWN;
主买量标识:STICKLINE(买>0,(买+(-卖)),0,3,1),COLORRED; {COLOR3A3AFF};
主卖量标识:STICKLINE(买>0, 0,-卖,3,1),COLORLIGREEN; {COLOR006400};
异动_135:MA(量,135)COLORFF0000,DOTLINE;
洗盘_60:MA(量,60)COLOR0099FF,LINETHICK1;
均衡_10:MA(量,10)COLORGREEN,LINETHICK1;
启动_05:EMA(量,5)COLORWHITE,LINETHICK1;
穿线放量:STICKLINE(量>洗盘_60,量,洗盘_60,1.5,0),COLORRED;
VAR2:=REF(LOW,1);
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(IF(CLOSE*1.2,VAR3*10,VAR3/10),3);
VAR5:=LLV(LOW,38);
VAR6:=HHV(VAR4,38);
VAR7:=IF(LLV(LOW,90),1,0);
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
DD:=VAR8>25; {源码:VAR8>5};
黄金坑:IF((COUNT(DD,2)=2),-20,0),COLOR0099FF,NODRAW;
黄金坑标识1:STICKLINE(FILTER(黄金坑,5),0,量/5,1.5,0),COLOR0099FF;
金叉标识:=DRAWICON(CROSS(启动_05,洗盘_60),0,41);
AAAAAAA:=DRAWLINE(VOL<=LLV(VOL,8),VOL,VOL>=HHV(VOL,35),HHV(VOL,3),0)COLORYELLOW;
BBBBBBB:=DRAWLINE(VOL>=HHV(VOL,35),VOL,VOL<=LLV(VOL,8) ,HHV(VOL,3),1)COLORCYAN;
主动买:=IF(CLOSE>OPEN,BB*(HIGH-LOW),IF(CLOSE<OPEN,BB*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主动买量:=主动买/10000,COLORRED,LINETHICK1;
主动卖:=IF(CLOSE>OPEN,0-BB*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-BB*(HIGH-LOW),0-VOL/2));
主动卖量:=-主动卖/10000,COLORLIGREEN,LINETHICK1;
盘比:(主动买量/主动卖量),COLORRED;
量比:DYNAINFO(17),COLORGREEN;{含“未来函数”DYNAINFO}
参与度:主动买量/(主动买量+主动卖量),COLORYELLOW;
多头:=MA(买,N)COLORYELLOW,LINETHICK1;
空头:=MA(卖*(-1),M),COLORCYAN,LINETHICK1;
强:=买盘占比%>(50)COLORRED;
弱:=卖盘占比%>(50)COLORGREEN;
强弱平衡:=(强=弱),COLORYELLOW;
红色三角强标识:=DRAWICON(强,0,38);
绿色三角弱标识:=DRAWICON(弱,0,39);
强弱平衡标识:=DRAWICON(强弱平衡,0,18);
ZT:=C/REF(C,1)>1.0993 AND C=H;
涨停标识:STICKLINE(ZT AND 买>0,-卖,(买+(-卖)),1.5,0),COLOR0099FF;
WW:=VOL/REF(VOL,1)>2;
GG:=C>O;
倍量上涨标识:STICKLINE(WW AND GG,-卖,(买+(-卖))/2,1.5,0),COLORYELLOW;
PT:=CONST(LLVBARS(V,90));
TS:=IF(CURRBARSCOUNT<=PT+1,CONST(IF(PT=0,MAX(C,O),REF(MAX(C,O),PT))),DRAWNULL),COLORBLUE,DOTLINE;
BS:=IF(CURRBARSCOUNT=PT+1,TS,DRAWNULL),CIRCLEDOT,COLORBLUE,LINETHICK1;
地量标识:=DRAWTEXT(CURRBARSCOUNT=PT+1,TS,STRCAT(CON2STR(CONST(90),0),' 地量')),COLORBLUE;
买卖盘差值标识1:DRAWNUMBER(CURRBARSCOUNT=1,REF(启动_05,0)*1.3,REF(买卖盘差值,0))COLORWHITE;
异动:=DRAWICON(LONGCROSS(量,异动_135,3),量,41);
量能异动:=STICKLINE(LONGCROSS(量,异动_135,3),量,量,0,0)COLORYELLOW;
蛰伏:=-1,COLORBLACK,LINETHICK5;
提示0:=DRAWTEXT_FIX(C!=0,0.12,0.03,0,' 设:单笔交易单位 3万元,风险收益比 ≥ 1 : 2 。即,止损 -3%,止盈 +4.5% 。 '),COLORRED;
提示1:=DRAWTEXT_FIX(C!=0,0.01,0.03,0,' 买入盘量柱 __ 红色空心量柱。 '),COLORRED;
提示2:=DRAWTEXT_FIX(C!=0,0.01,0.09,0,' 卖出盘量柱 __ 绿色空心量柱。 '),COLORLIGREEN;
提示3:=DRAWTEXT_FIX(C!=0,0.01,0.15,0,' 倍量上涨标识 __ 内里实心黄色量柱。 '),COLORYELLOW;
提示4:=DRAWTEXT_FIX(C!=0,0.01,0.21,0,' 穿线放量标识 __ 内里红色实心量柱。 '),COLORRED;
提示5:=DRAWTEXT_FIX(C!=0,0.01,0.27,0,' 地量地价标识 __ 内里青色实心量柱。 '),COLORLICYAN;
提示6:=DRAWTEXT_FIX(C!=0,0.01,0.33,0,' 涨停量柱标识 __ 土黄量柱。 '),COLOR0099FF;
提示7:=DRAWTEXT_FIX(C!=0,0.01,0.39,0,' 收盘价大于开盘价量柱标识 __ 红色圆点。 '),COLORRED;
提示8:=DRAWTEXT_FIX(C!=0,0.01,0.45,0,' 收盘价小于开盘价量柱标识 __ 青色圆点'),COLORCYAN;
地量标识01:=DRAWTEXT(地量标识,TS,' 地量'),COLORCYAN;
地量标识02:STICKLINE(地量标识,0,-卖,1.5,0),COLORLICYAN;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
0,NODRAW,COLORBLACK;
买盘卖盘差值:(买盘占比%-卖盘占比%),COLORLICYAN;
多头强标识:DRAWTEXT(强,-10,'●')COLORRED;
空头弱标识:DRAWTEXT(弱,-10,'●')COLORCYAN;
{流通盘(亿手):CAPITAL/1000000,NODRAW,COLORLIGRAY;
年收益:FINANCE(33),NODRAW,COLORCYAN;
每股净资:FINANCE(34),NODRAW,COLORGREEN;}
股东权益:FINANCE(36),NODRAW,COLORMAGENTA;
每股公积:FINANCE(18)/1,NODRAW,COLORRED;
{换手率:VOL/CAPITAL*100,NODRAW,COLORRED;};
A01:=DYNAINFO(7);
A03:=BARSCOUNT(CLOSE);
A04:=(SMA((CLOSE / HHV(HIGH,120)),3,1) * 100);
A05:=IF((A03 > 20),A04,0);
A06:=IF((LOW > A01),0,IF((HIGH < A01),1,(((A01 - LOW) + 0.009) / ((HIGH - LOW) + 0.009))));
A07:=DMA(A06,(VOL / CAPITAL)) * 60;
A09:=IF((((A07 > 0) AND (A07 > REF(A07,1))) AND (A05 <= 88)),A07,0);
VAR10:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
VAR20:=EMA(VAR10,8);
VAR30:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
趋势:=EMA(VAR30,3)-10;
趋势标识:=STICKLINE((A09>0) AND 趋势<40,0,V/40000,2,0),COLORMAGENTA;
A011:=DYNAINFO( 5);
A013:=BARSCOUNT(HIGH);
A014:=(SMA((HIGH / HHV(CLOSE,120)),3,1) * 100);
A015:=IF((A013 > 20),A014,0);
A016:=IF((HIGH < A011),0,IF((LOW > A011),1,(((A011 - HIGH) + 0.009) / ((LOW - HIGH) + 0.009))));
A017:=DMA(A016,(VOL / CAPITAL)) * 60;
A019:=IF((((A017 >0) AND (A017 > REF(A017,1))) AND (A015 >= 88)),A017,0);
VAR21:=3*SMA((CLOSE-HHV(HIGH,27))/(LLV(LOW,27)-HHV(HIGH,27))*100,5,1)-
2*SMA(SMA((HIGH-HHV(HIGH,27))/(LLV(LOW,27)-HHV(HIGH,27))*100,5,1),3,1);
VAR22:=EMA(VAR21,8);
VAR23:=3*SMA((HIGH-HHV(HIGH,55))/(LLV(LOW,55)-HHV(HIGH,55))*100,5,1)-
2*SMA(SMA((HIGH-HHV(HIGH,55))/(LLV(LOW,55)-HHV(HIGH,55))*100,5,1),3,1);
趋势1:=EMA(VAR23,3)-10;
趋势1标识:=STICKLINE((A019 > 0 AND (趋势1<20 OR 趋势1>REF(趋势1,1)AND 趋势1<50)),0,V/40000,2,0),COLORGREEN;
B2:DRAWICON(CROSS(ZIG(3,6),REF(ZIG(3,6),1)),V/100,1) ;
S2:DRAWICON(CROSS(REF(ZIG(3,4),1),ZIG(3,4)),V/100,2);
量*1000/-30000,COLORBLACK,POINTDOT;
{牛熊多空【副图】2560战法之MACD副图指标}
{通用型参数设置: SHORT 2 200 12 LONG 2 200 26 MID 2 200 9}
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG)COLORGREEN,LINETHICK1;
DEA:=EMA(DIF,MID)COLORFFFF33,LINETHICK1;
MACD:=(DIF-DEA)/0.5,COLORSTICK;
标柱1:STICKLINE(MACD>REF(MACD,1) AND MACD>0,0.0001,MACD,1.5,0),COLORRED;
标柱2:STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0.0001,MACD,1.5,0),COLORYELLOW;
标柱3:STICKLINE(MACD<REF(MACD,1) AND MACD<0,-0.0001,MACD,1.5,0),COLORGREEN;
标柱4:STICKLINE(MACD>=REF(MACD,1) AND MACD<0,-0.0001,MACD,1.5,0),COLORLICYAN;
标柱5:STICKLINE(C>0,0,0,50,1),COLORBLUE; {0 轴 画彩色线}
标柱6:STICKLINE(MACD>0,0,-0.0001,8,0),COLORRED; {0 轴 画彩色线}
标柱7:STICKLINE(MACD<0,0,-0.0001,8,0),COLORGREEN; {0 轴 画彩色线};
A11:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A11+1)>CLOSE AND DIF>REF(DIF,A11+1) AND CROSS(DIF,DEA);
底背离符号1:=DRAWTEXT(底背离,DEA*0.9-0.1,'▲'),COLORMAGENTA;
底背离符号2:DRAWLINE(A11=0,DEA,底背离,DEA,0),COLORFF00FF,DOTLINE;
A21:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A21+1)<CLOSE AND REF(DIF,A21+1)>DIF AND CROSS(DEA,DIF);
顶背离符号:DRAWLINE(A21=0,DEA,顶背离,DEA,0),COLORGREEN,DOTLINE;
牛熊分界线:0,COLORLICYAN;
A:=EMA((CLOSE-REF(C,1))/REF(C,1)*10-(INDEXC-REF(INDEXC,1))/REF(INDEXC,1)*10,5),NODRAW,COLORRED;
AA:=STICKLINE(A>0,0,A,1,2),COLORRED;
AB:=STICKLINE(A<0,0,A,1,2),COLORGREEN;
A1:=EMA(CLOSE,7)-EMA(CLOSE,21);
B1:=EMA((0.668*REF(A1,1)+0.333*A1),1);
MACD_牛:IF(A1>=B1,A1,B1),LINETHICK1,COLORRED;
MACD_熊:IF(B1-A1,B1,A1),LINETHICK1,COLORGREEN;
{BIAS-QL}
{参数 N2: 2 250 6 M2: 2 250 6}
乖离BIAS:(CLOSE-MA(CLOSE,N2))/MA(CLOSE,N2)*100,NODRAW;
乖离BIASMA:MA(BIAS,M),NODRAW;