您当前的位置:股票 > 财经资讯 > 财经频道

大智慧昨买今卖及预测股价指标公式,大智慧MACD+KDJ+RSI顶底背离指标公式

2024-06-15 23:17:50 来源: 作者: admin888
分享到
关注牛市通网在线:
  • 扫描二维码

    关注√

    牛市通网微信

在线咨询:
  • 扫描或点击关注牛市通网在线客服

大智慧昨买今卖及预测股价指标公式,大智慧MACD+KDJ+RSI顶底背离指标公式

大智慧昨买今卖及预测股价指标公式

{昨买今卖及预测股价公式}{参数}input:N(27,1,250);

{显示买卖价}BUYPRICE:="SHOWINV@BUYPRICE"(1);

SALEPRICE:="SHOWINV@SALEPRICE"(1);

IF BUYPRICE> 0 THEN BP:=BUYPRICE;

{显示昨低买今卖操作数据}ppp:=0.015;{输入

卖出纯利}成本:=BP*1.006;

卖价:成本*(1+ppp),linethick0;

{四价运用}开盘价:open,linethick0;

开盘价1:=REF(open,1);{昨天最低价}

最高价:high,linethick0;

最高价1:=REF(high,1);

最低价:low,linethick0;

最低价1:=REF(low,1);

最低价2:=REF(low,2);

收盘价:CLOSE,linethick0;

收盘价1:=REF(CLOSE,1);

{预测系数B2计算公式1}A1:=REF(开盘价,1);

A2:=Abs((REF(收盘价,1)-A1)/A1);

A3:=ABS((REF(最高价,1)-A1)/A1);

A4:=ABS((REF(最低价,1)-A1)/A1);

B1:=ABS((A2+A3+A4)/3);

B2:开盘价*B1,linethick0;

涨跌比:B2/开盘价*100,linethick0;

{预测公式一 有用到今天开盘价}AA:=最高价1;

BB:=最低价1;

CC:=开盘价1;

DD:=收盘价1;

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;{

心理价}FFF:=(EEE+开盘价)/2;

{显示今买最低预测价}

预测低一:=开盘价-B2;{今天预测低价一}

预测低一1:=REF(预测低一,1);{昨天预测价}

预测低一2:=REF(预测低一,2);{前天预测价}

预测低二:=(预测低一+FFF)/2;{今天预测低价二}

预测低二1:=REF(预测低二,1);{昨天预测价}

预测低二2:=REF(预测低二,2);{前天预测价}

差额一:=预测低一-low;

差额二:=预测低二-low;

差比一:=(差额一/low)*100;

差比二:=(差额二/low)*100;

{显示今日最高预测价公式}

预测高一:=开盘价+B2;{今天预测高价一}

{第二今日最高预测价公式}预测高二:=ma(REF(HIGH,1)/REF(CLOSE,2),N)*REF(CLOSE,1);{今天预测高价二}

预测高二1:=ref(预测高二,1);{昨天预测价}

预测高二2:=ref(预测高二,2);{前天预测价}

{设定弱势预测最高价,YPP可自行调整}YPP一:=0.985;{预测高一弱势价}

YPP二:=0.989;{预测高二弱势价}

熊价一:=预测高一*YPP一;

熊价一1:=REF(熊价一,1);

熊价二:=预测高二*YPP二;

熊价二1:=REF(熊价二,1);

平均价一:=(预测高一+预测高二)/2;

平均价二:=(熊价一+熊价二)/2;

{测试昨最低及昨预测低卖出成功率}

check1:(high-预测低二1)/预测低二1*100,linethick0;

low1:=ref(low,1);

check2:(high-low1)/low1*100,linethick0;

DRAWTEXTREL(10,60,' 【今日低买操作数据】 【昨低买今卖操作数据】 纯利设定:'+NUMTOstRN(ref(ppp*100,0),2)+'% 【依据预测价 计算卖出价】' ),coloryellow,linethick1;

DRAWTEXTREL(10,200,' 【今日低买】 预测价 目前差价 目前差比'),Color8000FF,linethick1;

DRAWTEXTREL(10,350,' 预测低一: '+NUMTOSTRN(ref(预测低一,0),2)+'元 '+ NUMTOSTRN(ref(差额一,0),2)+'元 '+ NUMTOSTRN(ref(差比一,0),2)+'%'),colorffffff,linethick1;

