股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信交易护驾主图公式


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2023-10-9 15:16:53

以下是通达信交易护驾主图公式

通达信交易护驾主图公式

源码

{【交易护驾】-- 作者:AHFYXL----保密级别**}
DRAWGBK((DATE > 0),COLORRGB(0,33,0),COLORRGB(0,33,0),1);

Z_1:=C-REF(C,1);
空头:EMA(EMA(Z_1,6),6)/EMA(EMA(ABS(Z_1),6),6)*20,LINETHICK,PRECISION2,Color00FF00;
多头:(空头*2-FORCAST(空头,9)),LINETHICK,PRECISION2,ColorFF59FF;
{警报}
RSV:=(C-LLV(L,3))/(HHV(H,3)-LLV(L,3))*100;
K:=SMA(RSV,2,1); D:=SMA(K,2,1); J:=3*K-2*D;
引力:SMA(J,2,1)-SMA(J,3,1),LINETHICK,PRECISION2,COLORGRAY;
Jj_1:=VALUEWHEN(多头<=空头,多头); Jj_2:=VALUEWHEN(多头>空头,空头);
K1:=IF(多头>空头,1,IF(多头<空头,-1,0)); K2:=VALUEWHEN(K1<>0,K1);
警报:IF(K2>0,Jj_1,Jj_2),LINETHICK,PRECISION2,Color00B4FF;
{近台比}
Jt_b1:=(O+L+H+C*3)/6; Jt_b2:=REVERSE(Jt_b1)+2*WMA(Jt_b1,5); Jt_b3:=3*Jt_b2-2*SMA(Jt_b2,2,1);
Jt_b4:=VALUEWHEN(BARSLAST(C>Jt_b3),Jt_b3); Jt_b5:=VALUEWHEN(BARSLAST(C<=Jt_b3),Jt_b3); Jt_b6:=IF(C<=Jt_b3,Jt_b4,Jt_b5);
近台比:=(C-Jt_b6)/Jt_b6*100; A5:=近台比[SYSPARAM(1)]; RA5:=近台比[SYSPARAM(1)-1]; jt5:=if(A5>RA5,'↑','↓');

{-----------------【图解模板】---------------------}
{}
PARTLINE(C,警报),Color00B4FF;
FILLRGN(空头>多头,空头,多头),Color005800;
FILLRGN(空头<=多头,空头,多头),Color000078;
引力,PRECISION2,COLORSTICK,COLORBLACK;
{画各线}
PARTLINE(C,空头),Color00FF00;
PARTLINE(C,多头),ColorFF59FF;
{}
DRAWTEXTEX(C,1,872,0,'近台比: '+NUMTOSTR(近台比[SYSPARAM(1)],2)+jt5),COLORYELLOW;
XTEX23

【交易护驾】通达信版 ; 作者:壹瓣杺埖
Z_1:=C-REF(C,1);
空:=EMA(EMA(Z_1,6),6)/EMA(EMA(ABS(Z_1),6),6)*20,LINETHICK0,COLOR00FF00;
多:=(空*2-FORCAST(空,9)),LINETHICK0,COLORFF59FF;
{警报}
J1:=IF(多<=空,多,DRAWNULL);
J2:=IF(多<=空,多,REF(J1,1));
J3:=IF(多<=空,多,REF(J2,1));
J4:=IF(多<=空,多,REF(J3,1));
J5:=IF(多<=空,多,REF(J4,1));
J6:=IF(多<=空,多,REF(J5,1));
J7:=IF(多<=空,多,REF(J6,1));
J8:=IF(多<=空,多,REF(J7,1));
J9:=IF(多<=空,多,REF(J8,1));
J10:=IF(多<=空,多,REF(J9,1));
J11:=IF(多<=空,多,REF(J10,1));
J12:=IF(多<=空,多,REF(J11,1));
J13:=IF(多<=空,多,REF(J12,1));
J14:=IF(多<=空,多,REF(J13,1));
J15:=IF(多<=空,多,REF(J14,1));
JJ_1:=IF(多<=空,多,REF(J15,1));

