软件名称:[B]突破趋势线指标(源码 主图 通达信 贴图)[/B]
软件类型:国产软件
运行环境:Win9X/Win2000/WinXP/Win2003/Win7/
软件语言:简体中文
授权方式:免费版
软件大小:3.00 KB
官方主页:Home Page
更新时间:2017-07-23 02:13:57
软件简介:
主图指标源码奉上~看看有没有高人能够做出选股公式出来~~
要求就是当日股价突破上方红色趋势线发出信号~~~
源码:
{连结MACD相邻红绿柱区间内高低点画趋势线 通达信}
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
N1:=BARSLAST(CROSS(DIFF,DEA))+1;{最近一次满足条件DIFF上穿DEA的K线到当前的距离}
N2:=BARSLAST(CROSS(DEA,DIFF))+1;{最近一次满足条件DIFF下穿DEA的K线到当前的距离}
{当前是DIFF>DEA的状态,连结最近两个DIFF>DEA区间(不包含当前区间)内最高点的趋势线}
A1:=BACKSET(ISLASTBAR && N1<N2,REF(REF(HHVBARS(H,N1)+1,N2),N2)+REF(N2,N2)+N2);
B1:=BACKSET(ISLASTBAR && N1<N2,REF(HHVBARS(H,N1),N2)+N2+1);
DRAWLINE(CROSS(A1,0.5),H,CROSS(B1,0.5),H,1),COLORRED;
{当前是DIFF>DEA的状态,连结最近两个DIFF<DEA区间内最低点的趋势线}
A2:=BACKSET(ISLASTBAR && N1<N2,REF(REF(LLVBARS(L,N2)+1,N1),N2)+REF(N1,N2)+N2);
B2:=BACKSET(ISLASTBAR && N1<N2,REF(LLVBARS(L,N2)+1,N1)+N1);
DRAWLINE(CROSS(A2,0.5),L,CROSS(B2,0.5),L,1),COLORGREEN;
{当前是DIFF<DEA的状态,连结最近两个DIFF<DEA区间(不包含当前区间)内最低点的趋势线}
A3:=BACKSET(ISLASTBAR && N1>N2,REF(REF(LLVBARS(L,N2)+1,N1),N1)+REF(N1,N1)+N1);
B3:=BACKSET(ISLASTBAR && N1>N2,REF(LLVBARS(L,N2),N1)+N1+1);
DRAWLINE(CROSS(A3,0.5),L,CROSS(B3,0.5),L,1),COLORGREEN;
{当前是DIFF<DEA的状态,连结最近两个DIFF>DEA区间内最高点的趋势线}
A4:=BACKSET(ISLASTBAR && N1>N2,REF(REF(HHVBARS(H,N1)+1,N2),N1)+REF(N2,N1)+N1);
B4:=BACKSET(ISLASTBAR && N1>N2,REF(HHVBARS(H,N1)+1,N2)+N2);
DRAWLINE(CROSS(A4,0.5),H,CROSS(B4,0.5),H,1),COLORRED;
{原文链接:http://www.55188.com/thread-8052376-1-1.html} 主图指标源码奉上~看看有没有高人能够做出选股公式出来~~
要求就是当日股价突破上方红色趋势线发出信号~~~
源码:
{连结MACD相邻红绿柱区间内高低点画趋势线 通达信}
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
N1:=BARSLAST(CROSS(DIFF,DEA))+1;{最近一次满足条件DIFF上穿DEA的K线到当前的距离}
N2:=BARSLAST(CROSS(DEA,DIFF))+1;{最近一次满足条件DIFF下穿DEA的K线到当前的距离}
{当前是DIFF>DEA的状态,连结最近两个DIFF>DEA区间(不包含当前区间)内最高点的趋势线}
A1:=BACKSET(ISLASTBAR && N1<N2,REF(REF(HHVBARS(H,N1)+1,N2),N2)+REF(N2,N2)+N2);
B1:=BACKSET(ISLASTBAR && N1<N2,REF(HHVBARS(H,N1),N2)+N2+1);
DRAWLINE(CROSS(A1,0.5),H,CROSS(B1,0.5),H,1),COLORRED;
{当前是DIFF>DEA的状态,连结最近两个DIFF<DEA区间内最低点的趋势线}
A2:=BACKSET(ISLASTBAR && N1<N2,REF(REF(LLVBARS(L,N2)+1,N1),N2)+REF(N1,N2)+N2);
B2:=BACKSET(ISLASTBAR && N1<N2,REF(LLVBARS(L,N2)+1,N1)+N1);
DRAWLINE(CROSS(A2,0.5),L,CROSS(B2,0.5),L,1),COLORGREEN;
{当前是DIFF<DEA的状态,连结最近两个DIFF<DEA区间(不包含当前区间)内最低点的趋势线}
A3:=BACKSET(ISLASTBAR && N1>N2,REF(REF(LLVBARS(L,N2)+1,N1),N1)+REF(N1,N1)+N1);
B3:=BACKSET(ISLASTBAR && N1>N2,REF(LLVBARS(L,N2),N1)+N1+1);
DRAWLINE(CROSS(A3,0.5),L,CROSS(B3,0.5),L,1),COLORGREEN;
{当前是DIFF<DEA的状态,连结最近两个DIFF>DEA区间内最高点的趋势线}
A4:=BACKSET(ISLASTBAR && N1>N2,REF(REF(HHVBARS(H,N1)+1,N2),N1)+REF(N2,N1)+N1);
B4:=BACKSET(ISLASTBAR && N1>N2,REF(HHVBARS(H,N1)+1,N2)+N2);
DRAWLINE(CROSS(A4,0.5),H,CROSS(B4,0.5),H,1),COLORRED;
[url=http://www.70822.com/soft/sort013/sort05/down-114239.html]突破趋势线指标(源码 主图 通达信 贴图)[/url]