炒股学会管理仓位很重要,半仓操作(通达信公式 主图指标公式 公式、源码 测试图)虎哥优化主图指标公式[通达信公式]
相关标签:
抄月殳学会管理仓位很重要,半仓操作
M:=6;{关键位预测}买线:=EMA(C,2);卖线:=EMA(SLOPE(C,13)*21+C,49);预测:IF(买线<卖线,REFDATE(HHV(H,34),DATE)-(REFDATE(HHV(H,34),DATE)-REFDATE(LLV(L,34),DATE))*(1-0.236),REFDATE(LLV(L,34),DATE)+(REFDATE(HHV(H,34),DATE)-REFDATE(LLV(L,34),DATE))*(1-0.236)),COLORYELLOW,NODRAW;HUGO:=IF(买线>卖线,REFDATE(LLV(L,34),DATE)+(REFDATE(HHV(H,34),DATE)-REFDATE(LLV(L,34),DATE))*(1-0.236),DRAWNULL),COLORRED;{半仓操作判断}D顶:REFDATE(HHV(H,34),DATE),COLORMAGENTA;D底:REFDATE(LLV(L,34),DATE),COLORLIBLUE;机构买入:=L2_AMO(0,2)/100000000.0,NODRAW;机构卖出:=-L2_AMO(0,3)/100000000.0,NODRAW;机构净买:=机构买入+机构卖出,NODRAW;累计:=EMA(机构净买,50)*60,NODRAW;均值:=EMA(累计,MIN(10,10)),NODRAW;STICKLINE(累计>0,D顶,D底,6,0),COLOR1B0E8B;STICKLINE(累计<0,D顶,D底,6,0),COLOR6B6B12;{持股持币判断}DRAWBAND(MA(DKX,M),RGB(10,100,10),DKX,RGB(180,10,10));持股:IF(DKX>=MA(DKX,M),1,DRAWNULL),COLORRED,NODRAW;持币:IF(DKX<MA(DKX,M),1,DRAWNULL),COLOR00FF00,NODRAW;阻二:(D顶+(D顶+(D顶+D底)/2)/2)/2,COLOR00BB00,DOTLINE;阻一:(D顶+(D顶+D底)/2)/2,COLOR00BB00,DOTLINE;中线:(D顶+D底)/2,COLORDD99DD,DOTLINE;撑一:(D底+中线)/2,COLOR00BB00,DOTLINE;撑二:(D底+撑一)/2,COLOR33BB33,DOTLINE;{立柱量判断}均价1:=(3*C+H+L+O)/6;cxh1AA:=(8*均价1+7*REF(均价1,1)+6*REF(均价1,2)+5*REF(均价1,3)+4*REF(均价1,4)+3*REF(均价1,5)+2*REF(均价1,6)+REF(均价1,8))/36;cxh2A:=(LLV(cxh1AA,2)+LLV(cxh1AA,4)+LLV(cxh1AA,6))/3;TJ1:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND C>cxh1AA;立桩量:=FILTER(TJ1,5);TJ2:=IF(BARSLAST(立桩量)=1 AND C>REF(H,1),1,IF(BARSLAST(立桩量)=2 AND C>REF(H,2),1,IF(BARSLAST(立桩量)=3 AND C>REF(H,3),1,0)));突破:=TJ2=1;TJ3:=IF(BARSLAST(立桩量)=1 AND C>REF(L,1),1,IF(BARSLAST(立桩量)=2 AND C>REF(L,2),1,IF(BARSLAST(立桩量)=3 AND C>REF(L,3),1,0)));三天法则:=TJ3=1;成立:=三天法则 AND 突破;条件成立:=FILTER(成立,3),COLORF0099F,NODRAW;STICKLINE(立桩量>=1,L,H,8,0),COLORF0099F;STICKLINE(C,REF(H,BARSLAST(立桩量)),REF(H,BARSLAST(立桩量)),3,-1),COLORCYAN;STICKLINE(C,REF(L,BARSLAST(立桩量)),REF(L,BARSLAST(立桩量)),3,-1),COLORYELLOW;DRAWTEXT(条件成立,L*0.995,'成立'),COLORMAGENTA;{主升浪判断}A101:=EMA(CLOSE,5)>EMA(CLOSE,6) AND EMA(CLOSE,6)>EMA(CLOSE,7) AND EMA(CLOSE,7)>EMA(CLOSE,8) AND EMA(CLOSE,8)>EMA(CLOSE,9) AND EMA(CLOSE,9)>EMA(CLOSE,10) AND EMA(CLOSE,10)>EMA(CLOSE,11) AND EMA(CLOSE,11)>EMA(CLOSE,12) AND EMA(CLOSE,12)>EMA(CLOSE,13) {AND EMA(CLOSE,13)>EMA(CLOSE,14) AND EMA(CLOSE,14)>EMA(CLOSE,15)};A102:=EMA(CLOSE,15){EMA(CLOSE,15)}>EMA(CLOSE,21) AND EMA(CLOSE,21)>EMA(CLOSE,34) AND EMA(CLOSE,34)>EMA(CLOSE,55) AND EMA(CLOSE,55)>EMA(CLOSE,89) AND EMA(CLOSE,89)>EMA(CLOSE,144) AND EMA(CLOSE,144)>EMA(CLOSE,233);A1:= A101 AND A102;短升:IF(A101,1,DRAWNULL),COLORFF00FF,NODRAW;中升:IF(A1,1,DRAWNULL),COLORRED,NODRAW;STICKLINE(A101,L,H,6,0),COLOR006666;STICKLINE(A101 AND A102,L,H,4,0),COLOR660066;{K线图}DRAWKLINE(H,O,L,C);{30日量能评台}T1:=CONST(HHVBARS(V,30));量30:IF(CURRBARSCOUNT<=30+7,CONST(IF(T1=0,C,REF(C,T1))),DRAWNULL),COLORYELLOW;{均线}MA5:MA(C,5),COLORFFFFFF,LINETHICK2;MA13:=MA(C,13),COLORWHITE,LINETHICK1;MA21:=MA(C,21),COLOREE00EE,LINETHICK2;MA34:=MA(C,34),COLOR00DDDD,LINETHICK1;MA55:=MA(C,55),COLOR00FFFF,LINETHICK2;操盘:DKX,COLOR00FF00,LINETHICK3; IF(MA5>=REF(MA5,1),MA5,DRAWNULL),COLORFF00FF,LINETHICK2; IF(DKX>REF(DKX,1),DKX,DRAWNULL),COLORFF00FF,LINETHICK3;{多空买卖判断}cxh1:=((CLOSE > REF(CLOSE,1)) AND (CLOSE > REF(CLOSE,2)));cxh2:=((REF(cxh1,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));cxh3:=((REF(cxh2,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));cxh4:=((REF(cxh3,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));cxh5:=((REF(cxh4,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));cxh6:=((REF(cxh5,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));cxh7:=((REF(cxh6,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));cxh8:=((REF(cxh7,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));cxh9:=((REF(cxh8,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));cxhA:=((REF(cxh9,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));cxhB:=((REF(cxhA,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));cxhC:=((REF(cxhB,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));多:=(((((((((((cxh1 OR cxh2) OR cxh3) OR cxh4) OR cxh5) OR cxh6) OR cxh7) OR cxh8) OR cxh9) OR cxhA) OR cxhB) OR cxhC);STICKLINE(多,L,H,0,0),COLOR0000FF;STICKLINE(多 AND C>=O,C,O{REF(C,1)},3,1),COLOR0000FF;STICKLINE(多 AND C<O,C,O{REF(C,1)},3,0),COLOR0000FF;cxhD:=((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,2)));cxhE:=((REF(cxhD,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));cxhF:=((REF(cxhE,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));cxh10:=((REF(cxhF,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));cxh11:=((REF(cxh10,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));cxh12:=((REF(cxh11,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));cxh13:=((REF(cxh12,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));cxh14:=((REF(cxh13,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));cxh15:=((REF(cxh14,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));cxh16:=((REF(cxh15,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));cxh17:=((REF(cxh16,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));cxh18:=((REF(cxh17,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));空:=(((((((((((cxhD OR cxhE) OR cxhF) OR cxh10) OR cxh11) OR cxh12) OR cxh13) OR cxh14) OR cxh15) OR cxh16) OR cxh17) OR cxh18);STICKLINE(空,H,L,0 ,0 ),COLOR00FF00;STICKLINE(空 AND C>=O,C,O{REF(C,1)},3,1),COLOR00FF00;STICKLINE(空 AND C<O,C,O{REF(C,1)},3,0),COLOR00FF00;cxh19:=(REF((((((((((((cxhD OR cxhE) OR cxhF) OR cxh10) OR cxh11) OR cxh12) OR cxh13) OR cxh14) OR cxh15) OR cxh16) OR cxh17) OR cxh18),1) AND cxh1);cxh1A:=(REF((((((((((((cxh1 OR cxh2) OR cxh3) OR cxh4) OR cxh5) OR cxh6) OR cxh7) OR cxh8) OR cxh9) OR cxhA) OR cxhB) OR cxhC),1) AND cxhD);STICKLINE(cxh19,REF(CLOSE,1),REF(CLOSE,2),3,0 ),COLORDDDDDD;
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容