【大智慧】預(yù)測(cè)股價(jià)指標(biāo)公式
攻城獅 2015.11.28 13:55
N:=0;
{預(yù)測(cè)當(dāng)天最低價(jià)公式}
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;
預(yù)測(cè)低一:O-B2,linethick0;
最低價(jià):low,coloryellow,linethick0;
預(yù)測(cè)高一:=O+B2;
{預(yù)測(cè)當(dāng)天股價(jià)公式}
開(kāi)盤價(jià)1:=open;
開(kāi)盤價(jià)2:=REF(open,1);
最高價(jià)1:=high;
最高價(jià)2:=REF(high,1);
最低價(jià)1:=low;
最低價(jià)2:=REF(low,1);
收盤價(jià)1:=CLOSE;
收盤價(jià)2:=REF(CLOSE,1);
AA:=最高價(jià)2;
BB:=最低價(jià)2;
CC:=開(kāi)盤價(jià)2;
DD:=收盤價(jià)2;
EE:=(AA+BB+CC+2*DD)/5;
AAA:=EE+(AA-BB);
BBB:=2*EE-BB;
CCC:=2*EE-AA;
DDD:=EE-(AA-BB);
上升突破價(jià):=AAA;
上升阻力價(jià):=BBB;
下跌支撐價(jià):=CCC;
下跌反轉(zhuǎn)價(jià):=DDD;
EEE:=(EE+上升突破價(jià)+上升阻力價(jià)+下跌支撐價(jià)+下跌反轉(zhuǎn)價(jià))/5;
心理價(jià):=EEE;
FFF:=(EEE+開(kāi)盤價(jià)1)/2;
GGG:=(預(yù)測(cè)低一+FFF)/2;
預(yù)測(cè)低二:GGG,colorffffff,LINETHICK0;
最高價(jià):high,colorred,linethick0;
{預(yù)測(cè)今日最高價(jià)公式}
預(yù)測(cè)高二:=MA(REF(HIGH,1)/REF(CLOSE,2),N)*REF(CLOSE,1);
開(kāi)盤價(jià):open,colorffffff,linethick0;
收盤價(jià):close,coloryellow,linethick0;
差額一:預(yù)測(cè)低一-low,colorffffff,LINETHICK0;
差額二:預(yù)測(cè)低二-low,colorffffff,LINETHICK0;
差比一:(差額一/low)*100,colorffffff,LINETHICK0;
差比二:(差額二/low)*100,colorffffff,LINETHICK0;
DRAWTEXTREL(10,60,’ ★ 今日最低價(jià):’+NUMTOSTRN(low,2)+’元’),coloryellow,linethick1;
DRAWTEXTREL(10,200,’ 預(yù)測(cè) 預(yù)測(cè)低一: ‘+NUMTOSTRN(ref(預(yù)測(cè)低一,0),2)+’元’+’ 預(yù)測(cè)低二: ‘+NUMTOSTRN(ref(ggg,0),2)+’元’),colorffffff,linethick1;
DRAWTEXTREL(10,350,’目前差價(jià) ‘+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,’ ● 今日最高價(jià):’+NUMTOSTRN(high,2)+’元’),coloryellow,linethick1;
DRAWTEXTREL(350,350,’ 預(yù)測(cè)高一: ‘+NUMTOSTRN(ref(預(yù)測(cè)高一,0),2)+’元’),colorffffff,linethick1;
DRAWTEXTREL(350,470,’ 預(yù)測(cè)高二: ‘+NUMTOSTRN(ref(預(yù)測(cè)高二,0),2)+’元’),colorffffff,linethick1;
{T + 0 操作數(shù)據(jù)}
pp:=0.0115;{可調(diào)整}
成本價(jià):=預(yù)測(cè)低二*1.006;{也是買回價(jià)}
賣出價(jià):=成本價(jià)*(1+pp);
高低差一:=預(yù)測(cè)高一-預(yù)測(cè)低二;
高低差二:=預(yù)測(cè)高二-預(yù)測(cè)低二;
差價(jià)比一:=賣出價(jià)/預(yù)測(cè)高一*100;
差價(jià)比二:=賣出價(jià)/預(yù)測(cè)高二*100;
昨日高低比:=(最高價(jià)2-最低價(jià)2)/最高價(jià)2*100;
目前高低比:=(最高價(jià)1-最低價(jià)1)/最高價(jià)1*100;
ssu1:=賣出價(jià)<預(yù)測(cè)高一 and 賣出價(jià)<預(yù)測(cè)高二;
ssu2:=賣出價(jià)>預(yù)測(cè)高一 or 賣出價(jià)>預(yù)測(cè)高二 or 差價(jià)比一 >98% or 差價(jià)比二 >98%;
DRAWTEXTREL(500,60,’ ★ T + 0 操作數(shù)據(jù) 目前純利設(shè)定為:’+NUMTOSTRN(ref(pp*100,0),2)+’%’),coloryellow,linethick1;
DRAWTEXTREL(530,200,’ 成本價(jià): ‘+NUMTOSTRN(ref(成本價(jià),0),2)+’元’+’ 賣出價(jià): ‘+NUMTOSTRN(ref(賣出價(jià),0),2)+’元’),colorffffff,linethick1;
DRAWTEXTREL(530,350,’ 高低差一: ‘+NUMTOSTRN(ref(高低差一,0),2)+’元’+ ‘ 差價(jià)比一: ‘+NUMTOSTRN(ref(差價(jià)比一,0),2)+’%’),coloryellow,linethick1;
DRAWTEXTREL(530,470,’ 高低差二: ‘+NUMTOSTRN(ref(高低差二,0),2)+’元’+ ‘ 差價(jià)比二: ‘+NUMTOSTRN(ref(差價(jià)比二,0),2)+’%’),coloryellow,linethick1;
DRAWTEXTREL(750,200,’ 買回價(jià): ‘+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,’ ★ 設(shè)定成功’),COLORRED,linethick1;
END
ELSE
IF BARSTATUS=2 AND ssu2 THEN BEGIN
DRAWTEXTREL(530,610,’ ● 設(shè)定失敗’),COLORgreen,linethick1;
END
su1:=預(yù)測(cè)低二>low and 賣出價(jià)su2:=預(yù)測(cè)低二 high;
IF BARSTATUS=2 AND su1 THEN BEGIN
DRAWTEXTREL(650,610,’★ 操作成功’),COLORRED,linethick1;
END
ELSE
IF BARSTATUS=2 AND su2 THEN BEGIN
DRAWTEXTREL(650,610,’● 操作失敗’),COLORgreen,linethick1;
END
頂線:=80;
頂線:=80;
{黃金點(diǎn):=-20;}
預(yù)測(cè)一:=-35;
預(yù)測(cè)二:=-50;
失敗:=-65;
底線:=-75;
DRAWTEXT(DISPSTATUS=2,頂線,’ 80′),COLORred,ALIGN0;
{DRAWTEXT(DISPSTATUS=2,黃金點(diǎn),’ 黃金買點(diǎn)’),COLORffffff,ALIGN0;}
DRAWTEXT(DISPSTATUS=2,預(yù)測(cè)一,’ 預(yù)測(cè)一’),COLORred,ALIGN0;
DRAWTEXT(DISPSTATUS=2,預(yù)測(cè)二,’ 預(yù)測(cè)二’),COLORyellow,ALIGN0;
DRAWTEXT(DISPSTATUS=2,失敗,’ 未到位’),COLORgreen,ALIGN0;
DRAWTEXT(DISPSTATUS=2,底線,’ -75′),COLORgreen,ALIGN0;
{DRAWTEXT(low{DRAWTEXT(low>hjmd,-20,’●’),COLORgreen,ALIGN1;}
DRAWTEXT(low<預(yù)測(cè)低一,-35,'☆'),COLORred,ALIGN1;
DRAWTEXT(low<預(yù)測(cè)低二,-50,'☆'),COLORyellow,ALIGN1;
DRAWTEXT(low>預(yù)測(cè)低二,-65,’●’),COLORgreen,ALIGN1;
DRAWTEXTABS(5,5,’概念股網(wǎng) www.chiang1015.com’),linethick1,COLOR00EEff;
{說(shuō)明:紅樹(shù)林園 這一段源碼做出來(lái)的效果是買點(diǎn)到位閃爍交替顯示[風(fēng)險(xiǎn)]和[注意]}
Amod:=MOD(CURRENTTIME,2);
DRAWTEXT(DISPSTATUS=2 and Amod=0,50,’預(yù)測(cè)警示’),colorffffff;
DRAWTEXT(DISPSTATUS=2 and low<預(yù)測(cè)低一 and Amod=0,30,'預(yù)測(cè)一 ☆'),colorred;
DRAWTEXT(DISPSTATUS=2 and low<預(yù)測(cè)低一 and Amod=1,30,'預(yù)測(cè)一 ☆'),coloryellow;
DRAWTEXT(DISPSTATUS=2 and low<預(yù)測(cè)低二 and Amod=0,10,'預(yù)測(cè)二 ☆'),colorred;
DRAWTEXT(DISPSTATUS=2 and low<預(yù)測(cè)低二 and Amod=1,10,'預(yù)測(cè)二 ☆'),coloryellow;
{DRAWTEXT(DISPSTATUS=2 and low{DRAWTEXT(DISPSTATUS=2 and low DRAWTEXT(DISPSTATUS=2 and low>預(yù)測(cè)低一 and Amod=0,30,’預(yù)測(cè)一 ●’),colorgreen;
DRAWTEXT(DISPSTATUS=2 and low>預(yù)測(cè)低一 and Amod=1,30,’預(yù)測(cè)一 ●’),colorffffff;
DRAWTEXT(DISPSTATUS=2 and low>預(yù)測(cè)低二 and Amod=0,10,’預(yù)測(cè)二 ●’),colorgreen;
DRAWTEXT(DISPSTATUS=2 and low>預(yù)測(cè)低二 and Amod=1,10,’預(yù)測(cè)二 ●’),colorffffff;
{DRAWTEXT(DISPSTATUS=2 and low>hjmd and Amod=0,20,’黃金買點(diǎn) ●’),colorgreen;}
{DRAWTEXT(DISPSTATUS=2 and low>hjmd and Amod=1,20,’黃金買點(diǎn) ●’),colorffffff;};
申明:本文為作者投稿或轉(zhuǎn)載,在概念股網(wǎng) http://www.chiang1015.com/ 上發(fā)表,為其獨(dú)立觀點(diǎn)。不代表本網(wǎng)立場(chǎng),不代表本網(wǎng)贊同其觀點(diǎn),亦不對(duì)其真實(shí)性負(fù)責(zé),投資決策請(qǐng)建立在獨(dú)立思考之上。