测量跌幅 测量涨幅

2011-02-17 09:13:00来源:本站整理浏览:136

今天翻看自己的指标库,看到短线游子的【压力预测】有意思,自己改了测量涨幅,不会编指标,但也喜欢动手
测量跌幅
DRAWGBK((CLOSE > 0),COLORRGB(0,0,0),COLORRGB(0,0,0),1);
KLINE(O,H,L,C,0);
AB:=SYSPARAM(1);
BB:=SYSPARAM(3);
D:=(BB - AB);
DA:=BACKSET(ISLASTBAR,HHVBARS(H,(D+1))+1);
高点:=COUNT(DA,(D+1))=1;{高点位置}
ll:=hhv(H,(D + 1));
最高:ll[BB],COLORred,LINETHICK0;
x1:=最高*(1-0.02);
x2:=最高*(1-0.04);
x3:= 最高*(1-0.06);
x4:= 最高*(1-0.08);
x5:= 最高*(1-0.10);
x6:= 最高*(1-0.12);
x7:= 最高*(1-0.14);
x8:= 最高*(1-0.16);
x9:=最高*(1-0.18);
x10:=最高*(1-0.20);
x11:= 最高*(1-0.22);
x12:= 最高*(1-0.24);
x13:= 最高*(1-0.26);
x14:= 最高*(1-0.28);
x15:= 最高*(1-0.30);
x16:= 最高*(1-0.32);
x17:=最高*(1-0.34);
x18:=最高*(1-0.36);
x19:= 最高*(1-0.38);
x20:= 最高*(1-0.40);
x21:= 最高*(1-0.42);
x22:= 最高*(1-0.44);
x23:= 最高*(1-0.46);
x24:= 最高*(1-0.48);

DRAWLINE(高点,最高, ISLASTBAR,REF(最高,1),0),Color939300,LINEDOT;
B1:DRAWLINE(高点,x1,ISLASTBAR,REF(x1,1),0),Color008080,LINEDOT;
B2:DRAWLINE(高点,x2,ISLASTBAR,REF(x2,1),0),Color939300,LINEDOT;
B3:DRAWLINE(高点,x3,ISLASTBAR,REF(x3,1),0),Color008080,LINEDOT;
B4:DRAWLINE(高点,x4,ISLASTBAR,REF(x4,1),0),Color939300,LINEDOT;
B5:DRAWLINE(高点,x5,ISLASTBAR,REF(x5,1),0),Color008080,LINEDOT;
B6:DRAWLINE(高点,x6,ISLASTBAR,REF(x6,1),0),Color939300,LINEDOT;
B7:DRAWLINE(高点,x7,ISLASTBAR,REF(x7,1),0),Color008080,LINEDOT;
B8:DRAWLINE(高点,x8,ISLASTBAR,REF(x8,1),0),Color939300,LINEDOT;
B9:DRAWLINE(高点,x9,ISLASTBAR,REF(x9,1),0),Color008080,LINEDOT;
B10:DRAWLINE(高点,x10,ISLASTBAR,REF(x10,1),0),Color939300,LINEDOT;
B11:DRAWLINE(高点,x11,ISLASTBAR,REF(x11,1),0),Color008080,LINEDOT;
B12:DRAWLINE(高点,x12,ISLASTBAR,REF(x12,1),0),Color939300,LINEDOT;
B13:DRAWLINE(高点,x13,ISLASTBAR,REF(x13,1),0),Color008080,LINEDOT;
B14:DRAWLINE(高点,x14,ISLASTBAR,REF(x14,1),0),Color939300,LINEDOT;
B15:DRAWLINE(高点,x15,ISLASTBAR,REF(x15,1),0),Color008080,LINEDOT;
B16:DRAWLINE(高点,x16,ISLASTBAR,REF(x16,1),0),Color939300,LINEDOT;
B17:DRAWLINE(高点,x17,ISLASTBAR,REF(x17,1),0),Color008080,LINEDOT;
B18:DRAWLINE(高点,x18,ISLASTBAR,REF(x18,1),0),Color939300,LINEDOT;
B19:DRAWLINE(高点,x19,ISLASTBAR,REF(x19,1),0),Color008080,LINEDOT;
B20:DRAWLINE(高点,x20,ISLASTBAR,REF(x20,1),0),Color939300,LINEDOT;
B21:DRAWLINE(高点,x21,ISLASTBAR,REF(x21,1),0),Color008080,LINEDOT;
B22:DRAWLINE(高点,x22,ISLASTBAR,REF(x22,1),0),Color939300,LINEDOT;
B23:DRAWLINE(高点,x23,ISLASTBAR,REF(x23,1),0),Color008080,LINEDOT;
B24:DRAWLINE(高点,x24,ISLASTBAR,REF(x24,1),0),Color939300,LINEDOT;
VERTLINE(高点),COLORRED,LINETHICK1;

