您现在的位置:主页 > 聚焦 >

通达信公式写字

更新时间:2021-11-02 21:08:35

  如何美观地在通达信主图上写字和数字

  这个可以利用通达信DRAWTEXT_FIX函数解决,也可以参考这个文章

  网页

   通达信公式 怎么写

   D1:=V/REF(V,1);
D2:=C/REF(C,1);
A1:=D1>1.15 AND D2>1.018;
TS0:=BARSLAST(A1);
DJ:IF(A1,LLV(L,2),DRAWNULL);
DRAWLINE(A1,DJ,TS0=3,REF(DJ,TS0),0);
画线方式:主图叠加 怎样编写通达信公式

  可以编写,但你也没说买入条件,也没有计算价格。所以只能出一个大概示意图。

  例如下图上穿20日线日内再次发上穿就不再发出买入提示。

  涨到1.2倍或者达到20个交易日哪个先满足就卖出提示。

  效果如下图

  买进红色字,1.2倍卖出黄色字,20个交易日卖出绿色字。

  

 

   这是通达信公式,请高手在画横线的右边上面加字。

   量能平台
DA1:=IF(130>TOTALBARSCOUNT,TOTALBARSCOUNT,130);
DA:=IF(CURRBARSCOUNT>DA1,0,DA1);
HI:=REFDATE(HHV(H,DA),DATE);
LO:=REFDATE(LLV(L,DA),DATE);
C1:=IF(CURRBARSCOUNT<=DA,C,DRAWNULL);
GZ:=EXP(LN(HI/LO)/10);
LH1:=SUM(IF(C1>=(HI/GZ),V,0),DA);
LH2:=SUM(IF(C1>=(HI/POW(GZ,2)) AND C1<(HI/GZ),V,0),DA);
LH3:=SUM(IF(C1>=(HI/POW(GZ,3)) AND C1<(HI/POW(GZ,2)),V,0),DA);
LH4:=SUM(IF(C1>=(HI/POW(GZ,4)) AND C1<(HI/POW(GZ,3)),V,0),DA);
LH5:=SUM(IF(C1>=(HI/POW(GZ,5)) AND C1<(HI/POW(GZ,4)),V,0),DA);
LH6:=SUM(IF(C1>=(HI/POW(GZ,6)) AND C1<(HI/POW(GZ,5)),V,0),DA);
LH7:=SUM(IF(C1>=(HI/POW(GZ,7)) AND C1<(HI/POW(GZ,6)),V,0),DA);
LH8:=SUM(IF(C1>=(HI/POW(GZ,8)) AND C1<(HI/POW(GZ,7)),V,0),DA);
LH9:=SUM(IF(C1>=(LO*GZ) AND C1<LO*POW(GZ,2),V,0),DA);
LH10:=SUM(IF(C1>=LO AND C1<LO*GZ,V,0),DA);
L1:=REFDATE(HHV(LH1,DA),DATE);
L2:=REFDATE(HHV(LH2,DA),DATE);
L3:=REFDATE(HHV(LH3,DA),DATE);
L4:=REFDATE(HHV(LH4,DA),DATE);
L5:=REFDATE(HHV(LH5,DA),DATE);
L6:=REFDATE(HHV(LH6,DA),DATE);
L7:=REFDATE(HHV(LH7,DA),DATE);
L8:=REFDATE(HHV(LH8,DA),DATE);
L9:=REFDATE(HHV(LH9,DA),DATE);
L10:=REFDATE(HHV(LH10,DA),DATE);
SS:=(L1+L2+L3+L4+L5+L6+L7+L8+L9+L10);
STICKLINE(CEILING(DA*L1/SS)*3>=CURRBARSCOUNT,HI*99/100,HI/GZ,9,0),
,COLOR600030,LINETHICK3;
STICKLINE(CEILING(DA*L2/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,1)*99/100
,HI/POW(GZ,2),9,0),COLOR36361B,LINETHICK3;
STICKLINE(CEILING(DA*L3/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,2)*99/100
,HI/POW(GZ,3),9,0),COLOR001339,LINETHICK3;
STICKLINE(CEILING(DA*L4/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,3)*99/100
,HI/POW(GZ,4),9,0),COLOR5E5E5E,LINETHICK3;
STICKLINE(CEILING(DA*L5/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,4)*99/100
,HI/POW(GZ,5),9,0),COLOR005151,LINETHICK3;
STICKLINE(CEILING(DA*L6/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,5)*99/100
,HI/POW(GZ,6),9,0),COLOR5E5E5E,LINETHICK3;
STICKLINE(CEILING(DA*L7/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,6)*99/100
,HI/POW(GZ,7),9,0),COLOR005151;
STICKLINE(CEILING(DA*L8/SS)*3>=CURRBARSCOUNT,LO*POW(GZ,2),LO*POW(GZ,3)
*99/100,9,0),COLOR001339,LINETHICK3;
STICKLINE(CEILING(DA*L9/SS)*3>=CURRBARSCOUNT,LO*POW(GZ,1),LO*POW(GZ,2)
*99/100,9,0),COLOR36361B,LINETHICK3;
STICKLINE(CEILING(DA*L10/SS)*3>=CURRBARSCOUNT,LO,LO*POW(GZ,1)*99/100,9,0)
,COLOR600030,LINETHICK3;
DRAWKLINE(H,O,L,C);
DRAWKLINE(H,O,L,C);
DRAWTEXT(CURRBARSCOUNT=98,LOW*0.88,☆压力越大暗条越长,做多越短越好★),COLORYELLOW;
N:=10;
T1:=CONST(HHVBARS(V,10)),COLOR0000FF,LINETHICK1;
量能平台:IF(CURRBARSCOUNT<=N+15,CONST(IF(T1=0,C,REF(C,T1))),DRAWNULL),COLOR4080FF,LINETHICK3;
新量能点:IF(CURRBARSCOUNT=T1+1,量能平台,DRAWNULL),CIRCLEDOT,COLORFFFFFF,LINETHICK9;
DRAWTEXT(ISLASTBAR,量能平台, 量能平台),COLOR00F0F0;
JJ:=(CLOSE+HIGH+LOW)/3;
A:=EMA(JJ,10);
B:=REF(A,1);
持股区域:STICKLINE(A>B,A,B,2,0),COLORYELLOW;
持币区域:STICKLINE(A<B,A,B,2,0),COLORBLUE;
VAR1:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR2:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
DIR1:=ABS(CLOSE-REF(CLOSE,5));
VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);
ER1:=DIR1/VIR1;
CS1:=ER1*(0.8-2/8)+2/8;
CQ1:=CS1*CS1;
DIR2:=ABS(CLOSE-REF(CLOSE,10));
VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);
ER2:=DIR2/VIR2;
CS2:=ER2*(0.8-2/24)+2/24;
CQ2:=CS2*CS2;
STICKLINE(VAR2 < MA(VAR3,6),LOW,HIGH,0,1),COLORLIBLUE;
STICKLINE(VAR2 > MA(VAR3,6),LOW,HIGH,0,1),COLORRED;
STICKLINE(((OPEN>CLOSE)AND(VAR2<MA(VAR3,6))),(CLOSE-0.03),OPEN,3.05,0),COLORLIBLUE;
STICKLINE(((OPEN<CLOSE)AND(VAR2<MA(VAR3,6))),CLOSE,OPEN,3.05,1),COLORLIBLUE;
STICKLINE(((OPEN>CLOSE)AND(VAR2>MA(VAR3,6))),OPEN,(CLOSE-0.03),3.05,0),COLORRED;
STICKLINE(((OPEN<CLOSE)AND(VAR2>MA(VAR3,6))),OPEN,CLOSE,3.05,1),COLORRED;
DRAWICON(CROSS(VAR2,MA(VAR3,6)),(LOW - (LOW*0.01)),23);
DRAWICON(CROSS(MA(VAR3,6),VAR1),(HIGH+(HIGH*0.01)),15);
PT:=REF(H,1)-REF(L,1);
CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;
AH:=CDP+PT;
AL:=CDP-PT;
NH:=CDP*2-REF(L,1);
NL:=CDP*2-REF(H,1);
强:IF(AH>REF(C,1)*1.1,REF(C,1)*1.1,AH)NODRAW;
阻:IF(NH>强,(强-CDP)*0.618+CDP,NH)NODRAW,COLORBLUE;
M:=IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL);
撑:IF(NL<M,CDP-(CDP-M)*0.618,NL)NODRAW;
底:IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL)NODRAW;
你要的出现黄色柱为选股:
MA135:=MA(VOL,135);
CROSS(VOL,MA135); 8月份哪些板块最有可能会诞生翻倍大牛股

   由于内循环信号的传递,新基建、5G技术等板块有可能会吸引大量的资金,出现利好的局面。不过投资需要谨慎,避免出现巨大的损失。 老师 这个只是个指标吧能做选股吗 把最近一两天出现 “锁定牛股” “大牛股”,选出来

   你是要把他修改成选股指标么给你修改成选股指标了,去选吧。
