N:=0;
{预测当天最低价公式}
A1:=REF(O,1);
A2:=ABS((REF(C,1)-A1)/A1);
A3:=ABS((REF(H,1)-A1)/A1);
A4:=ABS((REF(L,1)-A1)/A1);
B1:=ABS((A2+A3+A4)/3);
B2:=O*B1;
预测低一:O-B2,linethick0;
最低价:low,coloryellow,linethick0;
预测高一:=O+B2;
{预测当天股价公式}
开盘价1:=open;
开盘价2:=REF(open,1);
最高价1:=high;
最高价2:=REF(high,1);
最低价1:=low;
最低价2:=REF(low,1);
收盘价1:=CLOSE;
收盘价2:=REF(CLOSE,1);
AA:=最高价2;
BB:=最低价2;
CC:=开盘价2;
DD:=收盘价2;
EE:=(AA+BB+CC+2*DD)/5;
AAA:=EE+(AA-BB);
BBB:=2*EE-BB;
CCC:=2*EE-AA;
DDD:=EE-(AA-BB);
上升突破价:=AAA;
上升阻力价:=BBB;
下跌支撑价:=CCC;
下跌反转价:=DDD;
EEE:=(EE+上升突破价+上升阻力价+下跌支撑价+下跌反转价)/5;
心理价:=EEE;
FFF:=(EEE+开盘价1)/2;
GGG:=(预测低一+FFF)/2;
预测低二:GGG,colorffffff,LINETHICK0;
最高价:high,colorred,linethick0;
{预测今日最高价公式}
预测高二:=MA(REF(HIGH,1)/REF(CLOSE,2),N)*REF(CLOSE,1);
开盘价:open,colorffffff,linethick0;
收盘价:close,coloryellow,linethick0;
差额一:预测低一-low,colorffffff,LINETHICK0;
差额二:预测低二-low,colorffffff,LINETHICK0;
差比一:(差额一/low)*100,colorffffff,LINETHICK0;
差比二:(差额二/low)*100,colorffffff,LINETHICK0;
DRAWTEXTREL(10,60,’ ★ 今日最低价:’+NUMTOSTRN(low,2)+’元’),coloryellow,linethick1;
DRAWTEXTREL(10,200,’ 预测 预测低一: ‘+NUMTOSTRN(ref(预测低一,0),2)+’元’+’ 预测低二: ‘+NUMTOSTRN(ref(ggg,0),2)+’元’),colorffffff,linethick1;
DRAWTEXTREL(10,350,’目前差价 ‘+NUMTOSTRN(ref(差额一,0),2)+’元 ‘+ NUMTOSTRN(ref(差额二,0),2)+’元’),coloryellow,linethick1;
DRAWTEXTREL(10,470,’目前差比 ‘+NUMTOSTRN(ref(差比一,0),2)+’% ‘+ NUMTOSTRN(ref(差比二,0),2)+’%’),coloryellow,linethick1;
DRAWTEXTREL(320,150,’ ● 今日最高价:’+NUMTOSTRN(high,2)+’元’),coloryellow,linethick1;
DRAWTEXTREL(350,350,’ 预测高一: ‘+NUMTOSTRN(ref(预测高一,0),2)+’元’),colorffffff,linethick1;
DRAWTEXTREL(350,470,’ 预测高二: ‘+NUMTOSTRN(ref(预测高二,0),2)+’元’),colorffffff,linethick1;
{T + 0 操作数据}
pp:=0.0115;{可调整}
成本价:=预测低二*1.006;{也是买回价}
卖出价:=成本价*(1+pp);
高低差一:=预测高一-预测低二;
高低差二:=预测高二-预测低二;
差价比一:=卖出价/预测高一*100;
差价比二:=卖出价/预测高二*100;
昨日高低比:=(最高价2-最低价2)/最高价2*100;
目前高低比:=(最高价1-最低价1)/最高价1*100;
ssu1:=卖出价预测高二 or 差价比一 >98% or 差价比二 >98%;
DRAWTEXTREL(500,60,’ ★ T + 0 操作数据 目前纯利设定为:’+NUMTOSTRN(ref(pp*100,0),2)+’%’),coloryellow,linethick1;
DRAWTEXTREL(530,200,’ 成本价: ‘+NUMTOSTRN(ref(成本价,0),2)+’元’+’ 卖出价: ‘+NUMTOSTRN(ref(卖出价,0),2)+’元’),colorffffff,linethick1;
DRAWTEXTREL(530,350,’ 高低差一: ‘+NUMTOSTRN(ref(高低差一,0),2)+’元’+ ‘ 差价比一: ‘+NUMTOSTRN(ref(差价比一,0),2)+’%’),coloryellow,linethick1;
DRAWTEXTREL(530,470,’ 高低差二: ‘+NUMTOSTRN(ref(高低差二,0),2)+’元’+ ‘ 差价比二: ‘+NUMTOSTRN(ref(差价比二,0),2)+’%’),coloryellow,linethick1;
DRAWTEXTREL(750,200,’ 买回价: ‘+NUMTOSTRN(ref(ggg,0),2)+’元’),colorffffff,linethick1;
DRAWTEXTREL(750,470,’ 昨日高低比: ‘+NUMTOSTRN(ref(昨日高低比,0),2)+’%’),colorffffff,linethick1;
DRAWTEXTREL(750,350,’ 目前高低比: ‘+NUMTOSTRN(ref(目前高低比,0),2)+’%’),colorffffff,linethick1;
IF BARSTATUS=2 AND ssu1 THEN BEGIN
DRAWTEXTREL(530,610,’ ★ 设定成功’),COLORRED,linethick1;
END
ELSE
IF BARSTATUS=2 AND ssu2 THEN BEGIN
DRAWTEXTREL(530,610,’ ● 设定失败’),COLORgreen,linethick1;
END
su1:=预测低二>low and 卖出价
【股票入门基础知识】【大智慧】预测股价指标公式
特别声明:文章内容仅供参考,不造成任何投资建议。投资者据此操作,风险自担。