实盘盈亏监控指标[通达信公式]
相关标签: 市场指标分析 、 市场考核指标 、 经济发展指标包括哪些 、 市场指标包括哪些 、 反映市场经济的指标 、
1.红绿箭头为指标买卖信号;2.手指为指标止赢止损信号;
3.渐进止盈:当超出止盈目标价后,只要趋势好就一路持有,并可用“回调止盈”信号决定卖出,如果一旦显”9“就现价卖出,双保险。这也是我多年买来的教训总结。
4.设定有两个自买股,在参数中“指定买价A和指定买价B”处填入买价后,在指标中对应的个股“A买价和B买价"即可。参数:指定买价A:最小1.00,最大300.00,缺省(指定买价A买价)
指定买价B:最小1.00,最大300.00,缺省(指定买价B买价)。{ 实盘盈亏监控(源码)---泊砂实战系列3}
原理解析:
来源:程序化99( WWW.CXH99.COM )
源码:
MA3:MA(CLOSE,3),COLORWHITE;
{不新高破此线短逃/}
操作:=MA(C,5);
不高破线:HHV(操作,13),LINETHICK1,COLORBROWN,DOTLINE;
{短线趋势线}
M5:MA(C,5),COLORYELLOW,LINETHICK2;
IF(M5>REF(M5,1),M5,DRAWNULL),COLORRED,LINETHICK2;⒑日涨跌%:(C-REF(CLOSE,10))/REF(CLOSE,10)*100,COLORGREEN,NODRAW;
短期压力:HHV(H,20),COLORRED,NODRAW;
短期支撑:LLV(L,20),COLORYELLOW,NODRAW;
{周均线显示 }
WC:=C#WEEK,LINETHICK0;
周3:=EMA(WC,3),COLORLIGRAY;
周10:=EMA(WC,10),COLORCYAN;
BT1:=MA(WC,1);
BT2:=SMA(SMA(SMA(BT1,2,1),2,1),2,1),COLORGREEN,LINETHICK1;
SMA2:=MA(BT2,3);
周持股:=IF(BT2>SMA2,BT2,DRAWNULL),COLORRED,LINETHICK1;
周持币:=IF(BT2<SMA2,BT2,DRAWNULL),COLORGREEN,LINETHICK1;
周EM3:=IF(周3>REF(周3,1),BT2,DRAWNULL),COLORRED,LINETHICK1;DRAWICON(CROSS(BT2,周3),H*1.01,2);
{买卖全息精选}
{RSI周日同显/RSI周叉 N1 6 N2 12 N3 24}
N3:=12;
LC:= REF(CLOSE,1);
周R1:=MA("RSI.RSI1#WEEK"(6,12,N3),3),COLORYELLOW;
周R2:=MA("RSI.RSI1#WEEK"(6,12,N3),5)COLORFF00FF;
周R3:=MA("RSI.RSI2#WEEK"(6,12,N3),7),COLORLIGREEN;
{RSI参数:N1:=6;}
RSI:=SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100,LINETHICK2,COLORWHITE;
R角度:=SMA(MAX(C-REF(C,1),0),21,1)/SMA(ABS(C-REF(C,1)),21,1)*100,COLORYELLOW;
转强区:=IF((周R2>REF(周R2,1) ),30,0),COLOR0000FF,NODRAW;{辅助限定信号}N1:=9;
N2:=5;
MTM:=C-REF(C,1);
多:=100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1),COLORWHITE;
空:=MA(多,N2),COLORYELLOW;
XD主力进:=多>REF(多,1) ;
限定卖:=多<REF(多,1); {辅助限定信号}
{逃顶指标 }
VAR9T:=EMA(CLOSE,2)-EMA(CLOSE,55);
VAR10T:=EMA(VAR9T,13);
VAR11T:=2*(VAR9T-VAR10T);
主力资金:=(POW(VAR11T,3)*0.1+POW(VAR11T,1))/4,COLORWHITE,LINETHICK1,DOTLINE;
主升区:=多>空 OR 主力资金>REF(主力资金,1) ;
XD主升:=主升区=1 ;
X:=转强区=30 AND CROSS(周3,BT2);{买入信号综合}
DRAWICON(FILTER(X=1,2),L*0.99,1);{自动计算止赢损 }买天:=BARSLAST(X);
买价:=REF(C,买天),NODRAW;
手续费:=0.003;
盈亏%:=100*((C-买价)/买价-手续费),NODRAW,COLORE66878;
止赢5%:=买价*(1+0.03+手续费),NODRAW,COLOR000999;
止损2%:=买价*(1-0.02+手续费),COLORGREEN,NODRAW;
回调止赢:=HHV(H,X+1)*(1-0.03+手续费),COLORLIMAGENTA,,NODRAW;{比近两日最高价下跌3%,进行回调止赢};
{实战冠军}
止赢条件:=H>止赢5%;
止赢天数:=BARSLAST(止赢条件);
止损条件:=C<止损2%;
止损天数:=BARSLAST(止损条件);
止赢:=买天> 止赢天数 AND 止赢天数<止损天数;
止赢天数2:=BARSLAST(止赢条件 AND 止赢 AND COUNT(REF(止赢,1),1)=0);
止损:=买天>止损天数 AND 止赢天数>止损天数;
止损天数2:=BARSLAST(止损 AND COUNT(REF(止损,1),1)=0);
{DRAWTEXT(止赢 AND COUNT(REF(止赢,1),1)=0 AND 买入天数<止损天数2,H*1.02,'.止赢'); }
DRAWICON(止赢 AND COUNT(REF(止赢,1),1)=0 AND 买天<止损天数2,H,11);
{DRAWTEXT(止损 AND COUNT(REF(止损,1),1)=0 AND 买入天数<止赢天数2,L*0.98,'.止损'); }
DRAWICON(止损 AND COUNT(REF(止损,1),1)=0 AND 买天<止赢天数2,L,12);手续费1:=0.003;
{实盘指定买价A.止盈损}
A买价:=指定买价A,NODRAW;
A盈亏%:=100*((C-A买价)/A买价-手续费),COLORE66878,NODRAW;
A止赢5%:=A买价*(1+0.05+手续费),COLOR000999,NODRAW; {从买进到当天股价上涨5%止赢,可以自定设置}
A止损2%:=A买价*(1-0.02+手续费),COLORGREEN,NODRAW;{从买进到当天股价下跌2%止损,可以自定设置};
{实盘指定买价B.止盈损}
B买价:=指定买价B,NODRAW;
B盈亏%:=100*((C-B买价)/B买价-手续费),COLORE66878,NODRAW;
B止赢5%:=B买价*(1+0.05+手续费),COLOR000999,NODRAW; {从买进到当天股价上涨5%止赢,可以自定设置}
B止损2%:=B买价*(1-0.02+手续费),COLORGREEN,NODRAW; {从买进到当天股价下跌2%止损,可以自定设置};
{渐进止赢点}
ZL止赢价差:=(C-REF(H,1))/C*100,NODRAW;{近两日最高价与现价差。}
ZL渐进点:=ABS(ZL止赢价差<=-3);{止赢价差-3%的绝对值为提示点。}
显9现价卖:=IF(ZL渐进点=1,9,0),NODRAW;{渐进止赢显9现价卖。}
HH:=CONST(HHV(H,160));
LL:=CONST(LLV(L,160));{160可改成你习惯锁定的日K线数}
HL1:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.76,0.04));
HL2:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.80,0.08));
HL3:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.84,0.12));
HL4:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.88,0.16));
HL5:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.92,0.20));
HL6:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.96,0.24));
DRAWTEXT_FIX(1,0.00,0,0,'所属行业:')COLOR0080FF;
DRAWTEXT_FIX(1,0.07,0,0,HYBLOCK)COLOR0080FF;
DRAWTEXT_FIX(1,0.14,0,0,'所属地区:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.21,0,0,DYBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(1,0.01,0.9,0,EXTERNSTR(0,1))COLOR0000FF;
DRAWTEXT_FIX(1,0.01,0.98,0,'信号买股:')COLORMAGENTA;
{DRAWTEXT_FIX(1,0.08,0.98,0,EXTERNSTR(0,1))COLOR0000FF; }
DRAWTEXT_FIX(1,0.01,0.93,0,'实盘监控:')COLOR0000FF;{信号买股}
DRAWTEXT_FIX (1,0.062,0.98,0,'买价:'),COLOR008FFF;
DRAWNUMBER_FIX(1,0.09,0.98,0,CONST(买价)),COLORFFFFBF;
DRAWTEXT_FIX (1,0.14,0.98,0,'买天:'),,COLOR008FFF;
DRAWNUMBER_FIX(1,0.17,0.98,0,CONST(买天)),COLORFFFFBF;
DRAWTEXT_FIX (1,0.21,0.98,0,'盈亏%:'),COLOR008FFF;
DRAWNUMBER_FIX(1,0.25,0.98,0,CONST(盈亏%)),COLORFFFFBF;
DRAWTEXT_FIX (1,0.29,0.98,0,'止赢5%:'),COLOR008FFF;
DRAWNUMBER_FIX(1,0.34,0.98,0,CONST(止赢5%)),COLORFFFFBF;
DRAWTEXT_FIX (1,0.38,0.98,0,'止损2%:'),COLOR008FFF;
DRAWNUMBER_FIX(1,0.43,0.98,0,CONST(止损2%)),COLORFFFFBF;
DRAWTEXT_FIX (1,0.47,0.98,0,'回调止赢:'),COLOR008FFF;
DRAWNUMBER_FIX(1,0.53,0.98,0,CONST(回调止赢)),COLORFFFFBF;
DRAWTEXT_FIX (1,0.59,0.98,0,'显9现价卖:'),COLORLIMAGENTA;
DRAWNUMBER_FIX(1,0.66,0.98,0,CONST(显9现价卖)),COLORLIMAGENTA;{渐进止赢显9现价卖。}
{实盘持股}
DRAWTEXT_FIX (1,0.062,0.93,0,'A买价:'),COLOR00CCCC;
DRAWNUMBER_FIX(1,0.1,0.93,0,CONST(A买价)),COLORLICYAN;
DRAWTEXT_FIX (1,0.14,0.93,0,'A盈亏%:'),COLOR00CCCC;
DRAWNUMBER_FIX(1,0.19,0.93,0,CONST(A盈亏%)),COLORLICYAN;
DRAWTEXT_FIX (1,0.24,0.93,0,'A止赢5%:'),COLOR00CCCC;
DRAWNUMBER_FIX(1,0.3,0.93,0,CONST(A止赢5%)),COLORLICYAN;
DRAWTEXT_FIX (1,0.342,0.93,0,'A止损2%:'),COLOR00CCCC;
DRAWNUMBER_FIX(1,0.4,0.93,0,CONST(A止损2%)),COLORLICYAN;
DRAWTEXT_FIX (1,0.44,0.93,0,'B买价:'),COLOR00CCCC;
DRAWNUMBER_FIX(1,0.48,0.93,0,CONST(B买价)),COLORLICYAN;
DRAWTEXT_FIX (1,0.52,0.93,0,'B盈亏%:'),COLOR00CCCC;
DRAWNUMBER_FIX(1,0.57,0.93,0,CONST(B盈亏%)),COLORLICYAN;
DRAWTEXT_FIX (1,0.61,0.93,0,'B止赢5%:'),COLOR00CCCC;
DRAWNUMBER_FIX(1,0.67,0.93,0,CONST(B止赢5%)),COLORLICYAN;
DRAWTEXT_FIX (1,0.71,0.93,0,'B止损2%:'),COLOR00CCCC;
DRAWNUMBER_FIX(1,0.77,0.93,0,CONST(B止损2%)),COLORLICYAN;
{股本概况}
总股本:=STRCAT(STRCAT('总股本: ',CON2STR(TOTALCAPITAL/1000000,2)),'亿');
流通盘:=STRCAT(STRCAT(' 流通盘: ',CON2STR(CAPITAL/1000000,2)),'亿');
全流通:=STRCAT(' 全流通: ',CON2STR((CAPITAL/1000000)/(TOTALCAPITAL/1000000),2));
市值:=STRCAT(STRCAT(' 流通市值: ',CON2STR((CAPITAL/1000000)*C,2)),'亿');上市日期:=STRCAT(' 上市日期: ',CON2STR(HHV((BARSCOUNT(C)=0)*(DATE+19000000),0),0));
大盘:=STRCAT('大盘: ',CON2STR(FINANCE(7)>1000000000,0));
中盘:=STRCAT('中盘: ',CON2STR(FINANCE(7)<1000000000 AND FINANCE(7)>100000000,0));
小盘:=STRCAT('小盘: ',CON2STR(FINANCE(7)<100000000,0));
盘小绩优:=STRCAT('盘小绩优: ',CON2STR(FINANCE(7)<1000000000 AND DYNAINFO(39)>0 AND DYNAINFO(39)<=28,0));
股本概况:=STRCAT('股本概况: ',STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(流通盘,市值),全流通),大盘),中盘),小盘),盘小绩优),上市日期));{财务系数}
每股收益:=STRCAT(' 每股收益: ',CON2STR(FINANCE(33),2));
市盈率:=STRCAT('市盈率: ',CON2STR(C/FINANCE(33),2));
市净率:=STRCAT(' 市净率: ',CON2STR(C/FINANCE(34),2));
现金流:=STRCAT(' 现金流: ',CON2STR(FINANCE(25)/1000000000,2));
流动比率:=STRCAT(' 流动比率: ',CON2STR(FINANCE(11)/FINANCE(15),2));{流动比率值>1.5<2.5较为合理,低于1说明偿债能力欠佳。}
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容