同花顺自动百分箱体指标公式源码是什么?
2016-4-27 16:51:03 股票入门 http://rumen.southmoney.com
同花顺自动百分箱体指标公式源码是什么?附:买卖公式源码 主图买卖指标 南方财富网小编为您提供
【同花顺自动百分箱体指标公式源码】
input:k(1,1,3,1);
hh:= SYSPARAM(4);
ll:= SYSPARAM(5);
HL:=hh-ll;
wH := BARSlast(H=hh);
wL :=BARSlast(L=ll);
KK := wH-wL;
a1 :=if(kk<0,hh- HL*0.25,ll+HL*0.25);
a2 :=if(kk<0,hh- HL*0.75,ll+HL*0.75);
a3 :=if(kk<0,hh- HL*0.3125,ll+HL*0.3125);
mHL:= hh-HL*0.5;b1:=if(kk<0,hh- HL*0.125,ll+HL*0.125);b2:=if(kk<0,hh- HL*0.0625,ll+HL*0.0625);b3:=if(kk<0,hh- HL*0.375,ll+HL*0.375);b4:=if(kk<0,hh- HL*0.625,ll+HL*0.625);
b5:=if(kk<0,hh- HL*0.1875,ll+HL*0.1875);b6:=if(kk<0,hh- HL*0.875,ll+HL*0.875);b7:=if(kk<0,hh- HL*0.4375,ll+HL*0.4375);b8:=if(kk<0,hh- HL*0.5625,ll+HL*0.5625);
TIPTEXT(ISNULL(REFX(&CLOSE,1)),0),colorred;
TIPTEXT(ISNULL(REF(CLOSE,1)),0,'');
b9:=if(kk<0,hh- HL*0.6875,ll+HL*0.6875);b10:=if(kk<0,hh- HL*0.9375,ll+HL*0.9375);b11:=if(kk<0,hh- HL*0.8125,ll+HL*0.8125);A := islastbar;
DRAWTEXT(A and K<>3,HH, '最高价:'+NUMTOSTR(HH,2)),ALIGN2,colorred;DRAWTEXT(A and K<>3,LL, '最低价:'+NUMTOSTR(ll,2)),ALIGN2,,COLORCYAN;
DRAWTEXT(A and K<>3,mHL,'50%:'+NUMTOSTR(mHL,2)),ALIGN2,coloryellow;DRAWTEXT(A and K=1, a1, '25%:'+NUMTOSTR(a1,2)),ALIGN2,coloryellow;
DRAWTEXT(A and K=1, a2, '75%:'+NUMTOSTR(a2,2)),ALIGN2,colorgreen;DRAWTEXT(A and K=1, a3, '31.25%:'+NUMTOSTR(a3,3)),ALIGN2,COLORGRAY;
DRAWTEXT(A and K=1, b1, '12.5%:'+NUMTOSTR(b1,2)),ALIGN2,COLORGRAY;DRAWTEXT(A and K=1, b2, '6.25%:'+NUMTOSTR(b2,2)),ALIGN0,COLORGRAY;
DRAWTEXT(A and K=1, b3, '37.5%:'+NUMTOSTR(b3,2)),ALIGN2,COLORGRAY;DRAWTEXT(A and K=1, b4, '62.5%:'+NUMTOSTR(b4,2)),ALIGN2,COLORGRAY;
DRAWTEXT(A and K=1, b5, '18.75%:'+NUMTOSTR(b5,3)),ALIGN2,COLORGRAY;DRAWTEXT(A and K=1, b6, '87.5%:'+NUMTOSTR(b6,2)),ALIGN2,COLORGRAY;
DRAWTEXT(A and K=1, b7, '43.75%:'+NUMTOSTR(b7,2)),ALIGN2,COLORGRAY;DRAWTEXT(A and K=1, b8, '56.25%:'+NUMTOSTR(b8,2)),ALIGN2,COLORGRAY;
DRAWTEXT(A and K=1, b9, '68.75%:'+NUMTOSTR(b9,2)),ALIGN2,COLORGRAY;DRAWTEXT(A and K=1, b10, ' 93.75%:'+NUMTOSTR(b10,2)),ALIGN2,COLORGRAY;
DRAWTEXT(A and K=1, b11, ' 81.25:'+NUMTOSTR(b11,2)),ALIGN2,COLORGRAY;
DRAWTEXT(A and K=1, b7, '- - - - - - - - - - - - - - - - - -'),ALIGN2,COLORGRAY,linethick7;
DRAWTEXT(A and K=1, b8, '- - - - - - - - - - - - - - - - - -'),ALIGN2,COLORGRAY,linethick7;
DRAWTEXT(A and K=1, b9, '- - - - - - - - - - - - - - - - - -'),ALIGN2,COLORGRAY,linethick7;
DRAWTEXT(A and K=1, b10, '- - - - - - - - - - - - - - - - - -'),ALIGN2,COLORGRAY,linethick7;
DRAWTEXT(A and K=1, b11, '- - - - - - - - - - - - - - - - - -'),ALIGN2,COLORGRAY,linethick7;
DRAWTEXT(A and K<>3,HH, ' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),ALIGN2,colorred,linethick7;
DRAWTEXT(A and K<>3,LL, '--------------------------------------------------------------------------------------------------------------------------------------------------'),ALIGN2,COLORCYAN,linethick7;
DRAWTEXT(A and K<>3,mHL,'-------------------------------------------------------------------------------------------------------------'),ALIGN2,coloryellow,linethick7;
DRAWTEXT(A and K=1, a1, '--------------------------------------------------------------------------------------------------------------'),ALIGN2,COLORMAGENTA,linethick7;
DRAWTEXT(A and K=1, a2, '--------------------------------------------------------------------------------------------------------------'),ALIGN2,colorgreen,linethick7;
DRAWTEXT(A and K=1, a3, '- - - - - - - - - - - - - - - - - -'),ALIGN2,COLORGRAY,linethick7;
DRAWTEXT(A and K=1, b1, '-------------------------------------------------------------------'),ALIGN2,COLORGRAY,linethick7;
DRAWTEXT(A and K=1, b2, '- - - - - - - - - - - - - - - - - -'),ALIGN2,COLORGRAY,linethick7;
DRAWTEXT(A and K=1, b3, '-----------------------------------------------------------------------------------'),ALIGN2,COLORGRAY,linethick7;
DRAWTEXT(A and K=1, b4, '-----------------------------------------------------------------------------------'),ALIGN2,COLORGRAY,linethick7;
DRAWTEXT(A and K=1, b5, '- - - - - - - - - - - - - - - - - -'),ALIGN2,COLORGRAY,linethick7;
DRAWTEXT(A and K=1, b6, '----------------------------------------------------------------------------------'),ALIGN2,COLORGRAY,linethick7;
附:【买卖公式源码 主图买卖指标】
主图指标买卖公式源码 主图买卖指标
MA1:MA(CLOSE,M1);
MA2:MA(CLOSE,M2);
MA3:MA(CLOSE,M3);
MA4:MA(CLOSE,M4);
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);
m1 1 100 5
m2 1 100 10
m3 1 100 30
m4 1 100 60
主图买卖指标
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
买1:=VAR10;
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
B:IF(买1>0 OR 买2>0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;
DRAWTEXT(买1>0 OR 买2>0,LOW*0.99,'买入'),COLORRED;
S:IF(卖1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;
DRAWTEXT(卖1>0,HIGH*1.02,'卖出'),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));
F:IF(CROSS(VAR200,MA(VAR300,5)),LOW * 0.98,DRAWNULL),CROSSDOT,LINETHICK3,COLOREE00EE;
年:MA(CLOSE,22),LINETHICK2,COLORWHITE;
更多同花顺指标公式相关资讯请关注南方财富网
股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。