DRAWTEXT(高点,REF(最高*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 最高价 '+NUMTOSTR(最高,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x1*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 2%:'+NUMTOSTR(x1,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x2*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 4%:'+NUMTOSTR(x2,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x3*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 6%:'+NUMTOSTR(x3,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x4*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 8%:'+NUMTOSTR(x4,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x5*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 10%:'+NUMTOSTR(x5,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x6*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 12%:'+NUMTOSTR(x6,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x7*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 14%:'+NUMTOSTR(x7,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x8*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 16%:'+NUMTOSTR(x8,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x9*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 18%:'+NUMTOSTR(x9,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x10*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 20%:'+NUMTOSTR(x10,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x11*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 22%:'+NUMTOSTR(x11,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x12*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 24%:'+NUMTOSTR(x12,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x13*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 26%:'+NUMTOSTR(x13,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x14*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 28%:'+NUMTOSTR(x14,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x15*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 30%:'+NUMTOSTR(x15,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x16*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 32%:'+NUMTOSTR(x16,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x17*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 34%:'+NUMTOSTR(x17,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x18*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 36%:'+NUMTOSTR(x18,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x19*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 38%:'+NUMTOSTR(x19,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x20*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 40%:'+NUMTOSTR(x20,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x21*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 42%:'+NUMTOSTR(x21,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x22*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 44%:'+NUMTOSTR(x22,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x23*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 46%:'+NUMTOSTR(x23,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(高点,REF(x24*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 48%:'+NUMTOSTR(x24,2)+'元'),ALIGN1,Color838383,PXUP35;

测量涨幅

{【压力预测线】}
DRAWGBK((CLOSE > 0),COLORRGB(0,0,0),COLORRGB(0,0,0),1);
KLINE(O,H,L,C,0);
AB:=SYSPARAM(1);
BB:=SYSPARAM(3);
D:=(BB - AB);
DA:=BACKSET(ISLASTBAR,LLVBARS(L,(D+1))+1);
低点:=COUNT(DA,(D+1))=1;{低点位置}
ll:=llv(L,(D + 1));
最低:ll[BB],COLORred,LINETHICK0;
x1:=最低*(1+0.02);
x2:=最低*(1+0.04);
x3:= 最低*(1+0.06);
x4:= 最低*(1+0.08);
x5:= 最低*(1+0.10);
x6:= 最低*(1+0.12);
x7:= 最低*(1+0.14);
x8:= 最低*(1+0.16);
x9:=最低*(1+0.18);
x10:=最低*(1+0.20);
x11:= 最低*(1+0.22);
x12:= 最低*(1+0.24);
x13:= 最低*(1+0.26);
x14:= 最低*(1+0.28);
x15:= 最低*(1+0.30);
x16:= 最低*(1+0.32);
x17:=最低*(1+0.34);
x18:=最低*(1+0.36);
x19:= 最低*(1+0.38);
x20:= 最低*(1+0.40);
x21:= 最低*(1+0.42);
x22:= 最低*(1+0.44);
x23:= 最低*(1+0.46);
x24:= 最低*(1+0.48);

DRAWLINE(低点,最低, ISLASTBAR,REF(最低,1),0),Color939300,LINEDOT;
B1:DRAWLINE(低点,x1,ISLASTBAR,REF(x1,1),0),Color008080,LINEDOT;
B2:DRAWLINE(低点,x2,ISLASTBAR,REF(x2,1),0),Color939300,LINEDOT;
B3:DRAWLINE(低点,x3,ISLASTBAR,REF(x3,1),0),Color008080,LINEDOT;
B4:DRAWLINE(低点,x4,ISLASTBAR,REF(x4,1),0),Color939300,LINEDOT;
B5:DRAWLINE(低点,x5,ISLASTBAR,REF(x5,1),0),Color008080,LINEDOT;
B6:DRAWLINE(低点,x6,ISLASTBAR,REF(x6,1),0),Color939300,LINEDOT;
B7:DRAWLINE(低点,x7,ISLASTBAR,REF(x7,1),0),Color008080,LINEDOT;
B8:DRAWLINE(低点,x8,ISLASTBAR,REF(x8,1),0),Color939300,LINEDOT;
B9:DRAWLINE(低点,x9,ISLASTBAR,REF(x9,1),0),Color008080,LINEDOT;
B10:DRAWLINE(低点,x10,ISLASTBAR,REF(x10,1),0),Color939300,LINEDOT;
B11:DRAWLINE(低点,x11,ISLASTBAR,REF(x11,1),0),Color008080,LINEDOT;
B12:DRAWLINE(低点,x12,ISLASTBAR,REF(x12,1),0),Color939300,LINEDOT;
B13:DRAWLINE(低点,x13,ISLASTBAR,REF(x13,1),0),Color008080,LINEDOT;
B14:DRAWLINE(低点,x14,ISLASTBAR,REF(x14,1),0),Color939300,LINEDOT;
B15:DRAWLINE(低点,x15,ISLASTBAR,REF(x15,1),0),Color008080,LINEDOT;
B16:DRAWLINE(低点,x16,ISLASTBAR,REF(x16,1),0),Color939300,LINEDOT;
B17:DRAWLINE(低点,x17,ISLASTBAR,REF(x17,1),0),Color008080,LINEDOT;
B18:DRAWLINE(低点,x18,ISLASTBAR,REF(x18,1),0),Color939300,LINEDOT;
B19:DRAWLINE(低点,x19,ISLASTBAR,REF(x19,1),0),Color008080,LINEDOT;
B20:DRAWLINE(低点,x20,ISLASTBAR,REF(x20,1),0),Color939300,LINEDOT;
B21:DRAWLINE(低点,x21,ISLASTBAR,REF(x21,1),0),Color008080,LINEDOT;
B22:DRAWLINE(低点,x22,ISLASTBAR,REF(x22,1),0),Color939300,LINEDOT;
B23:DRAWLINE(低点,x23,ISLASTBAR,REF(x23,1),0),Color008080,LINEDOT;
B24:DRAWLINE(低点,x24,ISLASTBAR,REF(x24,1),0),Color939300,LINEDOT;
VERTLINE(低点),COLORRED,LINETHICK1;

DRAWTEXT(低点,REF(最低*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 最低价 '+NUMTOSTR(最低,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x1*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 2%:'+NUMTOSTR(x1,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x2*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 4%:'+NUMTOSTR(x2,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x3*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 6%:'+NUMTOSTR(x3,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x4*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 8%:'+NUMTOSTR(x4,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x5*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 10%:'+NUMTOSTR(x5,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x6*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 12%:'+NUMTOSTR(x6,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x7*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 14%:'+NUMTOSTR(x7,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x8*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 16%:'+NUMTOSTR(x8,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x9*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 18%:'+NUMTOSTR(x9,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x10*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 20%:'+NUMTOSTR(x10,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x11*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 22%:'+NUMTOSTR(x11,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x12*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 24%:'+NUMTOSTR(x12,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x13*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 26%:'+NUMTOSTR(x13,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x14*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 28%:'+NUMTOSTR(x14,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x15*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 30%:'+NUMTOSTR(x15,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x16*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 32%:'+NUMTOSTR(x16,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x17*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 34%:'+NUMTOSTR(x17,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x18*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 36%:'+NUMTOSTR(x18,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x19*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 38%:'+NUMTOSTR(x19,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x20*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 40%:'+NUMTOSTR(x20,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x21*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 42%:'+NUMTOSTR(x21,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x22*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 44%:'+NUMTOSTR(x22,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x23*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 46%:'+NUMTOSTR(x23,2)+'元'),ALIGN1,Color838383,PXUP35;
DRAWTEXT(低点,REF(x24*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 48%:'+NUMTOSTR(x24,2)+'元'),ALIGN1,Color838383,PXUP35;
 

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式