通达信趋势买卖副图指标源码源码
N:=20;
VAR1:VOL/REF(VOL,1)*100,NODRAW ;
6;50;100;15;30;
获利盘:EMA(WINNER(C)*100,20);
近邻筹码:EMA((WINNER(C*POW(1.1,0.75))*100-WINNER(C*POW(1.1,-0.75))*100),20);
VAR6:EMA((获利盘-近邻筹码),10),COLORFFFFFF,LINETHICK2;
VAR7:EMA((获利盘-近邻筹码),5),LINETHICK1;
AA:=IF(VAR6>=N,VAR6,N);
QSSJ:=BARSLAST(COUNT(VAR6>=N,2)=2);
VAR10:=IF(QSSJ<=3 AND COUNT(VAR6<REF(VAR6,1),2)=2,-10,N);
STICKLINE(AA>N AND AA>REF(AA,1),N,AA,2,0),COLOR0000FF;
STICKLINE(AA>N AND AA<REF(AA,1),N,AA,2,0),COLORFFFF00;
IF(AA>=REF(AA,1),AA,DRAWNULL),COLORRED,LINETHICK2;
IF(AA<=REF(AA,1),AA,DRAWNULL),COLORFFFF00,LINETHICK2;
IF(AA=REF(AA,1),AA,DRAWNULL),COLOR00FFFF,LINETHICK2;
XUANGU:VAR1>270 AND C>=OPEN AND C>REF(C,1);
DRAWICON(XUANGU,VAR6,1);
VAR18:=获利盘>REF(获利盘,1);
STICKLINE(VAR18,-2,0,2,0),COLORFFFF00;
未来函数检测结果如下:
该公式包含未来函数:WINNER
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
N赋值:20
输出VAR1:成交量/1日前的成交量*100,NODRAW
6
50
100
15
30
输出获利盘:EMA(C计算的获利盘比例*100,20)
输出近邻筹码:EMA((C*POW(1.1,0.75计算的获利盘比例)*100-WINNER(C*POW(1.1,-0.75))*100),20)
输出VAR6:EMA((获利盘-近邻筹码),10),COLORFFFFFF,LINETHICK2
输出VAR7:EMA((获利盘-近邻筹码),5),LINETHICK1
如果VAR6>=N返回VAR6否则返回N
QSSJ赋值:上次统计2日满足VAR6>=N的天数=2距今天数
VAR10:=IF(QSSJ<=3 AND COUNT(VAR6<1日前的VAR6,2)=2,-10,N)
STICKLINE(AA>N AND AA>1日前的AA,N,AA,2,0),COLOR0000FF
STICKLINE(AA>N AND AA<1日前的AA,N,AA,2,0),COLORFFFF00
IF(AA>=1日前的AA,AA,DRAWNULL),画红色,LINETHICK2
IF(AA<=1日前的AA,AA,DRAWNULL),COLORFFFF00,LINETHICK2
IF(AA=1日前的AA,AA,DRAWNULL),COLOR00FFFF,LINETHICK2
XUANGU:VAR1>270 AND C>=OPEN AND C>1日前的C
当满足条件XUANGU时,在VAR6和1之间画图标
VAR18:=获利盘>1日前的获利盘
当满足条件VAR18时,在-2和0之间画柱状线