您现在的位置:程序化交易>> 股票公式>> 大智慧>> 大智慧公式>>正文内容

好美主图指标公式[大智慧公式]

相关标签:

 

好美主图

 

 

原理解析:


 

 来源:程序化99( WWW.CXH99.COM )

源码:

 

 

 


DRAWGBK( EMA((EMA(CLOSE,4)+EMA(CLOSE,7)+EMA(CLOSE,14)+EMA(CLOSE,18))/4,2)>REF(EMA((EMA(CLOSE,4)+EMA(CLOSE,7)+EMA(CLOSE,14)+EMA(CLOSE,18))/4,2),1),strip(RGB(220,0,0) ,RGB(40,0,0),2));
DRAWGBK( EMA((EMA(CLOSE,4)+EMA(CLOSE,7)+EMA(CLOSE,14)+EMA(CLOSE,18))/4,2)<REF(EMA((EMA(CLOSE,4)+EMA(CLOSE,7)+EMA(CLOSE,14)+EMA(CLOSE,18))/4,2),1),strip(RGB(0,220,100) ,RGB(0,50,20),2));

{操盘手BS}

买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
BU:=cross(买线,卖线);
SEL:=cross(卖线,买线);
drawtext(bu,LOW,'B'),ALIGN1,VALIGN0,colorYELLOW,linethick2;
drawtext(sel,HIGH,'S'),ALIGN1,VALIGN2,colorFFFF00,linethick2;



MA5:ma(c,5),COLORRED,linethick2;
DD5:=MA5<REF(MA5,1);
PARTLINE(MA5,DD5),ColorFFFF00,linethick2;
x:=(3*c+l+o+h)/6;
多空线:(20*x+19*ref(x,1)+18*ref(x,2)+17*ref(x,3)+16*ref(x,4)+15*ref(x,5)+14*ref(x,6)
+13*ref(x,7)+12*ref(x,8)+11*ref(x,9)+10*ref(x,10)+9*ref(x,11)+8*ref(x,12)
+7*ref(x,13)+6*ref(x,14)+5*ref(x,15)+4*ref(x,16)+3*ref(x,17)+2*ref(x,18)+
ref(x,20))/210,coloryellow,linethick2;
DD:=多空线<REF(多空线,1);
PARTLINE(多空线,DD),colorblue,linethick5;
A:=(MA5>多空线);
PARTLINE(多空线,A),COLORYELLOW,POINTDOT;
A1:=(MA5<多空线);
PARTLINE(多空线,A1),COLORWHITE;


STICKLINE((C<=O),C,O,3,0),COLOR998855;
STICKLINE((C<=O),C,O,1.5,0),COLORBBAA77;
STICKLINE((C<=O),C,O,0.8,0),COLORDDCC99;
STICKLINE((C>=O),C,O,3,0),COLORRED;
STICKLINE((C>=O),C,O,1.5,0),COLORFF00FF;
STICKLINE((C>=O),C,O,0.8,0);



DRAWTEXTREL(820,680,'黄金卖点:'+NUMTOSTRN(EMA(c+(h-l)*0.618,3),2 )),LINETHICK2,coloryellow;
DRAWTEXTREL(820,620,'黄金买点:'+NUMTOSTRN(EMA((o+h+l)/3,4),2 )),LINETHICK2,coloryellow;
DRAWTEXTREL(820,750,'昨测今日买点:'+NUMTOSTRN(ref(EMA((o+h+l)/3,4)+((h+l)/2-ref((o+h+l)/3,3))/4,1),2 )),LINETHICK2,colorwhite;
DRAWTEXTREL(820,810,'昨测今日卖点:'+NUMTOSTRN(ref(EMA(c+(h-l)*0.618,3)+(EMA(c+(h-l)*0.618,3)-EMA((o+h+l)/3,4))*0.618,1),2 )),LINETHICK2,colorwhite;


CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2+O)/5;
E:=CDP;
zl:=2*E-REF(L,1);
zc:=2*E-REF(H,1);
fz:=E-(REF(H,1)-REF(L,1));
ZZ:=CDP+(REF(H,1)-REF(L,1));
drawtextabs(10,80,'低吸:'+ numtostrn(zc,3)),ColorFFFFFF;
drawtextabs(10,60,'中价:'+ numtostrn(E,3)),ColorFFFF10;
drawtextabs(10,40,'高抛:'+ numtostrn(zl,3)),COLORGREEN;
drawtextabs(10,20,'追涨:'+ numtostrn(ZZ,3)),Coloryellow;
drawtextabs(10,100,'杀跌:'+ numtostrn(fz,3)),ColorFF77FF;
STICKLINE(DISPSTATUS=2 ,zl,zl,50,9991),COLORGREEN;
STICKLINE(DISPSTATUS=2 ,zc,zc,50,9991),ColorFFFFFF;
STICKLINE(DISPSTATUS=2 ,E,E,50,9991),ColorFFFF10;
STICKLINE(DISPSTATUS=2 ,fz,fz,50,9991),ColorFF77FF;
STICKLINE(DISPSTATUS=2 ,ZZ,ZZ,50,9991),Coloryellow;


