C/C++ www.gszb.com 股票公式指标网提供 Code复制内容到剪贴板
- a:="STSFunc@CALSTSL";
- R1:="STSFunc@STS_RISK1";
- R2:="STSFunc@STS_RISK2";
- S1:="STSFunc@STS_STS1";
- S2:="STSFunc@STS_STS2";
- TBS:="STSFunc@STS_STSBS";
- DN:="STSFunc@STS_STSDN";
- UP:="STSFunc@STS_STSUP";
-
- 压力位:UP,linethick0,color0000ff,PRECIS2;
- 支撑位:DN,linethick0,color00ff00,PRECIS2;
- 警示位:IF(R1<>0,ABS(R1),IF(R2<>0,ABS(R2),0)),linethick0,colorff00ff,PRECIS2;
- MA5:MA(CLOSE,5),colorFFFFff,PRECIS2;
- MA10:MA(CLOSE,10),color00FFff,PRECIS2;
-
- DRAWLINE(UP>0,UP,UP<>REF(UP,1) OR C=DYNAINFO(7),REF(ABS(UP),1),0),dotline,color0000ff,LINETHICK1;
- DRAWLINE(DN>0,DN,DN<>REF(DN,1) OR C=DYNAINFO(7),REF(ABS(DN),1),0),dotline,color00ff00,LINETHICK1;
- DRAWLINE(UP<0,-UP,UP<>REF(UP,1) OR C=DYNAINFO(7),REF(ABS(UP),1),0),color0000ff;
- DRAWLINE(DN<0,-DN,DN<>REF(DN,1) OR C=DYNAINFO(7),REF(ABS(DN),1),0),color00ff00;
- DRAWLINE(R1>0,R1,R1<>REF(R1,1) OR C=DYNAINFO(7),REF(ABS(R1),1),0),dotline,colorEE88ff;
- DRAWLINE(R2>0,R2,R2<>REF(R2,1) OR C=DYNAINFO(7),REF(ABS(R2),1),0),dotline,colorEE88ff;
- DRAWLINE(R1<0,-R1,R1<>REF(R1,1) OR C=DYNAINFO(7),REF(ABS(R1),1),0),colorEE88ff;
- DRAWLINE(R2<0,-R2,R2<>REF(R2,1) OR C=DYNAINFO(7),REF(ABS(R2),1),0),colorEE88ff;
-
- drawbmp(TBS=1,l*0.96,'STSbuy1.bmp'),align1,valign0;
- drawbmp(TBS=-1,h*1.07,'STSsell1.bmp'),align1,valign0;
- drawbmp(S2=14,l*0.94,'STSbuy.bmp'),align1,valign0;
- drawbmp(S2=-14,h*1.09,'STSsell.bmp'),align1,valign0;
-
- drawtext(S1>0,L,STR(S1)),color00FF00,LINETHICK1,align1,valign0;
- drawtext(S1<0,H*1.03,STR(-S1)),color00FF00,LINETHICK1,align1,valign0;
- drawtext(S2>0 and S2<13,l*0.97,STR(S2)),color0000FF,LINETHICK1,align1,valign0;
- drawtext(S2<0 and S2>-13,H*1.06,STR(-S2)),color0000FF,LINETHICK1,align1,valign0;
- drawtext(S2=13,l*0.97,'+'),color0000FF,LINETHICK1,align1,valign0;
- drawtext(S2=14,l*0.97,'13'),color0000FF,LINETHICK1,align1,valign0;
- drawtext(S2=-13,h*1.06,'+'),color0000FF,LINETHICK1,align1,valign0;
- drawtext(S2=-14,h*1.06,'13'),color0000FF,LINETHICK1,align1,valign0;
-
- b:="LTFunc6@FORLT2";
- s11:="LTFunc6@LT_S1";
- hs:="LTFunc6@LT_HS";
- ls:="LTFunc6@LT_LS";
- p1:="LTFunc6@LT_P1";
- upp:="LTFunc6@LT_UPP";
- udd:="LTFunc6@LT_UDD";
-
- d1:=ema(abs("ddx.ddx"),60);
- d2:=max("ddx.ddx"/d1+7.5,7.5);
- d3:=min("ddx.ddx"/d1,10);
- fb:=if(s11=0,hs,ls);
- tr0:=ifs(p1=1,'明日收盘价<'+numtostrn(udd,2)+',出现S点\n','若明日收盘价> '+numtostrn(upp,2)+',出现B点\n');
- tr1:=ifs(s11=1,'明日收盘价<'+numtostrn(ls,2)+',短线卖出机会','若明日收盘价> '+numtostrn(hs,2)+'短线买入机会');
- tr2:=ifs(p1=1,ifs(cross(p1,0),'B点','持股'),ifs(cross(1,p1),'S点','持币'));
- tr3:=ifs(s11=0,'向下,','向上,');
- tr4:='3.能量级别:'+numtostrn(d3,1)+'级';
-
- bs:='<*t=0092F7*><*c=FFFFFF*><*p=95*>'+datestr(date)+' 买卖点决策系统提示\n'+'<*t=E7FFFF*><*c=000000*><*p=95*>'+'1.BS 点:'+tr2+','+tr0+'<*t=E7FFFF*><*c=000000*><*p=95*>'+'2. 短线:'+tr3+tr1+'\n'+'<*t=E7FFFF*><*c=000000*><*p=95*> '+tr4;
- drawflagtext(1,fb,bs);
-
- STICKLINE(p1=1 and c>=o and o<>0,c,o,d2,0),color5454ff;
- STICKLINE(p1=1 and c>=o and o<>0,c,o,7.5,0),colorblack;
- STICKLINE(p1=1 and c>=o and o<>0,c,c,7.5,0),color5454ff;
- STICKLINE(p1=1 and c>=o and o<>0,o,o,7.5,0),color5454ff;
- STICKLINE(p1=1 and c>=o and o<>0,o,c,7.5,1),color5454ff;
- STICKLINE(p1=1 and c<=o,o,c,7.5,1),color5454ff;
- STICKLINE(p1=1 and c<=o,l,c,0.5,1),color5454ff;
- STICKLINE(p1=1 and c<=o,h,o,0.5,1),color5454ff;
-
- STICKLINE((p1<>1 or barscount(c)<3) and c>=o,c,o,7.5,1),colorffff54;
- STICKLINE((p1<>1 or barscount(c)<3) and c>=o,c,h,0.5,1),colorffff54;
- STICKLINE((p1<>1 or barscount(c)<3) and c>=o,l,o,0.5,1),colorffff54;
-
- drawbmp(p1=1 and ref(p1,1)=0,l,'buy1.bmp'),align1,valign0;
- drawbmp(p1=0 and ref(p1,1)=1,h,'sell1.bmp'),align1,valign2;
-
- drawbmp(s11=1 and ref(s11,1)=0 and (p1+ref(p1,1))<>1,l,'bs.bmp'),align1,valign0;
- drawbmp(s11=0 and ref(s11,1)=1 and (p1+ref(p1,1))<>1,h,'ss.bmp'),align1,valign2;
-
- zg8:=FINANCE2(35);{总股}
- lta8:=FINANCE2(36);{流通A}
- sy8:=FINANCE2(3);{收益}
- sl8:=DYNAINFO(39);{市盈率}
- wf8:=FINANCE2(8);{未分}
- gj8:=FINANCE2(7);{公积};
- jz8:=FINANCE2(4);{净资}
- cw8:='总股:'+zg8+' 流通A:'+lta8+' 收益:'+sy8+' 市盈率:'+sl8+' 未分:'+wf8+' 公积:'+gj8+' 净资:'+jz8;
- DRAWTEXTREL(20,10,BKNAME),Coloryellow;
- DRAWTEXTREL(20,60,cw8),COLORAAEEEE;
-
-
- I1:=0;
- flag1:=0;
- while I1<BARSLAST(DISPSTATUS=1)-BARSLAST(DISPSTATUS=2)
- DO
- IF REF(H,I1)<REF(L,I1+1) AND REF(L,I1+1)>HHV(H,I1+1)
- THEN BEGIN FLAG1:=1;
- S1:=I1;
- I1:=BARSLAST(DISPSTATUS=1);
- END
- ELSE I1:=I1+1;
- STICKLINE(FLAG1,REF(L,S1+1),HHV(H,S1+1),(s1+1)*20,0),ColorC0C0C0,ALIGN1,LAYER7;
- DRAWTEXT(flag1,REF(L,s1+1),NUMTOSTRN(ref(h,s1+1),2)+'-'+NUMTOSTRN(hhV(h,S1+1),2)),ALIGN2,COLORgreen;
-
- I:=0;
- flag:=0;
- while I<BARSLAST(DISPSTATUS=1)-BARSLAST(DISPSTATUS=2)
- DO
- IF REF(L,I)>REF(H,I+1) AND REF(H,I+1)<LLV(LOW,I+1)
- THEN BEGIN FLAG:=1;
- S:=I;
- I:=BARSLAST(DISPSTATUS=1);
- END
- ELSE I:=I+1;
- STICKLINE(FLAG,REF(h,S+1),LLV(LOW,S+1),20*(s+1),500),ColorC0C0C0,ALIGN1,LAYER7;
- DRAWTEXT(FLAG,REF(H,s+1),NUMTOSTRN(ref(h,s+1),2)+'-'+NUMTOSTRN(LLV(LOW,S+1),2)),ALIGN2,COLORgreen;