偶然看到这个主图,小小修改一下,用之怡情,有两个版本,原版带背景趋势,清爽版去除了背景更清新,源码分享,有划线检测有是未来函数,所以仅供参考。喜欢的取去使用
测试图片
公式源码/技术指标源码
{警示牌设置}
警示牌:=1;
高:=REFDATE(HHV(H,180),DATE)*1.05;
低:=REFDATE(LLV(L,180),DATE)*0.95;
A11:=MA(C,18);
A12:=MA(C,50);
A13:=MA(C,89);
A14:=IF((MA(C,180)<=高 AND MA(C,180)>=低) OR C>=MA(C,180),MA(C,180),DRAWNULL);
{—————股性判断—————}
牛股:=ISLASTBAR AND A11>A12 AND A12>A13 AND A13>IF(A14=DRAWNULL,0,A14) AND C>A11 OR ISLASTBAR AND A11>A12 AND C>=A11;
猴股:=ISLASTBAR AND A11>A12 AND C
熊股:=ISLASTBAR AND IF(A14=DRAWNULL,A12
DRAWGBK(警示牌=1 AND 牛股,0,0,0,'牛股',0);
DRAWGBK(警示牌=1 AND 猴股,0,0,0,'猴股',0);
DRAWGBK(警示牌=1 AND 熊股,0,0,0,'熊股',0);
DRAWKLINE(H,O,L,C);
超买:=MA(C,10)*IF(CAPITAL=0,1.04,1.1),POINTDOT,COLORGREEN,LINETHICK2;
DRAWTEXT(CROSS(MA(C,N1),MA(C,N2)),MA(C,N2)*0.99,'↖金叉'),LINETHICK2,COLORFF00FF;
STICKLINE(C>=O,C,O,3.4,0),COLOR0000AA;
STICKLINE(C>=O,C,O,3.0,0),COLOR0000BB ;
STICKLINE(C>=O,C,O,2.4,0),COLOR0000CC;
STICKLINE(C>=O,C,O,2.0,0),COLOR0000DD ;
STICKLINE(C>=O,C,O,1.6,0),COLOR0000EE;
STICKLINE(C>=O,C,O,1.2,0),COLOR0000FF;
STICKLINE(C>=O,C,O,0.6,0),COLOR0000FF;
STICKLINE(C>=O,H,L,0,0),COLORRED;
STICKLINE(C<=O,C,O,3.4,0),COLORAAAA00;
STICKLINE(C<=O,C,O,3.0,0),COLORBBBB00;
STICKLINE(C<=O,C,O,2.4,0),COLORCCCC00;
STICKLINE(C<=O,C,O,2.0,0),COLORDDDD00;
STICKLINE(C<=O,C,O,1.6,0),COLOREEEE00;
STICKLINE(C<=O,C,O,1.2,0),COLORFFFF00;
STICKLINE(C<=O,C,O,0.6,0),COLORFFFF00;
STICKLINE(C<=O,H,L,0,0),COLORFFFF00;
AAA0:=CONST(HHV(H,50));PL5:=HHV(H,45);
F:=100*(C-REF(C,1))/REF(C,1);
博尔:=IF(C
P1:=博尔;
量化:=IF(C
P2:=量化;
STICKLINE(P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,OPEN,CLOSE,3,0),COLORFF00FF;
V转: MA(C,5) <MA(C,10) </MA(C,10)AND V=LLV(V,10) AND C>O NODRAW;
三日最低:=EMA((REF(L,4)+REF(L,3)+REF(L,2))/3,3);
三日最高:=EMA((REF(H,4)+REF(H,3)+REF(H,2))/3,3);
EXITLONG:CROSS(CROSS(三日最高,C),0.6),NODRAW;
DRAWTEXT(V转,L*0.98,' V转'),COLORFFFFFF;
DRAWICON(V转,LOW*0.98,23);
DRAWICON(EXITLONG,H*1.01,35);
止跌:=(REF(EVERY(CO);
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
买0:=LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2));
止跌买:止跌 AND 买0 ,NODRAW ;
DRAWTEXT(止跌买,L*0.98,' 止跌买'),COLORFFFFFF;
DRAWICON(止跌买,LOW*0.98,34);
VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);
VAR3:=EMA(VAR2,10);
VAR4:=LLV(LOW,33);
VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);
主力进:IF(VAR5>REF(VAR5,1),VAR5,0),NODRAW,COLOR505050;
DRAWTEXT(主力进,L*0.98,' 主力进'),COLORFFFFFF;
DRAWICON(主力进,LOW*0.98,13);
IF(主力进,CONST(HHV(HIGH,0)),DRAWNULL),STICK,COLORGRAY;
A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
A4:=SMA(A3,3,1);
A5:=SMA(A4,3,1);
A6:=3*A4-2*A5;
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
买:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2));
DRAWTEXT(FILTER(买=1,5),LOW-0.05,'↖跟庄买'),COLORYELLOW;
STICKLINE(买,OPEN,CLOSE,2,0),COLORYELLOW;
ZT:=C/REF(C,1)>1.097;
XH:=FILTER(ZT,13);
BH:=BARSLAST(ZT);
CZ:=REF(H,BH)-REF(L,BH);
STICKLINE(ZT,REF(O,BH),REF(C,BH),2,0),COLORYELLOW;
DRAWTEXT(ZT,L*0.98,'★涨停'),COLOR4080FF;
N:=20;
中: EMA((HHV(H,N/2)+LLV(L,N/2))/2,N/3)COLOR6A6A6A;
BIAS:= ABS(C-中)/中;{乘离率}
P:=(1.2+5*FORCAST(BIAS,5)); {动态参数P}
动态上: 中+P*STD(C,N)COLOR80FFFF,LINETHICK1,DOTLINE;
动态下: 中-P*STD(C,N)COLOR80FFFF,LINETHICK1,DOTLINE;
CC:IF(CURRBARSCOUNT<18,CONST(REF(C,1)),DRAWNULL),COLOR000000,NODRAW;
止赢:1.05*CC,COLORMAGENTA,LINETHICK1;
DRAWTEXT(ISLASTBAR,止赢,'止赢'),LINETHICK1;
止损:0.97*CC,COLORYELLOW,LINETHICK1;
DRAWTEXT(ISLASTBAR,止损,'止损'),LINETHICK1;
V01:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
V02:=(1-7/100)*(DMA(CLOSE,V01));
V03:=(1+7/100)*(DMA(CLOSE,V01));
V05:=MA((LOW+HIGH+CLOSE)/3,5);
短支撑:REFDATE(V02,DATE),LINETHICK1,COLOR454545;
DRAWTEXT(ISLASTBAR,短支撑,'短支撑'),LINETHICK1;
短阻力:REFDATE(V03,DATE),LINETHICK1,COLOR454545;
DRAWTEXT(ISLASTBAR,短阻力,'短阻力'),LINETHICK1;
波段10日:EMA(C,10),COLOR00FFFF,LINETHICK1;
红升2:IF(波段10日>REF(波段10日,1),波段10日,DRAWNULL),COLORFF00FF;
绿降2:IF(波段10日 <REF(波段10日,1),波段10日,DRAWNULL),COLORFFFF00;< span> </REF(波段10日,1),波段10日,DRAWNULL),COLORFFFF00;<>
操作30日均线:EMA(C,30),COLORYELLOW,LINETHICK4;
红升:IF(操作30日均线>REF(操作30日均线,1),操作30日均线,DRAWNULL),COLORRED,LINETHICK4;
绿降:IF(操作30日均线 <REF(操作30日均线,1),操作30日均线,DRAWNULL),COLOR009300,LINETHICK4;< span> </REF(操作30日均线,1),操作30日均线,DRAWNULL),COLOR009300,LINETHICK4;<>
{本周5周均线自动画线显示在日线上}
年:=YEAR,NODRAW;
月:=MONTH,NODRAW;
星期:=WEEKDAY,NODRAW;
日1:=DATETODAY(DATE);
上市日:=REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT);
自然日:=日1-DATETODAY(上市日)+1;
ZB:=(自然日-REF(自然日,1))!=星期-REF(星期,1)
OR TOTALBARSCOUNT-CURRBARSCOUNT=0;
本周第几天:=BARSLAST(ZB)+1;
本月第几天:=BARSLAST(年*100+月!=REF(年*100+月,1))+1;
MA1:=REF(C,本周第几天);
MA2:=REF(MA1,本周第几天);
MA3:=REF(MA2,本周第几天);
MA4:=REF(MA3,本周第几天);
五周价:=(C+MA1+MA2+MA3+MA4)/5;
五周:REFDATE(五周价,DATE),COLORLIRED,LINETHICK1,DOTLINE;
{支撑压力}
N0:=18;
A1:=REF(H,N0)=HHV(H,2*N0+1);
B1:=FILTER(A1,N0);
C1:=BACKSET(B1,N0+1);
D1:=FILTER(C1,N0);
A2:=REF(L,N0)=LLV(L,2*N0+1);
B2:=FILTER(A2,N0);
C2:=BACKSET(B2,N0+1);
D2:=FILTER(C2,N0);
E1:=(REF(LLV(L,2*N0),1)+REF(HHV(H,2*N0),1))/2;
E2:=(H+L)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1;
L1:=(D2 AND NOT(D1 AND E1 <E2));< span> </E2));<>
H2:=D1 AND NOT(D2 AND E1>=E2);
X1:=REF(BARSLAST(H1),1)+1;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
S1:=R1>REF(R1,1);
T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
U1:=T1>REF(T1,1);
R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);
S2:=R2>REF(R2,1);
T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);
U2:=T2>REF(T2,1);
压力:DRAWLINE(S2,H,S1,H,1),COLORC08000;
支撑1:DRAWLINE(U2,L,U1,L,1),COLOR0000FF;
DA:=YEAR AND MONTH AND DAY;
AAA:=STRCAT(CON2STR(YEAR,0),'年');
AAB:=STRCAT(CON2STR(MONTH,0),'月');
AA33:=STRCAT(CON2STR(DAY,0),'日');
AA4:=STRCAT('【',IF(WEEKDAY=1,'星期一',IF(WEEKDAY=2,'星期二',IF(WEEKDAY=3,'星期三',IF(WEEKDAY=4,'星期四',IF(WEEKDAY=5,'星期五',IF(WEEKDAY=6,'六','日')))))));
AA:=STRCAT(STRCAT(STRCAT(AAA,AAB),STRCAT(AA33,AA4)),'】');
SA:DRAWTEXT_FIX(DA,0,1,0,AA),COLOR80FFFF;
ME2:=EMA(CLOSE,6);
五天:=EXPMA(CLOSE,5),COLORRED;
超短线:=EMA(ME2,11),COLORGREEN; LJL07:=(3*C+L+O+H)/6;
牛线:=(20*LJL07+19*REF(LJL07,1)+18*REF(LJL07,2)+17*REF(LJL07,3)+16*REF(LJL07,4)+15*REF(LJL07,5)+14*REF(LJL07,6)+13*REF(LJL07,7)+12*REF(LJL07,8)+11*REF(LJL07,9)+10*REF(LJL07,10)+9*REF(LJL07,11)+8*REF(LJL07,12)+7*REF(LJL07,13)+6*REF(LJL07,14)+5*REF(LJL07,15)+4*REF(LJL07,16)+3*REF(LJL07,17)+2*REF(LJL07,18)+REF(LJL07,20))/210,COLORRED;
熊线:=MA(牛线,5),COLORYELLOW,LINETHICK4,POINTDOT;
持股:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4,COLORWHITE;
{趋势}
赚了:=IF(EMA(CLOSE,3)>超短线,超短线,DRAWNULL),COLORRED;
持股角度:=ATAN((持股/REF(持股,1)-1)*100)*180/3.1416,COLORRED,NODRAW;
月线:=EMA(持股,30),COLORYELLOW,DOTLINE;
双月线:=EMA(持股,60),COLORCYAN,DOTLINE;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("DMI.PDI">"DMI.MDI") AND UPNDAY("DMI.ADXR",1) AND ("DMI.ADX">"DMI.ADXR"),0.460,0.26,0,'DMI 火箭升空'),COLOR8080FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("DMI.PDI"<"DMI.MDI") AND UPNDAY("DMI.ADXR",1) AND ("DMI.ADX">"DMI.ADXR"),0.460,0.26,0,'DMI 空中炸弹'),COLORGREEN;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("DMI.PDI">"DMI.MDI"),0.460,0.21,0,'DMI 多头趋势'),COLOR8080FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("DMI.PDI"<"DMI.MDI"),0.460,0.21,0,'DMI 空头趋势'),COLORGREEN;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS("KDJ.J","KDJ.K"),0.460,0.31,0,'K D J 金 叉'),COLOR8080FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS("KDJ.K","KDJ.J"),0.460,0.31,0,'K D J 死 叉'),COLORGREEN;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("KDJ.J">"KDJ.K"),0.460,0.36,0,'K D J 多头趋势'),COLOR8080FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("KDJ.J"<"KDJ.K"),0.460,0.36,0,'K D J 空头趋势'),COLORGREEN;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.DIF">"MACD.DEA") AND "MACD.MACD">0,0.460,0.41,0,'MACD 中线看多'),COLOR8080FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.DIF"<"MACD.DEA") AND "MACD.MACD"<0,0.460,0.41,0,'MACD 中线看空'),COLORGREEN;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.DIF">"MACD.DEA"),0.460,0.46,0,'MACD 多头趋势'),COLOR8080FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.DIF"<"MACD.DEA"),0.460,0.46,0,'MACD 空头趋势'),COLORGREEN;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS("MACD.DIF","MACD.DEA"),0.460,0.51,0,'MACD 金 叉'),COLOR8080FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS("MACD.DEA","MACD.DIF"),0.460,0.51,0,'MACD 死 叉'),COLORGREEN;
上涨:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 上涨,0.460,0.15,0,'上 涨 趋 势'),COLORFF00FF;
短线上涨:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);
短线上涨0:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);
短线上涨1:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线上涨 OR 短线上涨0 OR 短线上涨1),0.460,0.15,0,'短 线 上 涨'),COLOR8080FF;
短线回调:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);
短线回调0:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线回调 OR 短线回调0),0.460,0.15,0,'短 线 回 调'),COLORYELLOW;
短线看空:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);
短线看空0:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);
短线空仓:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);
短线空仓0:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线空仓 OR 短线空仓0 OR 短线看空 OR 短线看空0),0.460,0.15,0,'短 线 空 仓'),COLORYELLOW;
短线震荡:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);
短线震荡0:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);
短线震荡1:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);
注意该股:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线震荡 OR 短线震荡0 OR 短线震荡1 OR 注意该股),0.460,0.15,0,'短 线 震 荡'),COLORYELLOW;
短线反弹:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);
短线反弹0:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线反弹 OR 短线反弹0),0.460,0.15,0,'短 线 反 弹'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 ,0.360,0.09,0,'★---今 日 操 作 提 示---★')COLORFFFFFF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.MACD">0) AND (CROSS("MACD.DIF","MACD.DEA") OR CROSS(持股,超短线)) AND UPNDAY(超短线,1),0.55,0.14,0,'★决策:中 线 全 仓 买 入'),COLORFF80FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.MACD"<0) AND (CROSS("MACD.DEA","MACD.DIF") OR CROSS(超短线,持股)) AND DOWNNDAY(超短线,1),0.55,0.09,0,'★决策:中 线 空 仓'),COLORFF80FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1),0.55,0.09,0,'★决策:短 线 空 仓 ---打 牌'),COLORFF80FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1),0.55,0.09,0,'★决策:短 线 买 入 30 %'),COLORFF80FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND UPNDAY(超短线,1) AND UPNDAY(持股,1),0.55,0.09,0,'★决策:短 线 买 入 60 %'),COLORFF80FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1),0.55,0.09,0,'★决策:短 线 震 荡 看 看 再 说'),COLORFF80FF;
DRAWNUMBER(ISLASTBAR ,C,C),COLORWHITE;
(本文完)
特别声明:素材来源于网络或付费,仅供学习交流之用,请勿用作法律禁止之外用途!若有侵权,请联系小编删帖,本人不承担任何责任;若资源对您有帮助,请支持正版。
|