N:=20;
均价:=(3*C+H+L+O)/6;
VAR1:=(8*均价+7*REF(均价,1)+6*REF(均价,2)+5*REF(均价,3)+4*REF(均价,4)+3*REF(均价,5)+2*REF(均价,6)+REF(均价,8))/36;
VAR2:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
SZ1:=REF(VAR1,1)=REF(VAR2,1) AND VAR1>VAR2 AND CLOSE>VAR1;
SZ2:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1) AND H/VAR1<1.1 AND L>VAR2 AND CLOSE>VAR1;
SZ3:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>=REF(VAR2,1) AND H/VAR1>1.1;
SZ4:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1) AND CLOSE>VAR2 AND CLOSE<VAR1;
SZ5:=(VAR1>VAR2 AND VAR2>REF(VAR2,1) AND VAR1<>REF(VAR1,1) AND CLOSE<VAR2) OR (VAR1>VAR2 AND VAR1<REF(VAR1,1) AND VAR2<REF(VAR2,1) AND CLOSE<VAR2);;
SZ6:=REF(VAR1,1)>REF(VAR2,1) AND VAR1=VAR2 AND CLOSE<VAR2;
XD1:=VAR1=VAR2 AND CLOSE<VAR2 OR (VAR1<REF(VAR1,1) AND VAR2<REF(VAR2,1) AND REF(VAR1,1)=REF(VAR2,1) AND CLOSE<VAR2);
XD2:=VAR1=VAR2 AND CLOSE>VAR1;
SAT:=(AMOUNT/C)/(HHV(AMOUNT,N)/HHV(C,N));

量能饱和度:=IF(SAT>1,1,SAT)*100;
IF BARSTATUS=2 AND SZ1 THEN BEGIN
DRAWTEXTABS(320,25,'调整结束短线介入'),COLORRED;
END
ELSE
IF BARSTATUS=2 AND SZ2 THEN BEGIN
DRAWTEXTABS(320,25,'上升通道走势良好'),COLORRED;
END
ELSE
IF BARSTATUS=2 AND SZ3 THEN BEGIN
DRAWTEXTABS(320,25,'股价偏离注意调整'),COLORRED;
END
ELSE
IF BARSTATUS=2 AND SZ4 THEN BEGIN
DRAWTEXTABS(320,25,'上升通道调整洗盘'),COLORGREEN;
END
ELSE
IF BARSTATUS=2 AND SZ5 THEN BEGIN
DRAWTEXTABS(320,25,'转向特征注意离场'),COLORGREEN;
END
ELSE
IF BARSTATUS=2 AND SZ6 THEN BEGIN
DRAWTEXTABS(320,25,'通道改变坚决离场'),COLORGREEN;
END
ELSE
IF BARSTATUS=2 AND XD1 THEN BEGIN
DRAWTEXTABS(320,25,'下跌通道只宜观望'),COLORGREEN;
END
ELSE
IF BARSTATUS=2 AND XD2 THEN BEGIN
DRAWTEXTABS(320,25,'短期底部准备进入'),COLORYELLOW;
END;
AB1:=COST(0.33);
AB2:=COST(5);
AB3:=COST(15);
AB4:=COST(55);
AB5:=COST(97);

获利:=WINNER(CLOSE)*100;
套牢:=100-WINNER(CLOSE)*100;

DRAWTEXTABS(520,25,'建仓:'+NUMTOSTRN(AB2,2)),COLOR00FFFF;
DRAWTEXTABS(600,25,'快刀:'+NUMTOSTRN(AB3,2)),COLOR00FFFF;
DRAWTEXTABS(675,25,'升浪:'+NUMTOSTRN(AB4,2)),COLOR00FFFF;
DRAWTEXTABS(520,40,'获利:'+NUMTOSTRN(获利,2)+'%'),COLOR00FFFF;
DRAWTEXTABS(600,40,'套牢:'+NUMTOSTRN(套牢,2)+'%'),COLOR00FFFF;
DRAWTEXTABS(675,40,'预测:'+NUMTOSTRN(AB5,2)),COLOR00FFFF;

