通达信最好用的操盘线主图指标源码

[复制链接]
查看94 | 回复0 | 2022-7-24 04:33:31 | 显示全部楼层 |阅读模式

BBI:(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4,NODRAW;
 {应用法则
1.股价位于BBI上方,视为多头市场。
2.股价位于BBI下方,视为空头市场。
3.下跌行情中,若当日收盘价跌破BBI曲线,表示多转空,为卖出信号。
4.上涨行情中,若当日收盘价升越BBI曲线,表示空转多,为买入信号。
5.上升回档时,BBI为支持线,可以发挥支撑作用。
6.下跌反弹时,BBI为压力线,可以发挥阻力作用。};
 {股票短线操作十大惊天秘密
   第一条:快进快出。即使被套也要遵循铁律而快出。
   第二条:短线要抓领头羊。逮二头养也不错。不追尾羊。
   第三条:上涨时加码,下跌时减磅。
   第四条:大幅下跌的股票都可抢反弹。铁律是:不能热恋,早下车。
   第五条:牛市中不要小视冷门股。不要相中红牌冷门股。
   第六条:股票下跌一定比例要坚决止损(短线4%左右,中线10%,长线20%)。
   第七条:高位三连阴时卖出,低位红三兵时买进。铁律结合个股甄别。
   第八条:买进大盘大跌逆势上涨的股票。
   第九条:敢于买涨停版的股票。铁律是在连续涨停被打开前不松手。
   第十条:敢买跌停板被巨量打开的股票。铁律是次集合竟价时立即抛空。
   还要熟记:顶部利好,撒腿就跑,低部利空,大胆冲锋,大跌大买,小跌小买,不跌不买,买阴不买阳,买阳易上当,买入不急,卖出不,止损不拖。
};
 {想抄底 抓住这五个技术要点(切勿囫圄吞枣),请注意以下事项:
   一.不要一次性将手中的资金全打完,看中的股票每逢盘中低点就买一部分,
 分批买入。
   二.不要买许多股票,最多三只足也。集中弹药做强势股。
   三.所买的股票要有前底,但现在又没有跟随大盘创新低的股票,不能简单地
 越跌越买,而是在股票不创新低后的盘中低点时买入。
   四.中小盘股为首选,年报业绩预增以及大非承诺锁仓二年的,各类题材股.
  五.在大盘上升趋势尚未形成时,所买入的股票尽可能做些T+0或高抛低吸的
 操作来降低持仓成本。
   在市场超跌时要敢于买入,创出新高时勇于卖出。在此时要认真玩味舍得二字,
 只要以上五点引起足够的重视,扬眉吐气的日子终将来临!}

{趋势买卖:K线在买入线下方可考虑买入;而在卖出线上方可考虑卖出
 参数:N 1 100 20;M 1 100 32;P1 1 200 80;P2 1 200 100 }
 MAIRU:=XMA((C+H+O+L)/4,32)*(1-100/1000),COLORMAGENTA,POINTDOT;
 MAICHU:=XMA((C+H+O+L)/4,20)*(1+80/1000),COLORGREEN,POINTDOT;
买入:IF(CURRBARSCOUNT<=34,MAIRU,DRAWNULL),COLORMAGENTA,POINTDOT;
卖出:IF(CURRBARSCOUNT<=34,MAICHU,DRAWNULL),COLORGREEN,POINTDOT;
 {粉买黄卖-买买提示}
 {VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
 VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
 VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);};{
 VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
 VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
 VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR
 VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;
 STICKLINE(VAR19 AND LOW<=MIN(REF(CLOSE,1),REF(CLOSE,2)) AND HIGH>=MAX(REF(CLOSE,1),REF(CLOSE,2)),
 REF(CLOSE,1),REF(CLOSE,2),2,0),COLORMAGENTA;}{粉买}
 {STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),2,0),COLORYELLOW;}{黄卖}

PRICE:=IF(CAPITAL>0,AMOUNT/(V*100),CLOSE);

多空线:(20*PRICE+19*REF(PRICE,1)+18*REF(PRICE,2)+17*REF(PRICE,3)+16*REF(PRICE,4)
 +15*REF(PRICE,5)+14*REF(PRICE,6)+13*REF(PRICE,7)+12*REF(PRICE,8)+11*REF(PRICE,9)
 +10*REF(PRICE,10)+9*REF(PRICE,11)+8*REF(PRICE,12)+7*REF(PRICE,13)+6*REF(PRICE,14)
 +5*REF(PRICE,15)+4*REF(PRICE,16)+3*REF(PRICE,17)+2*REF(PRICE,18)
 +REF(PRICE,20))/210,COLORYELLOW,LINETHICK2;
 DRAWICON(CROSS(CLOSE,多空线) AND COUNT(CROSS(CLOSE,多空线),5)=1,LLV(LOW,5),5);