DRAWTEXTREL(10,600,' 预测低二: '+NUMTOSTRN(ref(预测低二,0),2)+'元 '+ NUMTOSTRN(ref(差额二,0),2)+'元 '+ NUMTOSTRN(ref(差比二,0),2)+'%'),colorffffff,linethick1;

DRAWTEXTREL(320,500,' 今 最低价:'+NUMTOSTRN(ref(最低价,0),2)+'元 最高价:'+NUMTOSTRN(ref(最高价,0),2)+'元'),coloryellow,linethick1;

DRAWTEXTREL(320,745,' 昨 最低价:'+NUMTOSTRN(ref(最低价1,0),2)+'元 最高价:'+NUMTOSTRN(ref(最高价1,0),2)+'元'),COLORD3A9FF,linethick1;

DRAWTEXTREL(320,615,' 开盘价:'+NUMTOSTRN(ref(开盘价,0),2)+'元 收盘价:'+NUMTOSTRN(ref(收盘价,0),2)+'元'),coloryellow,linethick1;

DRAWTEXTREL(320,860,' 开盘价:'+NUMTOSTRN(ref(开盘价1,0),2)+'元 收盘价:'+NUMTOSTRN(ref(收盘价1,0),2)+'元'),COLORD3A9FF,linethick1;

{显示昨低买今卖操作数据}DRAWTEXTREL(320,200,' 【买入价】 税后成本 卖出价 到位'),Colorffff80,linethick1;

DRAWTEXTREL(320,350,' '+NUMTOSTR(BP)+'元 '+NUMTOSTR(成本)+'元 '+NUMTOSTR(卖价)+'元'),COLORffffff,linethick1;

{显示依据预测价计算卖出价}DRAWTEXTREL(660,200,' 【预测数据】 强 势 到位 弱 势 到位'),Color8000FF,linethick1;

DRAWTEXTREL(660,350,' 预测高一: '+NUMTOSTRN(ref(预测高一,0),2)+'元 '+ NUMTOSTRN(ref(熊价一,0),2)+'元'),colorffffff,linethick1;

DRAWTEXTREL(660,500,' 预测高二: '+NUMTOSTRN(ref(预测高二,0),2)+'元 '+ NUMTOSTRN(ref(熊价二,0),2)+'元'),colorffffff,linethick1;

DRAWTEXTREL(660,650,' 平均价 : '+NUMTOSTRN(ref(平均价一,0),2)+'元 '+ NUMTOSTRN(ref(平均价二,0),2)+'元'),colorffffff,linethick1;

{显示卖出与否}BBP1:=high>BP or high=BP;

BBP2:=high

IF BARSTATUS=2 AND BBP1 THEN BEGIN