M5:=EMA(C,8);
M6:=EMA(C,13);
M7:=MA(C,78);
M8:=EMA(M7,3);
M9:=EMA(M8,3);
M11:=EMA(M9,3);
MA47:=EMA(CLOSE,46);
MA60:=EMA(CLOSE,60);
Y:=(H+L)/2;
AO:=MA(Y,5)-MA(Y,34 );
DU0:=CROSS(AO,0);
UD0:=CROSS(0,AO);
TDU0:=BARSLAST(DU0);
TUD0:=BARSLAST(UD0);
DU3:=REF(DU0,1);
UD3:=REF(UD0,1);
TDU3:=BARSLAST(DU3);
TUD3:=BARSLAST(UD3);
UDGLINE:=IF(TDU3<TUD3,REF(HHV(H,2),TDU3),REF(LLV(L,2),TUD3));
JDU0:=REF(C,1)<=REF(UDGLINE,1) AND C>UDGLINE AND TDU0<TUD0;
JUD0:=REF(C,1)>=REF(UDGLINE,1) AND C<UDGLINE AND TUD0<TDU0;
JDU1:=JDU0 AND COUNT(JDU0,TDU0)=1;
JUD1:=JUD0 AND COUNT(JUD0,TUD0)=1;
JDU2:=JDU1 AND REF(BARSLAST(JUD1),1)<REF(BARSLAST(JDU1),1);
JUD2:=JUD1 AND REF(BARSLAST(JUD1),1)>REF(BARSLAST(JDU1),1);
JDU3:=JDU1 AND REF(BARSLAST(JUD1),1)>REF(BARSLAST(JDU1),1);
JUD3:=JUD1 AND REF(BARSLAST(JUD1),1)<REF(BARSLAST(JDU1),1);
JJJ:=CROSS(M6,M9);
XG:JDU2 OR JJJ;
这个是综合指标,会把大牛股和锁定牛股同时选出来。选一次即可。