这个公式是我前段时间偶尔看到一个预测压力位方法的视频,按其要求写出来的,在使用中感觉还是有一定的参考价值,在“双节”来临之际,作为薄礼送给大家,以此祝贺论坛上所有朋友们“双节”快乐,万事顺意!
公式的使用方法:使用方法,将光标移至所预测底部的前高点位置,公式能自动寻找最低点的。此公式只是一种预测,在实际使用中只能作为分析的参考,不要直接指导操作!
C/C++ Code复制内容到剪贴板
- {【压力预测线】}
- 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.0809);
- x2:=最低*(1+0.1618);
- x3:=x2*(1+0.0809);
- x4:=x2*(1+0.1618);
- x5:=x4*(1+0.0809);
- x6:=x4*(1+0.1618);
- x7:=x6*(1+0.0809);
- x8:=x6*(1+0.1618);
- DRAWLINE(低点,最低, ISLASTBAR,REF(最低,1),0),Color939300,LINEDOT;
- DRAWLINE(低点,x1,ISLASTBAR,REF(x1,1),0),Color008080,LINEDOT;
- DRAWLINE(低点,x2,ISLASTBAR,REF(x2,1),0),Color939300,LINEDOT;
- DRAWLINE(低点,x3,ISLASTBAR,REF(x3,1),0),Color008080,LINEDOT;
- DRAWLINE(低点,x4,ISLASTBAR,REF(x4,1),0),Color939300,LINEDOT;
- DRAWLINE(低点,x5,ISLASTBAR,REF(x5,1),0),Color008080,LINEDOT;
- DRAWLINE(低点,x6,ISLASTBAR,REF(x6,1),0),Color939300,LINEDOT;
- DRAWLINE(低点,x7,ISLASTBAR,REF(x7,1),0),Color008080,LINEDOT;
- DRAWLINE(低点,x8,ISLASTBAR,REF(x8,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)),' 0.5阶:'+NUMTOSTR(x1,2)+'元'),ALIGN1,Color838383,PXUP35;
- DRAWTEXT(低点,REF(x2*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 1.0阶:'+NUMTOSTR(x2,2)+'元'),ALIGN1,Color838383,PXUP35;
- DRAWTEXT(低点,REF(x3*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 1.5阶:'+NUMTOSTR(x3,2)+'元'),ALIGN1,Color838383,PXUP35;
- DRAWTEXT(低点,REF(x4*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 2.0阶:'+NUMTOSTR(x4,2)+'元'),ALIGN1,Color838383,PXUP35;
- DRAWTEXT(低点,REF(x5*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 2.5阶:'+NUMTOSTR(x5,2)+'元'),ALIGN1,Color838383,PXUP35;
- DRAWTEXT(低点,REF(x6*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 3.0阶:'+NUMTOSTR(x6,2)+'元'),ALIGN1,Color838383,PXUP35;
- DRAWTEXT(低点,REF(x7*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 3.5阶:'+NUMTOSTR(x7,2)+'元'),ALIGN1,Color838383,PXUP35;
- DRAWTEXT(低点,REF(x8*0.996,BARSLAST(BARSCOUNT(C)=AB)),' 4.0阶:'+NUMTOSTR(x8,2)+'元'),ALIGN1,Color838383,PXUP35;
- {使用方法,用光标移至所预测底部的前高点位置,公式能自动寻找最低点的。}