DRAWTEXTREL(320,350,' ★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND BBP2 THEN BEGIN

DRAWTEXTREL(320,350,' ●'),COLORgreen,linethick1;

END{显示今日低买操作}ssssu1:=预测低一>low or 预测低一=low;

ssssu2:=预测低一

IF BARSTATUS=2 AND ssssu1 THEN BEGINDRAWTEXTREL(10,480,' 到 位: ★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND ssssu2 THEN BEGIN

DRAWTEXTREL(10,480,' 到 位: ●'),COLORgreen,linethick1;

ENDssssu3:=预测低二>low or 预测低二=low;

ssssu4:=预测低二

IF BARSTATUS=2 AND ssssu3 THEN BEGIN

DRAWTEXTREL(10,730,' 到 位: ★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND ssssu4 THEN BEGIN

DRAWTEXTREL(10,730,' 到 位: ●'),COLORgreen,linethick1;

END{昨日低买操作结果}LSSssu1:=预测低一1>最低价1 or 预测低一1=最低价1;

lssssu2:=预测低一1<最低价1;

IF BARSTATUS=2 AND lssssu1 THEN BEGINDRAWTEXTREL(10,480,' 昨 ★ '+NUMTOSTRN(ref(预测低一1,0),2)+'元'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND lssssu2 THEN BEGIN

DRAWTEXTREL(10,480,' 昨 ● '+NUMTOSTRN(ref(预测低一1,0),2)+'元'),COLORgreen,linethick1;

ENDlssssu3:=预测低二1>最低价1 or 预测低二=最低价1;

lssssu4:=预测低二1<最低价1;

IF BARSTATUS=2 AND lssssu3 THEN BEGINDRAWTEXTREL(10,730,' 昨 ★ '+NUMTOSTRN(ref(预测低二1,0),2)+'元'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND lssssu4 THEN BEGIN

DRAWTEXTREL(10,730,' 昨 ● '+NUMTOSTRN(ref(预测低二1,0),2)+'元'),COLORgreen,linethick1;

END{昨今日四价涨跌比}su1:=最低价>最低价1;

su2:=最低价=最低价1;

su3:=最低价<最低价1;

IF BARSTATUS=2 AND su1 THEN BEGINDRAWTEXTREL(470,500,'★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND su2 THEN BEGIN

DRAWTEXTREL(470,500,'★'),COLORffffff,linethick1;

ENDELSEIF BARSTATUS=2 AND su3 THEN BEGIN

DRAWTEXTREL(470,500,'●'),COLORgreen,linethick1;

ENDsu4:=最高价>最高价1;

su5:=最高价=最高价1;

su6:=最高价<最高价1;

IF BARSTATUS=2 AND su4 THEN BEGINDRAWTEXTREL(620,500,'★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND su5 THEN BEGIN

DRAWTEXTREL(620,500,'★'),COLORffffff,linethick1;

ENDELSEIF BARSTATUS=2 AND su6 THEN BEGIN

DRAWTEXTREL(620,500,'●'),COLORgreen,linethick1;

ENDsu7:=开盘价>开盘价1;

su8:=开盘价=开盘价1;

su9:=开盘价<开盘价1;

IF BARSTATUS=2 AND su7 THEN BEGIN

DRAWTEXTREL(470,615,'★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND su8 THEN BEGIN

DRAWTEXTREL(470,615,'★'),COLORffffff,linethick1;

ENDELSEIF BARSTATUS=2 AND su9 THEN BEGIN

DRAWTEXTREL(470,615,'●'),COLORgreen,linethick1;

ENDsuu1:=收盘价>收盘价1;

suu2:=收盘价=收盘价1;

suu3:=收盘价<收盘价1;

IF BARSTATUS=2 AND suu1 THEN BEGIN

DRAWTEXTREL(620,615,'★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND suu2 THEN BEGIN

DRAWTEXTREL(620,615,'★'),COLORffffff,linethick1;

ENDELSEIF BARSTATUS=2 AND suu3 THEN BEGIN

DRAWTEXTREL(620,615,'●'),COLORgreen,linethick1;

END{显示预测高价}ssuu1:=预测高一

ssuu2:=预测高一>high;

IF BARSTATUS=2 AND ssuu1 THEN BEGINDRAWTEXTREL(660,350,' ★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND ssuu2 THEN BEGIN

DRAWTEXTREL(660,350,' ●'),COLORgreen,linethick1;

ENDssuu3:=预测高二

ssuu4:=预测高二>high;

IF BARSTATUS=2 AND ssuu3 THEN BEGINDRAWTEXTREL(660,500,' ★'),COLORRED,linethick1;

ENDELSEBARSTATUS=2 AND ssuu4 THEN BEGIN

DRAWTEXTREL(660,500,' ●'),COLORgreen,linethick1;

ENDssuu5:=平均价一

ssuu6:=平均价一>high;

IF BARSTATUS=2 AND ssuu5 THEN BEGIN

DRAWTEXTREL(660,650,' ★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND ssuu6 THEN BEGIN

DRAWTEXTREL(660,650,' ●'),COLORgreen,linethick1;

ENDssu1:=熊价一

ssu2:=熊价一>high;

IF BARSTATUS=2 AND ssu1 THEN BEGINDRAWTEXTREL(660,350,' ★ '),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND ssu2 THEN BEGIN

DRAWTEXTREL(660,350,' ●'),COLORgreen,linethick1;

ENDssu3:=熊价二

ssu4:=熊价二>high;

IF BARSTATUS=2 AND ssu3 THEN BEGINDRAWTEXTREL(660,500,' ★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND ssu4 THEN BEGIN

DRAWTEXTREL(660,500,' ●'),COLORgreen,linethick1;

ENDssu5:=平均价二

ssu6:=平均价二>high;

IF BARSTATUS=2 AND ssu5 THEN BEGIN

DRAWTEXTREL(660,650,' ★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND ssu6 THEN BEGIN

DRAWTEXTREL(660,650,' ●'),COLORgreen,linethick1;

ENDchec1:=预测低二1*1.006*(1+ppp)

chec2:=预测低二1*1.006*(1+ppp)>high;

IF BARSTATUS=2 AND chec1 THEN BEGIN

DRAWTEXTREL(660,780,' 测 试: 昨预测低二 ★ '),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND chec2 THEN BEGIN

DRAWTEXTREL(660,780,' 测 试: 昨预测低二 ●'),COLORgreen,linethick1;

ENDchec3:=high>最低价1*1.006*(1+ppp) or high=最低价1*1.006*(1+ppp);

chec4:=high<最低价1*1.006*(1+ppp);

IF BARSTATUS=2 AND chec3 THEN BEGINDRAWTEXTREL(660,780,' 昨最低价 ★ '),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND chec4 THEN BEGIN

DRAWTEXTREL(660,780,' 昨最低价 ●'),COLORgreen,linethick1;

END卖一:=预测低二1*1.006*(1+ppp);

卖二:=最低价1*1.006*(1+ppp);

DRAWTEXTREL(660,880,' 卖出价: '+NUMTOSTRN(ref(卖一,0),2)+'元 '+ NUMTOSTRN(ref(卖二,0),2)+'元'),colorffffff,linethick1;

大智慧MACD+KDJ+RSI顶底背离指标公式

A:=ma(CLOSE,17)+Abs(MA(CLOSE,17)-REF(MA(CLOSE,17),1));

B:=MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17),1);

分水岭:IF(MA(CLOSE,17)

操作线:分水岭-(ema(C,3)-分水岭),COLOR00FFFF,LINETHICK2;

PM:Ma(C,5),COLORred,linethick2;

IF (PM>分水岭,PM,pm),Color0000FF,linethick2;

IF (PM>分水岭,分水岭,a),ColoR00ff00,POINTDOT,linethick4;

IF (C

IF (PM<分水岭,分水岭,pm),Color0000FF,linethick2;

DRAWICON(crOSS(分水岭,操作线),分水岭-0.02,1);

{顶底背离}A1:=BArslAst(ref(cross("macd.diff"(12,26,9),"macd.dea"(12,26,9)),1));

B1:=ref(c,A1+1)>c and ref("macd.diff"(12,26,9),A1+1)<"macd.diff"(12,26,9) and cross("macd.diff"(12,26,9),"macd.dea"(12,26,9));

DRAWTEXT(FILTER(B1>0,5),L-0.12,'M底'),COLORRED;

A2:=BARSLAST(ref(cross("kdj.k"(9,9,3),"kdj.d"(9,9,3)),1));

B2:=ref(c,A2+1)>c and ref("kdj.k"(9,9,3),A2+1)<"kdj.k"(9,9,3) and cross("kdj.k"(9,9,3),"kdj.d"(9,9,3));

DRAWTEXT(FILTER(B2>0,5),L-0.08,'K底'),COLORFF00FF;

A3:=BARSLAST(ref(cross("rsi.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));

B3:=ref(c,A3+1)>c and ref("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) and cross("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));

DRAWTEXT(FILTER(B3>0,5),L-0.02,'R底'),COLORffcc66;

C1:=BARSLAST(ref(cross("macd.dea"(12,26,9),"macd.diff"(12,26,9)),1));

D1:=ref(c,C1+1)"macd.diff"(12,26,9) and cross("macd.dea"(12,26,9),"macd.diff"(12,26,9));

DRAWTEXT(FILTER(D1>0,5),H+0.24,'M顶'),COLOR0066FF;

C2:=BARSLAST(ref(cross("kdj.d"(9,9,3),"kdj.k"(9,9,3)),1));

D2:=ref(c,C2+1)"kdj.k"(9,9,3) and cross("kdj.d"(9,9,3),"kdj.k"(9,9,3));

DRAWTEXT(FILTER(D2>0,5),H+0.16,'K顶'),COLOR00FF00;

C3:=BARSLAST(ref(cross("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));

D3:=ref(c,C3+1)"RSI.RSI1"(6,12,24) and cross("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));

DRAWTEXT(FILTER(D3>0,5),H+0.08,'R顶'),COLORffffCC;

牛市通网是一个牛股推荐网与低风险投资知识网,可以在线联系客服领取牛股。牛市通网从权威的投资专家、金融分析师等投资信息中挑选优质的文章进行发布。牛市通网主要为投资者提供股票知识、股票观点、股票分析和明智金融投资讨论等信息。

责任编辑:admin888 标签:大智慧昨买今卖及预测股价指标公式,大智慧MACD+KDJ+RSI顶底背离指标公式
广告

热门搜索

相关文章

广告
牛市通网 |财经频道

大智慧昨买今卖及预测股价指标公式,大智慧MACD+KDJ+RSI顶底背离指标公式

admin888

|

大智慧昨买今卖及预测股价指标公式,大智慧MACD+KDJ+RSI顶底背离指标公式

大智慧昨买今卖及预测股价指标公式

{昨买今卖及预测股价公式}{参数}input:N(27,1,250);

{显示买卖价}BUYPRICE:="SHOWINV@BUYPRICE"(1);

SALEPRICE:="SHOWINV@SALEPRICE"(1);

IF BUYPRICE> 0 THEN BP:=BUYPRICE;

{显示昨低买今卖操作数据}ppp:=0.015;{输入

卖出纯利}成本:=BP*1.006;

卖价:成本*(1+ppp),linethick0;

{四价运用}开盘价:open,linethick0;

开盘价1:=REF(open,1);{昨天最低价}

最高价:high,linethick0;

最高价1:=REF(high,1);

最低价:low,linethick0;

最低价1:=REF(low,1);

最低价2:=REF(low,2);

收盘价:CLOSE,linethick0;

收盘价1:=REF(CLOSE,1);

{预测系数B2计算公式1}A1:=REF(开盘价,1);

A2:=Abs((REF(收盘价,1)-A1)/A1);

A3:=ABS((REF(最高价,1)-A1)/A1);

A4:=ABS((REF(最低价,1)-A1)/A1);

B1:=ABS((A2+A3+A4)/3);

B2:开盘价*B1,linethick0;

涨跌比:B2/开盘价*100,linethick0;

{预测公式一 有用到今天开盘价}AA:=最高价1;

BB:=最低价1;

CC:=开盘价1;

DD:=收盘价1;

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;{

心理价}FFF:=(EEE+开盘价)/2;

{显示今买最低预测价}

预测低一:=开盘价-B2;{今天预测低价一}

预测低一1:=REF(预测低一,1);{昨天预测价}

预测低一2:=REF(预测低一,2);{前天预测价}

预测低二:=(预测低一+FFF)/2;{今天预测低价二}

预测低二1:=REF(预测低二,1);{昨天预测价}

预测低二2:=REF(预测低二,2);{前天预测价}

差额一:=预测低一-low;

差额二:=预测低二-low;

差比一:=(差额一/low)*100;

差比二:=(差额二/low)*100;

{显示今日最高预测价公式}

预测高一:=开盘价+B2;{今天预测高价一}

{第二今日最高预测价公式}预测高二:=ma(REF(HIGH,1)/REF(CLOSE,2),N)*REF(CLOSE,1);{今天预测高价二}

预测高二1:=ref(预测高二,1);{昨天预测价}

预测高二2:=ref(预测高二,2);{前天预测价}

{设定弱势预测最高价,YPP可自行调整}YPP一:=0.985;{预测高一弱势价}

YPP二:=0.989;{预测高二弱势价}

熊价一:=预测高一*YPP一;

熊价一1:=REF(熊价一,1);

熊价二:=预测高二*YPP二;

熊价二1:=REF(熊价二,1);

平均价一:=(预测高一+预测高二)/2;

平均价二:=(熊价一+熊价二)/2;

{测试昨最低及昨预测低卖出成功率}

check1:(high-预测低二1)/预测低二1*100,linethick0;

low1:=ref(low,1);

check2:(high-low1)/low1*100,linethick0;

DRAWTEXTREL(10,60,' 【今日低买操作数据】 【昨低买今卖操作数据】 纯利设定:'+NUMTOstRN(ref(ppp*100,0),2)+'% 【依据预测价 计算卖出价】' ),coloryellow,linethick1;

DRAWTEXTREL(10,200,' 【今日低买】 预测价 目前差价 目前差比'),Color8000FF,linethick1;

DRAWTEXTREL(10,350,' 预测低一: '+NUMTOSTRN(ref(预测低一,0),2)+'元 '+ NUMTOSTRN(ref(差额一,0),2)+'元 '+ NUMTOSTRN(ref(差比一,0),2)+'%'),colorffffff,linethick1;

DRAWTEXTREL(10,600,' 预测低二: '+NUMTOSTRN(ref(预测低二,0),2)+'元 '+ NUMTOSTRN(ref(差额二,0),2)+'元 '+ NUMTOSTRN(ref(差比二,0),2)+'%'),colorffffff,linethick1;

DRAWTEXTREL(320,500,' 今 最低价:'+NUMTOSTRN(ref(最低价,0),2)+'元 最高价:'+NUMTOSTRN(ref(最高价,0),2)+'元'),coloryellow,linethick1;

DRAWTEXTREL(320,745,' 昨 最低价:'+NUMTOSTRN(ref(最低价1,0),2)+'元 最高价:'+NUMTOSTRN(ref(最高价1,0),2)+'元'),COLORD3A9FF,linethick1;

DRAWTEXTREL(320,615,' 开盘价:'+NUMTOSTRN(ref(开盘价,0),2)+'元 收盘价:'+NUMTOSTRN(ref(收盘价,0),2)+'元'),coloryellow,linethick1;

DRAWTEXTREL(320,860,' 开盘价:'+NUMTOSTRN(ref(开盘价1,0),2)+'元 收盘价:'+NUMTOSTRN(ref(收盘价1,0),2)+'元'),COLORD3A9FF,linethick1;

{显示昨低买今卖操作数据}DRAWTEXTREL(320,200,' 【买入价】 税后成本 卖出价 到位'),Colorffff80,linethick1;

DRAWTEXTREL(320,350,' '+NUMTOSTR(BP)+'元 '+NUMTOSTR(成本)+'元 '+NUMTOSTR(卖价)+'元'),COLORffffff,linethick1;

{显示依据预测价计算卖出价}DRAWTEXTREL(660,200,' 【预测数据】 强 势 到位 弱 势 到位'),Color8000FF,linethick1;

DRAWTEXTREL(660,350,' 预测高一: '+NUMTOSTRN(ref(预测高一,0),2)+'元 '+ NUMTOSTRN(ref(熊价一,0),2)+'元'),colorffffff,linethick1;

DRAWTEXTREL(660,500,' 预测高二: '+NUMTOSTRN(ref(预测高二,0),2)+'元 '+ NUMTOSTRN(ref(熊价二,0),2)+'元'),colorffffff,linethick1;

DRAWTEXTREL(660,650,' 平均价 : '+NUMTOSTRN(ref(平均价一,0),2)+'元 '+ NUMTOSTRN(ref(平均价二,0),2)+'元'),colorffffff,linethick1;

{显示卖出与否}BBP1:=high>BP or high=BP;

BBP2:=high

IF BARSTATUS=2 AND BBP1 THEN BEGIN

DRAWTEXTREL(320,350,' ★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND BBP2 THEN BEGIN

DRAWTEXTREL(320,350,' ●'),COLORgreen,linethick1;

END{显示今日低买操作}ssssu1:=预测低一>low or 预测低一=low;

ssssu2:=预测低一

IF BARSTATUS=2 AND ssssu1 THEN BEGINDRAWTEXTREL(10,480,' 到 位: ★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND ssssu2 THEN BEGIN

DRAWTEXTREL(10,480,' 到 位: ●'),COLORgreen,linethick1;

ENDssssu3:=预测低二>low or 预测低二=low;

ssssu4:=预测低二

IF BARSTATUS=2 AND ssssu3 THEN BEGIN

DRAWTEXTREL(10,730,' 到 位: ★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND ssssu4 THEN BEGIN

DRAWTEXTREL(10,730,' 到 位: ●'),COLORgreen,linethick1;

END{昨日低买操作结果}LSSssu1:=预测低一1>最低价1 or 预测低一1=最低价1;

lssssu2:=预测低一1<最低价1;

IF BARSTATUS=2 AND lssssu1 THEN BEGINDRAWTEXTREL(10,480,' 昨 ★ '+NUMTOSTRN(ref(预测低一1,0),2)+'元'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND lssssu2 THEN BEGIN

DRAWTEXTREL(10,480,' 昨 ● '+NUMTOSTRN(ref(预测低一1,0),2)+'元'),COLORgreen,linethick1;

ENDlssssu3:=预测低二1>最低价1 or 预测低二=最低价1;

lssssu4:=预测低二1<最低价1;

IF BARSTATUS=2 AND lssssu3 THEN BEGINDRAWTEXTREL(10,730,' 昨 ★ '+NUMTOSTRN(ref(预测低二1,0),2)+'元'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND lssssu4 THEN BEGIN

DRAWTEXTREL(10,730,' 昨 ● '+NUMTOSTRN(ref(预测低二1,0),2)+'元'),COLORgreen,linethick1;

END{昨今日四价涨跌比}su1:=最低价>最低价1;

su2:=最低价=最低价1;

su3:=最低价<最低价1;

IF BARSTATUS=2 AND su1 THEN BEGINDRAWTEXTREL(470,500,'★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND su2 THEN BEGIN

DRAWTEXTREL(470,500,'★'),COLORffffff,linethick1;

ENDELSEIF BARSTATUS=2 AND su3 THEN BEGIN

DRAWTEXTREL(470,500,'●'),COLORgreen,linethick1;

ENDsu4:=最高价>最高价1;

su5:=最高价=最高价1;

su6:=最高价<最高价1;

IF BARSTATUS=2 AND su4 THEN BEGINDRAWTEXTREL(620,500,'★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND su5 THEN BEGIN

DRAWTEXTREL(620,500,'★'),COLORffffff,linethick1;

ENDELSEIF BARSTATUS=2 AND su6 THEN BEGIN

DRAWTEXTREL(620,500,'●'),COLORgreen,linethick1;

ENDsu7:=开盘价>开盘价1;

su8:=开盘价=开盘价1;

su9:=开盘价<开盘价1;

IF BARSTATUS=2 AND su7 THEN BEGIN

DRAWTEXTREL(470,615,'★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND su8 THEN BEGIN

DRAWTEXTREL(470,615,'★'),COLORffffff,linethick1;

ENDELSEIF BARSTATUS=2 AND su9 THEN BEGIN

DRAWTEXTREL(470,615,'●'),COLORgreen,linethick1;

ENDsuu1:=收盘价>收盘价1;

suu2:=收盘价=收盘价1;

suu3:=收盘价<收盘价1;

IF BARSTATUS=2 AND suu1 THEN BEGIN

DRAWTEXTREL(620,615,'★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND suu2 THEN BEGIN

DRAWTEXTREL(620,615,'★'),COLORffffff,linethick1;

ENDELSEIF BARSTATUS=2 AND suu3 THEN BEGIN

DRAWTEXTREL(620,615,'●'),COLORgreen,linethick1;

END{显示预测高价}ssuu1:=预测高一

ssuu2:=预测高一>high;

IF BARSTATUS=2 AND ssuu1 THEN BEGINDRAWTEXTREL(660,350,' ★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND ssuu2 THEN BEGIN

DRAWTEXTREL(660,350,' ●'),COLORgreen,linethick1;

ENDssuu3:=预测高二

ssuu4:=预测高二>high;

IF BARSTATUS=2 AND ssuu3 THEN BEGINDRAWTEXTREL(660,500,' ★'),COLORRED,linethick1;

ENDELSEBARSTATUS=2 AND ssuu4 THEN BEGIN

DRAWTEXTREL(660,500,' ●'),COLORgreen,linethick1;

ENDssuu5:=平均价一

ssuu6:=平均价一>high;

IF BARSTATUS=2 AND ssuu5 THEN BEGIN

DRAWTEXTREL(660,650,' ★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND ssuu6 THEN BEGIN

DRAWTEXTREL(660,650,' ●'),COLORgreen,linethick1;

ENDssu1:=熊价一

ssu2:=熊价一>high;

IF BARSTATUS=2 AND ssu1 THEN BEGINDRAWTEXTREL(660,350,' ★ '),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND ssu2 THEN BEGIN

DRAWTEXTREL(660,350,' ●'),COLORgreen,linethick1;

ENDssu3:=熊价二

ssu4:=熊价二>high;

IF BARSTATUS=2 AND ssu3 THEN BEGINDRAWTEXTREL(660,500,' ★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND ssu4 THEN BEGIN

DRAWTEXTREL(660,500,' ●'),COLORgreen,linethick1;

ENDssu5:=平均价二

ssu6:=平均价二>high;

IF BARSTATUS=2 AND ssu5 THEN BEGIN

DRAWTEXTREL(660,650,' ★'),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND ssu6 THEN BEGIN

DRAWTEXTREL(660,650,' ●'),COLORgreen,linethick1;

ENDchec1:=预测低二1*1.006*(1+ppp)

chec2:=预测低二1*1.006*(1+ppp)>high;

IF BARSTATUS=2 AND chec1 THEN BEGIN

DRAWTEXTREL(660,780,' 测 试: 昨预测低二 ★ '),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND chec2 THEN BEGIN

DRAWTEXTREL(660,780,' 测 试: 昨预测低二 ●'),COLORgreen,linethick1;

ENDchec3:=high>最低价1*1.006*(1+ppp) or high=最低价1*1.006*(1+ppp);

chec4:=high<最低价1*1.006*(1+ppp);

IF BARSTATUS=2 AND chec3 THEN BEGINDRAWTEXTREL(660,780,' 昨最低价 ★ '),COLORRED,linethick1;

ENDELSEIF BARSTATUS=2 AND chec4 THEN BEGIN

DRAWTEXTREL(660,780,' 昨最低价 ●'),COLORgreen,linethick1;

END卖一:=预测低二1*1.006*(1+ppp);

卖二:=最低价1*1.006*(1+ppp);

DRAWTEXTREL(660,880,' 卖出价: '+NUMTOSTRN(ref(卖一,0),2)+'元 '+ NUMTOSTRN(ref(卖二,0),2)+'元'),colorffffff,linethick1;

大智慧MACD+KDJ+RSI顶底背离指标公式

A:=ma(CLOSE,17)+Abs(MA(CLOSE,17)-REF(MA(CLOSE,17),1));

B:=MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17),1);

分水岭:IF(MA(CLOSE,17)

操作线:分水岭-(ema(C,3)-分水岭),COLOR00FFFF,LINETHICK2;

PM:Ma(C,5),COLORred,linethick2;

IF (PM>分水岭,PM,pm),Color0000FF,linethick2;

IF (PM>分水岭,分水岭,a),ColoR00ff00,POINTDOT,linethick4;

IF (C

IF (PM<分水岭,分水岭,pm),Color0000FF,linethick2;

DRAWICON(crOSS(分水岭,操作线),分水岭-0.02,1);

{顶底背离}A1:=BArslAst(ref(cross("macd.diff"(12,26,9),"macd.dea"(12,26,9)),1));

B1:=ref(c,A1+1)>c and ref("macd.diff"(12,26,9),A1+1)<"macd.diff"(12,26,9) and cross("macd.diff"(12,26,9),"macd.dea"(12,26,9));

DRAWTEXT(FILTER(B1>0,5),L-0.12,'M底'),COLORRED;

A2:=BARSLAST(ref(cross("kdj.k"(9,9,3),"kdj.d"(9,9,3)),1));

B2:=ref(c,A2+1)>c and ref("kdj.k"(9,9,3),A2+1)<"kdj.k"(9,9,3) and cross("kdj.k"(9,9,3),"kdj.d"(9,9,3));

DRAWTEXT(FILTER(B2>0,5),L-0.08,'K底'),COLORFF00FF;

A3:=BARSLAST(ref(cross("rsi.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));

B3:=ref(c,A3+1)>c and ref("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) and cross("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));

DRAWTEXT(FILTER(B3>0,5),L-0.02,'R底'),COLORffcc66;

C1:=BARSLAST(ref(cross("macd.dea"(12,26,9),"macd.diff"(12,26,9)),1));

D1:=ref(c,C1+1)"macd.diff"(12,26,9) and cross("macd.dea"(12,26,9),"macd.diff"(12,26,9));

DRAWTEXT(FILTER(D1>0,5),H+0.24,'M顶'),COLOR0066FF;

C2:=BARSLAST(ref(cross("kdj.d"(9,9,3),"kdj.k"(9,9,3)),1));

D2:=ref(c,C2+1)"kdj.k"(9,9,3) and cross("kdj.d"(9,9,3),"kdj.k"(9,9,3));

DRAWTEXT(FILTER(D2>0,5),H+0.16,'K顶'),COLOR00FF00;

C3:=BARSLAST(ref(cross("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));

D3:=ref(c,C3+1)"RSI.RSI1"(6,12,24) and cross("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));

DRAWTEXT(FILTER(D3>0,5),H+0.08,'R顶'),COLORffffCC;

牛市通网是一个牛股推荐网与低风险投资知识网,可以在线联系客服领取牛股。牛市通网从权威的投资专家、金融分析师等投资信息中挑选优质的文章进行发布。牛市通网主要为投资者提供股票知识、股票观点、股票分析和明智金融投资讨论等信息。


财经频道