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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信多空通道加九转序列(源码主图贴图)


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

以下是通达信多空通道加九转序列(源码主图贴图)

以下的源码,有乱码,,不能通过测试,,请下载公式导入吧

DRAWTEXT_FIX(1,0.01,0.01,0,'【★★仓位控制的量化标准★★】'),COLORMAGENTA;

DRAWTEXT_FIX(1,0.01,0.08,0,'【★★1、粉+红=满,2、粉+绿=6,3、蓝+红=4 ,4、蓝+绿=空★★】'),COLORYELLOW;

E1:=EXPMA(C,5);

E2:=EXPMA(C,10);

E3:=EXPMA(C,20);

E4:=EXPMA(C,30);

E5:=EXPMA(C,60);

VARE1:=(E1+E2+E3+E4)/4;

VARE2:=(E1+E2+E3+E5)/4;

N:=IF(CODELIKE('9999')OR CODELIKE('3990')OR CODELIKE('880')OR CODELIKE('0000'),1,0);

D1:=IF(N=1,0.013,0.03);

D2:=IF(N=1,0.018,0.03);

C1:=IF(N=1,0.015,0.03);

C2:=IF(N=1,0.015,0.03);

短线多:EXPMA(VARE1,5)+EXPMA(VARE1,5)*D1,COLORRED;

短线空:EXPMA(VARE1,5)-EXPMA(VARE1,5)*D2,COLORRED;

长线多:EXPMA(VARE2,70)+EXPMA(VARE2,70)*C1,COLORMAGENTA;

长线空:EXPMA(VARE2,70)-EXPMA(VARE2,70)*C2,COLORMAGENTA;

{DRAWKLINE(H,O,L,C);}

TJ1:=RANGE(C,短线空,短线多);

TJ2:=RANGE(C,长线空,长线多);

STICKLINE(短线多>REF(短线多,1) AND TJ1=0,短线多,短线空,0.1,1),COLORRED;

STICKLINE(短线多<REF(短线多,1) AND TJ1=0,短线多,短线空,0.1,1),COLORGREEN;

STICKLINE(长线多>REF(长线多,1) AND TJ2=0,长线多,长线空,0.1,1),COLORMAGENTA;

STICKLINE(长线多<REF(长线多,1) AND TJ2=0,长线多,长线空,0.1,1),COLORBLUE;

NOTEXT短线多:IF(短线多<REF(短线多,1),短线多,DRAWNULL),COLORGREEN;

NOTEXT短线空:IF(短线空<REF(短线空,1),短线空,DRAWNULL),COLORGREEN;

NOTEXT长线多:IF(长线多<REF(长线多,1),长线多,DRAWNULL),COLORBLUE;

NOTEXT长线空:IF(长线空<REF(长线空,1),长线空,DRAWNULL),COLORBLUE;

空:=REF(C,1)>REF(短线空,1) AND C<短线空 AND C<REF(C,1){ AND COUNT(C>短线多,5)>0};

多:=REF(C,1)<REF(短线多,1) AND C>短线多 AND C>REF(C,1){ AND COUNT(C<长线多,5)>0};

空1:=TFILTER(多,空,2);

多1:=TFILTER(多,空,1);

DRAWTEXT(空1,短线多*1.04,'空'),COLORGREEN;

DRAWTEXT(多1,短线空*0.96,'多'),COLORRED;

DRAWICON(空1,短线多*1.02,2);

DRAWICON(多1,短线空*0.98,1);

A1:=C>REF(C,4);

A2:=BARSLASTCOUNT(A1);

A3:=REF(A2,1)=8 AND A2>REF(A2,1);

A4:=REF(BETWEEN(A2,5,8),1) AND A2<REF(A2,1);

A5:=ISLASTBAR AND BETWEEN(A2,6,8);

A6:=(BACKSET(A3>0,9) OR BACKSET(A4>0,A2+1)*0 OR BACKSET(A5>0,A2))*A2;

DRAWTEXT(A6>0,H+H*0.02,VAR2STR(A6,0)),COLORFF00FF{COLOR00FFFF};

DRAWTEXT(A2=9,H+H*0.02,'9'),COLOR00FF00;

B1:=C<REF(C,4);

B2:=BARSLASTCOUNT(B1);

B3:=REF(B2,1)=8 AND B2>REF(B2,1);

B4:=REF(BETWEEN(B2,5,8),1) AND B2<REF(B2,1);

B5:=ISLASTBAR AND BETWEEN(B2,6,8);

B6:=(BACKSET(B3>0,9) OR BACKSET(B4>0,B2+1)*0 OR BACKSET(B5>0,B2))*B2;

DRAWTEXT(B6>0,L-L*0.02,VAR2STR(B6,0)),COLOR00FF00{COLORFFFFFF};

DRAWTEXT(B2=9,L-L*0.02,'9'),COLORFF00FF;





回复

举报

QQ|

GMT+8, 2024-11-18 05:55

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