JJ1:=IF(多>空,空,DRAWNULL);
JJ2:=IF(多>空,空,REF(JJ1,1));
JJ3:=IF(多>空,空,REF(JJ2,1));
JJ4:=IF(多>空,空,REF(JJ3,1));
JJ5:=IF(多>空,空,REF(JJ4,1));
JJ6:=IF(多>空,空,REF(JJ5,1));
JJ7:=IF(多>空,空,REF(JJ6,1));
JJ8:=IF(多>空,空,REF(JJ7,1));
JJ9:=IF(多>空,空,REF(JJ8,1));
JJ10:=IF(多>空,空,REF(JJ9,1));
JJ11:=IF(多>空,空,REF(JJ10,1));
JJ12:=IF(多>空,空,REF(JJ11,1));
JJ13:=IF(多>空,空,REF(JJ12,1));
JJ14:=IF(多>空,空,REF(JJ13,1));
JJ15:=IF(多>空,空,REF(JJ14,1));
JJ_2:=IF(多>空,空,REF(JJ15,1));

K1:=IF(多>空,1,IF(多<空,-1,0));
KJ1:=IF(K1!=0,K1,DRAWNULL);
KJ2:=IF(K1!=0,K1,REF(KJ1,1));
KJ3:=IF(K1!=0,K1,REF(KJ2,1));
KJ4:=IF(K1!=0,K1,REF(KJ3,1));
KJ5:=IF(K1!=0,K1,REF(KJ4,1));
KJ6:=IF(K1!=0,K1,REF(KJ5,1));
KJ7:=IF(K1!=0,K1,REF(KJ6,1));
KJ8:=IF(K1!=0,K1,REF(KJ7,1));
KJ9:=IF(K1!=0,K1,REF(KJ8,1));
KJ10:=IF(K1!=0,K1,REF(KJ9,1));
KJ11:=IF(K1!=0,K1,REF(KJ10,1));
KJ12:=IF(K1!=0,K1,REF(KJ11,1));
KJ13:=IF(K1!=0,K1,REF(KJ12,1));
KJ14:=IF(K1!=0,K1,REF(KJ13,1));
KJ15:=IF(K1!=0,K1,REF(KJ14,1));
K2:=IF(K1!=0,K1,REF(KJ15,1));
警报:IF(K2>0,JJ_1,JJ_2),COLOR00B4FF;

{-----------------【图解模板】---------------------}
DRAWBAND(空,RGB(0,158,0),多,RGB(180,0,0));
RSV:=(C-LLV(L,3))/(HHV(H,3)-LLV(L,3))*100;
K:=SMA(RSV,2,1); D:=SMA(K,2,1); J:=3*K-2*D;
引力:SMA(J,2,1)-SMA(J,3,1),COLORSTICK;
{画各线}
空头:空,COLOR00FF00;
多头:多,COLORFF59FF;

{近台比}
JT_B1:=(O+L+H+C*3)/6;
WMA:=(5*JT_B1+4*REF(JT_B1,1)+3*REF(JT_B1,2)+2*REF(JT_B1,3)+1*REF(JT_B1,4))/(5+4+3+2+1);
JT_B2:=REVERSE(JT_B1)+2*WMA;
JT_B3:=3*JT_B2-2*SMA(JT_B2,2,1);
JTB4:=IF(BARSLAST(C>JT_B3),JT_B3,DRAWNULL);
JT_B4:=IF(BARSLAST(C>JT_B3),JT_B3,REF(JTB4,1));
JTB5:=IF(BARSLAST(C<=JT_B3),JT_B3,DRAWNULL);
JT_B5:=IF(BARSLAST(C<=JT_B3),JT_B3,REF(JTB5,1));
JT_B6:=IF(C<=JT_B3,JT_B4,JT_B5);
近台比:(C-JT_B6)/JT_B6*100,NODRAW,COLORYELLOW;





回复

举报

QQ|

GMT+8, 2024-11-19 22:46

快速回复 返回顶部 返回列表