看股吧 www.kanguba.com [今日大盘指数 欧美全球股市行情 股票公式查询网站] 手机APP下载 | 手机访问 | 加入收藏 | 保存到桌面
看股吧
看股吧股票网-今日大盘指数 欧美全球股市行情 股票公式查询网站
股票查询: 行情分析 DDX指标 走势点评 股票公告 大事 主力持仓 股权质押 分红 大小非 十大股东 股本结构 高管持股 研报 高管 主营 龙虎榜 股吧
当前位置: 看股吧 > 股票公式 > 通达信公式
股票公式搜索:

通达信账户统计与趋势判断主图指标公式

2021/1/19 18:25:42

{主图为变色K线}
MA1:MA(C,5);
MA2:MA(C,10);
MA3:MA(C,20);
DRAWKLINE(H,O,L,C);
MID_DX:=(3*C+L+H)/5;
乾坤线:=WMA(MID_DX,20);
乾:=IF(C>REF(乾坤线,1),乾坤线,DRAWNULL);
坤:=IF(C<REF(乾坤线,1),乾坤线,DRAWNULL);
{买卖线}
STICKLINE(ISLASTBAR AND C>乾坤线,乾坤线,乾坤线,60,0),COLOR0000FF;
STICKLINE(ISLASTBAR AND C<乾坤线,乾坤线,乾坤线,60,0),COLOR00FF00;
{变色K线}
STICKLINE(C>乾 AND O>=C,C,O,-1,0),COLORRED;
STICKLINE(C>乾 AND O>=C,L,H,0,0),COLORRED;
STICKLINE(C<=乾 AND O<=C,O,C,-1,1),COLORCYAN;
STICKLINE(C<=乾 AND O<=C,O,L,0,1),COLORCYAN;
STICKLINE(C==乾 AND O<=C,C,H,0,1),COLORCYAN;
{---------------账户提示框---------------}
DRAWRECTREL(IF(TOTALBARSCOUNT>60,0,455),280,IF(TOTALBARSCOUNT>60,330,736),590,RGB(18,71,55));
DRAWRECTREL(IF(TOTALBARSCOUNT>60,276,736),280,IF(TOTALBARSCOUNT>60,330,790),590,RGB(24,105,72));
DRAWRECTREL(IF(TOTALBARSCOUNT>60,0,455),590,IF(TOTALBARSCOUNT>60,200,660),690,RGB(24,105,72));
DRAWRECTREL(IF(TOTALBARSCOUNT>60,200,660),590,IF(TOTALBARSCOUNT>60,330,790),690,RGB(24,105,72));
{账户统计}
股一成本:=20.993; 股一数量:=600; 股一现价:="600903$C";股1:='600903';
股二成本:=11.872; 股二数量:= 200; 股二现价:="600740$C";股2:='600740';
股三成本:=24.753; 股三数量:=500 ; 股三现价:="000786$C";股3:='000786';
股四成本:=5.822 ; 股四数量:=1000; 股四现价:="000725$C";股4:='000725';
股五成本:= 6.114; 股五数量:=1000; 股五现价:="601899$C";股5:='601899';
DRAWTEXT_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.005,0.46),0.34,0,'贵州燃气'),COLORCYAN;
DRAWTEXT_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.005,0.46),0.39,0,'山西焦化'),COLORYELLOW;
DRAWTEXT_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.005,0.46),0.44,0,'北新建材'),COLORCYAN;
DRAWTEXT_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.005,0.46),0.49,0,'京东方A'),COLORYELLOW;
DRAWTEXT_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.005,0.46),0.54,0,'紫金矿业'),COLORCYAN;
{--------------以上股票代码和名称应与自己持股作修改--------------}
DRAWTEXT_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.015,0.47),0.29,0,'股名'),COLORYELLOW;
DRAWTEXT_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.063,0.518),0.29,0,'持仓'),COLORYELLOW;
DRAWTEXT_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.105,0.56),0.29,0,'成本'),COLORYELLOW;
DRAWTEXT_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.151,0.606),0.29,0,'涨跌'),COLORYELLOW;
DRAWTEXT_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.195,0.65),0.29,0,'涨幅'),COLORYELLOW;
DRAWTEXT_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.241,0.696),0.29,0,'盈亏'),COLORYELLOW;
DRAWTEXT_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.284,0.742),0.39,0,'总盈比'),COLORYELLOW;
DRAWTEXT_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.284,0.742),0.49,0,'现总值'),COLORYELLOW;
{========持股价桌面显示========}
持股价:=IF(CODELIKE(股1),股一成本,IF(CODELIKE(股2),股二成本,IF(CODELIKE(股3),股三成本,
IF(CODELIKE(股4),股四成本,IF(CODELIKE(股5),股五成本,DRAWNULL))))),NODRAW;
买股量:=IF(CODELIKE(股1),股一数量,IF(CODELIKE(股2),股二数量,IF(CODELIKE(股3),股三数量,
IF(CODELIKE(股4),股四数量,IF(CODELIKE(股5),股五数量,DRAWNULL))))),NODRAW;
STICKLINE(CONST(持股价)>1 AND CURRBARSCOUNT<14,CONST(持股价),CONST(持股价),2,0),LINETHICK2,COLORYELLOW;
STICKLINE(CURRBARSCOUNT>13 AND CURRBARSCOUNT<28 AND CONST(持股价)>1 ,持股价+持股价*0.013,
持股价-持股价*0.01,4,0),COLOR39049D ;
DRAWTEXT(CONST(持股价)>1 AND CURRBARSCOUNT=27,CONST(持股价),STRCAT(STRCAT(STRCAT
(CON2STR(持股价,2),'元,持'),CON2STR(买股量,0)),' 股')),COLORWHITE;
{-------------------------主图黄金分割部分有未来函数-------------------------}
HH:=HHV(H,120);
LL:=LLV(L,120);
上涨:=BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(L==LL)+1));
下跌:=BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(H==HH)+1));
判断:=下跌 OR 上涨 OR 上涨==0 OR 下跌==0;
天线:=IFF(判断,REFDATE(REF(H,下跌),DATE),DRAWNULL);
地线:=IFF(判断,REFDATE(REF(L,上涨),DATE),DRAWNULL);
风险:=IFF(判断,REFDATE((天线-地线)*0.809+地线,DATE),DRAWNULL);
警示:=IFF(判断,REFDATE((天线-地线)*0.618+地线,DATE),DRAWNULL);
中线:=IFF(判断,REFDATE((天线-地线)*0.5+地线,DATE),DRAWNULL);
关注:=IFF(判断,REFDATE((天线-地线)*0.382+地线,DATE),DRAWNULL);
低吸:=IFF(判断,REFDATE((天线-地线)*0.191+地线,DATE),DRAWNULL);
STICKLINE(判断,天线,天线,1,0),COLORFF0000;
STICKLINE(判断,地线,地线,1,0),COLOR00FF00;
定位:=FILTER(BACKSET(ISLASTBAR,30),30);
STICKLINE(定位,天线,地线,0,-1),COLORAAB8F7;
STICKLINE(BACKSET(定位,1),风险*1.001,风险,12,0),COLORF04D23;
STICKLINE(BACKSET(定位,1),警示*1.001,警示,12,0),COLORF98E87;
STICKLINE(BACKSET(定位,1),关注*1.001,关注,12,0),COLOR6855EE;
STICKLINE(BACKSET(定位,1),低吸*1.001,低吸,12,0),COLOR0000FF;
DRAWTEXT(BACKSET(定位,1),天线-(天线-风险)/2,'风险'),COLORF04D23;
DRAWTEXT(BACKSET(定位,1),风险-(风险-警示)/2,'警示'),COLORF98E87;
DRAWTEXT(BACKSET(定位,1),中线,' ↑↓'),COLORWHITE;
DRAWTEXT(BACKSET(定位,1),低吸+(关注-低吸)/2,'关注'),COLOR647CF0;
DRAWTEXT(BACKSET(定位,1),地线+(低吸-地线)/2,'低吸'),COLOR1333C8;
{---------------------以下账户统计部分---------------------}
股一盈亏:=INTPART((股一现价-股一成本)*股一数量);
股二盈亏:=INTPART((股二现价-股二成本)*股二数量);
股三盈亏:=INTPART((股三现价-股三成本)*股三数量);
股四盈亏:=INTPART((股四现价-股四成本)*股四数量);
股五盈亏:=INTPART((股五现价-股五成本)*股五数量);
股一涨幅:=(股一现价-股一成本)/股一成本*100;
股二涨幅:=(股二现价-股二成本)/股二成本*100;
股三涨幅:=(股三现价-股三成本)/股三成本*100;
股四涨幅:=(股四现价-股四成本)/股四成本*100;
股五涨幅:=(股五现价-股五成本)/股五成本*100;
股一涨跌:=CONST(股一现价-股一成本);
股二涨跌:=CONST(股二现价-股二成本);
股三涨跌:=CONST(股三现价-股三成本);
股四涨跌:=CONST(股四现价-股四成本);
股五涨跌:=CONST(股五现价-股五成本);
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.06,0.515),0.34,0,股一数量),COLORCYAN;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.06,0.515),0.39,0,股二数量),COLORYELLOW;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.06,0.515),0.44,0,股三数量),COLORCYAN;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.06,0.515),0.49,0,股四数量),COLORYELLOW;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.06,0.515),0.54,0,股五数量),COLORCYAN;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.097,0.553),0.34,0,股一成本),COLORCYAN;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.097,0.553),0.39,0,股二成本),COLORYELLOW;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.097,0.553),0.44,0,股三成本),COLORCYAN;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.097,0.553),0.49,0,股四成本),COLORYELLOW;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.097,0.553),0.54,0,股五成本),COLORCYAN;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.146,0.601),0.34,0,股一涨跌),COLORCYAN;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.146,0.601),0.39,0,股二涨跌),COLORYELLOW;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.146,0.601),0.44,0,股三涨跌),COLORCYAN;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.146,0.601),0.49,0,股四涨跌),COLORYELLOW;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.146,0.601),0.54,0,股五涨跌),COLORCYAN;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.188,0.643),0.34,0,CONST(股一涨幅)),COLORCYAN;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.188,0.643),0.39,0,CONST(股二涨幅)),COLORYELLOW;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.188,0.643),0.44,0,CONST(股三涨幅)),COLORCYAN;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.188,0.643),0.49,0,CONST(股四涨幅)),COLORYELLOW;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.188,0.643),0.54,0,CONST(股五涨幅)),COLORCYAN;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.237,0.693),0.34,0,CONST(股一盈亏)),COLORCYAN;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.237,0.693),0.39,0,CONST(股二盈亏)),COLORYELLOW;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.237,0.693),0.44,0,CONST(股三盈亏)),COLORCYAN;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.237,0.693),0.49,0,CONST(股四盈亏)),COLORYELLOW;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.237,0.693),0.54,0,CONST(股五盈亏)),COLORCYAN;
总盈:=CONST(股一盈亏)+CONST(股二盈亏)+CONST(股三盈亏)+CONST(股四盈亏)+CONST(股五盈亏);
DRAWTEXT_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.284,0.742),0.29,0,'总盈值'),COLORYELLOW;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.284,0.742),0.34,0,CONST(总盈)),COLORCYAN;
总成本:=CONST((股一成本*股一数量)+(股二成本*股二数量)+(股三成本*股三数量)+
(股四成本*股四数量)+(股五成本*股五数量));
总盈比:=总盈/总成本*100;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.284,0.742),0.44,0,CONST(总盈比)),COLORCYAN;
股一现值:=股一数量*股一现价;
股二现值:=股二数量*股二现价;
股三现值:=股三数量*股三现价;
股四现值:=股四数量*股四现价;
股五现值:=股五数量*股五现价;
总市值:=股一现值+股二现值+股三现值+股四现值+股五现值;
DRAWNUMBER_FIX(C!=0,IF(TOTALBARSCOUNT>60,0.284,0.742),0.54,0,CONST(总市值)),COLORCYAN;
{----------------DMI趋势转向及操作提示部分------------------}
MTR:=EMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),13);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),13);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),13);
PDI:=DMP*100/MTR;
MDI:=DMM*100/MTR;
牛:=PDI-22;
熊:=MDI-22;
多:=EXPMEMA((PDI-MDI)/(MDI+PDI)*100,3);
空:=EXPMEMA(多,5);
熊市:=熊>牛;
牛市:=牛>熊;
涨:=多>空;
跌:=空>多;
牛上:=PDI>DMI AND 多>=30;
牛下:=PDI<DMI AND 多>=30;
牛盘整:=牛>熊 AND 多>16 AND 多<30;
熊盘整:=牛<熊 AND 多>16 AND 多<30;
熊空:=牛<熊 AND 多<空;
持股:=牛市 AND 涨 AND 多<60;
多顶:=牛市 AND 涨 AND 多>60;
慎:=熊市 AND 涨;
空持:=熊市 AND 跌;
多持:=牛市 AND 跌;
买:=CROSS(多,空);
卖:=CROSS(空,多);
DRAWTEXT_FIX(ISLASTBAR,IF(TOTALBARSCOUNT>60,0.23,0.691),0.6,0,'短 线 提 示'),COLORYELLOW;
DRAWTEXT_FIX(买 AND ISLASTBAR,IF(TOTALBARSCOUNT>60,0.29,0.756),0.64,0,'买入'),COLORMAGENTA;
DRAWTEXT_FIX(卖 AND ISLASTBAR,IF(TOTALBARSCOUNT>60,0.29,0.756),0.64,0,'卖出'),COLORCYAN;
DRAWTEXT_FIX(持股 AND ISLASTBAR,IF(TOTALBARSCOUNT>60,0.215,0.756),0.64,0,'持股'),COLORMAGENTA;
DRAWTEXT_FIX(多顶 AND ISLASTBAR,IF(TOTALBARSCOUNT>60,0.213,0.67),0.64,0,'注 意 顶 部'),COLORMAGENTA;
DRAWTEXT_FIX(慎 AND ISLASTBAR,IF(TOTALBARSCOUNT>60,0.213,0.67),0.64,0,'谨 慎 持 股'),COLORMAGENTA;
DRAWTEXT_FIX(多持 AND ISLASTBAR,IF(TOTALBARSCOUNT>60,0.213,0.67),0.64,0,'避 险 持 币'),COLORCYAN;
DRAWTEXT_FIX(空持 AND ISLASTBAR,IF(TOTALBARSCOUNT>60,0.213,0.67),0.64,0,'走 熊 持 币'),COLORCYAN;
DRAWTEXT_FIX(ISLASTBAR,IF(TOTALBARSCOUNT>60,0.04,0.497),0.6,0,'牛 熊 及 趋 势'),COLORYELLOW;
DRAWTEXT_FIX(牛上 AND ISLASTBAR,IF(TOTALBARSCOUNT>60,0.048,0.507),0.64,0,'牛 市 趋 势 向 上'),COLORMAGENTA;
DRAWTEXT_FIX(牛下 AND ISLASTBAR,IF(TOTALBARSCOUNT>60,0.048,0.507),0.64,0,'牛 市 趋 势 向 下'),COLORCYAN;
DRAWTEXT_FIX(牛盘整 AND ISLASTBAR,IF(TOTALBARSCOUNT>60,0.068,0.525),0.64,0,'略 牛 盘 整'),COLORMAGENTA;
DRAWTEXT_FIX(熊盘整 AND ISLASTBAR,IF(TOTALBARSCOUNT>60,0.068,0.525),0.64,0,'略 熊 盘 整'),COLORCYAN;
DRAWTEXT_FIX(熊空 AND ISLASTBAR,IF(TOTALBARSCOUNT>60,0.068,0.525),0.64,0,'熊 市 休 息'),COLORCYAN;

看股吧公 式 w ww.kanguba.com

其它股票公式列表
看股吧查股导航:个股行情分析查询 股票DDX指标查询 走势点评 股票公告查询 大事提醒 股权质押查询 股票分红查询 解禁查询 高管持股 高管查询
传音控股 688036+2.55% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
奥特迅 002227+2.55% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
派克新材 605123+2.54% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
*ST昌鱼 600275+2.54% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
太化股份 600281+2.53% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
世荣兆业 002016+2.52% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
腾达建设 600512+2.52% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
华锐精密 688059+2.51% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
新兴铸管 000778+2.51% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
连云港 601008+2.51% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
看股网力求但不保证数据的完全准确,不对因网站全部内容或部分内容而引致的盈亏承担任何责任,本站所有内容仅供参考。
本站不提供任何股票服务,站内广告不代表看股吧的观点,由此引起的一切法律责任均与本站无关,请股民自行识别判断,谨慎投资,预防上当受骗!
联系我们:nlfen9@hotmail.com
手机版(手机访问当前页面) | 手机APP下载 | 电脑端(适合电脑或大屏用户) | 备案号:沪ICP备2024045114号-121