明日阻力:=2*E-LOW;
明日支撑:=2*E-HIGH;
明日突破:=E+(HIGH-LOW);
明日反转:=E-(HIGH-LOW);
今日阻力:=REF(明日阻力 , 1);
今日支撑:=REF(明日支撑 , 1);
DRAWTEXTREL(10,600,'今日阻力=:'+NUMTOSTRN(今日阻力,2 )+''),Color00FFFF;
DRAWTEXTREL(10,650,'今日支撑=:'+NUMTOSTRN(今日支撑,2 )+''),Color00FF00;
DRAWTEXTREL(10,700,'明日突破=:'+NUMTOSTRN(明日突破,2 )),ColorFF00FF;
DRAWTEXTREL(10,750,'明日阻力=:'+NUMTOSTRN(明日阻力,2 )),ColorFFFF00;
DRAWTEXTREL(10,800,'明日支撑=:'+NUMTOSTRN(明日支撑,2 )),COLORRED;
DRAWTEXTREL(10,850,'明日反转=:'+NUMTOSTRN(明日反转,2 )),COLORGREEN;

PT:= REF(HIGH,1)-REF(LOW,1);
重心:=(HIGH + LOW + CLOSE)/3;
压力Ⅰ:= 2*重心-LOW;
压力Ⅱ:= 重心 + PT;
支撑Ⅰ:= 2*重心-HIGH;
支撑Ⅱ:= 重心 - PT;
DRAWTEXTABS(100,13,'《逆势操作》'),ColorFFFF00;
DRAWTEXTABS(175,13,'重心:'+重心),Color208FFF;
DRAWTEXTABS(100,32,' 支撑'),ColorFFFFFF;
DRAWTEXTABS(100,49,' '+支撑Ⅰ),ColorFFFFFF;
DRAWTEXTABS(100,67,' '+支撑Ⅱ),ColorFFFFFF;
DRAWTEXTABS(100,32,' 压力'),Color00FF00;
DRAWTEXTABS(100,49,' '+压力Ⅰ),Color00FF00;
DRAWTEXTABS(100,67,' '+压力Ⅱ),Color00FF00;
DRAWTEXTABS(100,10,'│'),Color00FFFF;
DRAWTEXTABS(100,22,'│'),Color00FFFF;
DRAWTEXTABS(100,34,'│'),Color00FFFF;
DRAWTEXTABS(100,46,'│'),Color00FFFF;
DRAWTEXTABS(100,58,'│'),Color00FFFF;
DRAWTEXTABS(100,70,'│'),Color00FFFF;
DRAWTEXTABS(243,10,'│'),Color00FFFF;
DRAWTEXTABS(243,22,'│'),Color00FFFF;
DRAWTEXTABS(243,34,'│'),Color00FFFF;
DRAWTEXTABS(243,46,'│'),Color00FFFF;
DRAWTEXTABS(243,58,'│'),Color00FFFF;
DRAWTEXTABS(243,70,'│'),Color00FFFF;
DRAWTEXTABS(171,30,'│'),Color00FFFF;
DRAWTEXTABS(171,34,'│'),Color00FFFF;
DRAWTEXTABS(171,46,'│'),Color00FFFF;
DRAWTEXTABS(171,58,'│'),Color00FFFF;
DRAWTEXTABS(171,70,'│'),Color00FFFF;
DRAWTEXTABS(105,5,'────────────'),Color00FFFF;
DRAWTEXTABS(105,25,'────────────'),Color00FFFF;
DRAWTEXTABS(105,42,'────────────'),Color00FFFF;
DRAWTEXTABS(105,59,'────────────'),Color00FFFF;
DRAWTEXTABS(105,76,'────────────'),Color00FFFF;

{支撑}
VAR1111:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);
VAR2222:=CROSS(VAR1111,0.9);
VAR3333:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);
VAR4444:=CROSS(VAR3333,0.9);
压力: REF(HIGH,BARSLAST(Var2222)), POINTDOT,ColorEA91B5;
STICKLINE(CLOSE,REF(HIGH,BARSLAST(Var2222)),REF(HIGH,BARSLAST(Var2222)),5,0),ColorEA91B5;
支撑: REF(LOW,BARSLAST(Var4444)), POINTDOT,Color00b4ff,linethick3;
STICKLINE(CLOSE,REF(LOW,BARSLAST(Var4444)),REF(LOW,BARSLAST(Var4444)),5,0),Color00b4ff;

VAR3:=LLV(HIGH,240);
VAR4:=100*(CLOSE-VAR3)/VAR3;
VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
VAR7:=0;
VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
买1:=VAR10;
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
DRAWTEXT(买1>0 OR 买2>0,LOW*0.99,'←b'),CROSSDOT,LINETHICK1,Color00FFFF;
DRAWTEXT(卖1>0,HIGH*1.02,'←s'),CROSSDOT,LINETHICK1,COLORGREEN;
VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));

qc8:=ZIG(3,13);
买:DRAWTEXT((REF(qc8,2) > REF(qc8,1)) and (qc8 > REF(qc8,1)),LOW - (LOW)*(0.05),'买'),colorred;
卖:DRAWTEXT((REF(qc8,2) < REF(qc8,1)) and (qc8 < REF(qc8,1)),h*1.03{LOW - (LOW)*(0.03)},'卖'),Color66FF00;

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容