生命线:EMA(C,55),COLORGREEN,LINETHICK2;

买卖点1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
买卖点2:=2*ABS(买卖点1);
买卖点3:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
情报:= 100-买卖点3;
红军:= IF(买卖点1>0,买卖点1,0);
绿军:= IF(买卖点1<0,买卖点2,0);

工作:IF((CLOSE>多空线 AND 多空线>REF(多空线,1)*0.98)
 OR ((情报>=REF(情报,1)) AND ((红军>=REF(红军,1)) OR 绿军<REF(绿军,1))),多空线,DRAWNULL),COLORRED,LINETHICK2;
 MA5:MA(PRICE,5),COLORBLUE,LINETHICK2;
奔跑:IF(MA5>REF(MA5,1),MA5,DRAWNULL),COLORMAGENTA,LINETHICK2;
狗熊:IF(生命线<REF(生命线,1), 生命线,DRAWNULL),COLORGRAY,LINETHICK2;

买:=4*SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1)
 -3*SMA(SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1),3.2,1);
 DRAWTEXT(CROSS(买,8),L*0.98,'买'),COLOR0099FF;

{起涨点}
EMA14:=EMA(PRICE,14);
起涨点:=CROSS(EMA14-REF(EMA14,1),0);
 STICKLINE(起涨点,CLOSE,OPEN,3,0 ),COLOR0000CC;
 STICKLINE(起涨点,CLOSE,OPEN,2,0 ),COLOR0033FF;
 STICKLINE(起涨点,LOW,HIGH,0,0 ),COLOR0033FF;
 SHORT:=7;LONG:=19;
 T:=PERIOD;
 D:=IF(T=0,30,{1F}
 IF(T=1,25,{5F}
 IF(T=8,25,{多分钟}
IF(T=2,20,{15F}
 IF(T=3,20,{30F}
 IF(T=4,20,{60F}
 IF(T=5,10,{日}
IF(T=6,10,{周}
IF(T=7,10,{月}
IF(T=9,10,{多日}
IF(T=10,10{季},10{年})))))))))));
RMA:=EMA(CLOSE,SHORT),COLORLIGRAY;
 NMA:=EMA(CLOSE,LONG),COLORMAGENTA;
 RISK:=IF(NMA>RMA,NMA,DRAWNULL),COLORGREEN;
 UP:DRAWLINE(L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1)
 AND L=LLV(L,D) AND RMA<=NMA,L,H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1) AND H=HHV(H,D) AND RMA>=NMA,H,0),COLOR0000BB,LINETHICK2;
 DOWN:DRAWLINE(H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1) AND H=HHV(H,D) AND RMA>=NMA,H,L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1) AND L=LLV(L,D) AND RMA<=NMA,L,0),COLOR00BB00,LINETHICK2;

{箱体}
箱顶:REFDATE(REF(HHV(H,96),5),DATE),LINETHICK1,COLORLIBLUE;
箱低:REFDATE(REF(LLV(L,96),5),DATE),LINETHICK2,COLOR00FF00;
箱腰:((箱顶)+(箱低))/2,LINETHICK1,COLORLIGREEN;

{主力控盘度: 无庄控盘(白色)-动力线上升(深灰色)-开始控盘(红色)-高度控盘(粉色)-主力出货(绿色)}
控盘V1:=EMA(EMA(CLOSE,9),9);
控盘V2:=100*WINNER(CLOSE*0.95);
控盘:=(控盘V1-REF(控盘V1,1))/REF(控盘V1,1)*1000;
 {专吸庄血修改说明:绿柱前有两条以上白柱的买入更可靠。}
N:=9;
短线:=4*SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1)-
3*SMA(SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1),3,1),COLORGREEN,LINETHICK2;
 {通达信超级组合抄底逃顶王公式}
动力线:=EMA((CLOSE-LLV(LOW,10))/(HHV(HIGH,25)-LLV(LOW,10))*4,4),COLORA8A8A8,LINETHICK2;
 IF((短线>=REF(短线,1)) AND (动力线>REF(动力线,1)),箱低,DRAWNULL),LINETHICK2,COLORGRAY;
 IF(((控盘>REF(控盘,1) AND 控盘>0) OR((情报>=REF(情报,1)) AND ((红军>=REF(红军,1)) OR 绿军<REF(绿军,1)))OR(控盘V2>50 AND COST(85)<CLOSE AND 控盘>0)),箱低,DRAWNULL),LINETHICK2,COLORRED;
 IF(控盘<REF(控盘,1) AND 控盘>0,箱低,DRAWNULL),LINETHICK2,COLORGREEN;

79500601.jpg

79500601.jpg

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则