当前位置:分析家公式网 → 股票公式 → 同花顺公式 → 一键转帖:均线动量轮动(同花顺公式 副图 源码 测试图)
软件名称:[B]均线动量轮动(同花顺公式 副图 源码 测试图)[/B]
软件类型:国产软件
运行环境:Win10/Win9X/Win8/Win2000/WinXP/Win2003/Win7/
软件语言:简体中文
授权方式:免费版
软件大小:5.00 KB
官方主页:Home Page
更新时间:2023-01-22 00:05:23
软件简介:
均线动量轮动
源码
/*最强指数*/
A1:=(INDEXDATA("1B0300",&CLOSE)/INDEXDATA("1B0300",&CLOSE,20)-1)*100;
A2:=(INDEXDATA("1B0852",&CLOSE)/INDEXDATA("1B0852",&CLOSE,20)-1)*100;
A3:=(INDEXDATA("399673",&CLOSE)/INDEXDATA("399673",&CLOSE,20)-1)*100;
A4:=(INDEXDATA("518880",&CLOSE)/INDEXDATA("518880",&CLOSE,20)-1)*100;
A5:=(INDEXDATA("513100",&CLOSE)/INDEXDATA("513100",&CLOSE,20)-1)*100;
A6:=(INDEXDATA("399303",&CLOSE)/INDEXDATA("399303",&CLOSE,20)-1)*100;
A7:=(INDEXDATA("513030",&CLOSE)/INDEXDATA("513030",&CLOSE,20)-1)*100;
A8:=(INDEXDATA("513500",&CLOSE)/INDEXDATA("513500",&CLOSE,20)-1)*100;
best:=MAX(A1,MAX(A2,MAX(A3,MAX(A4,MAX(A5,MAX(A6,MAX(A7,A8)))))));
最强简称:IF(best=A1,"沪深300",
IF(best=A2,"中证1000",
IF(best=A3,"创业板50",
IF(best=A4,"黄金ETF",
IF(best=A5,"纳指ETF",
IF(best=A6,"国证2000",
IF(best=A7,"德国ETF","标普500ETF"
)))))));
/*均线动量*/
三日均线差:=IF(best=A1,MA(INDEXDATA("1B0300",&CLOSE),N)/MA(INDEXDATA("1B0300",&CLOSE),M),
IF(best=A2,MA(INDEXDATA("1B0852",&CLOSE),N)/MA(INDEXDATA("1B0852",&CLOSE),M),
IF(best=A3,MA(INDEXDATA("399673",&CLOSE),N)/MA(INDEXDATA("399673",&CLOSE),M),
IF(best=A4,MA(INDEXDATA("518880",&CLOSE),N)/MA(INDEXDATA("518880",&CLOSE),M),
IF(best=A5,MA(INDEXDATA("513100",&CLOSE),N)/MA(INDEXDATA("513100",&CLOSE),M),
IF(best=A6,MA(INDEXDATA("399303",&CLOSE),N)/MA(INDEXDATA("399303",&CLOSE),M),
IF(best=A7,MA(INDEXDATA("513030",&CLOSE),N)/MA(INDEXDATA("513030",&CLOSE),M),MA(INDEXDATA("513500",&CLOSE),N)/MA(INDEXDATA("513500",&CLOSE),M)
)))))));
三日均线比:(三日均线差-1)*100;
五日均线差:=IF(best=A1,MA(INDEXDATA("1B0300",&CLOSE),X)/MA(INDEXDATA("1B0300",&CLOSE),M),
IF(best=A2,MA(INDEXDATA("1B0852",&CLOSE),X)/MA(INDEXDATA("1B0852",&CLOSE),M),
IF(best=A3,MA(INDEXDATA("399673",&CLOSE),X)/MA(INDEXDATA("399673",&CLOSE),M),
IF(best=A4,MA(INDEXDATA("518880",&CLOSE),X)/MA(INDEXDATA("518880",&CLOSE),M),
IF(best=A5,MA(INDEXDATA("513100",&CLOSE),X)/MA(INDEXDATA("513100",&CLOSE),M),
IF(best=A6,MA(INDEXDATA("399303",&CLOSE),X)/MA(INDEXDATA("399303",&CLOSE),M),
IF(best=A7,MA(INDEXDATA("513030",&CLOSE),X)/MA(INDEXDATA("513030",&CLOSE),M),MA(INDEXDATA("513500",&CLOSE),X)/MA(INDEXDATA("513500",&CLOSE),M)
)))))));
五日均线比:(五日均线差-1)*100;
买卖选择:IF(五日均线比<0,'清仓',IF(三日均线比>0,'买入',IF(REF(最强简称,1)!=最强简称,'清仓','持有')));
STICKLINE(买卖选择='买入',0,三日均线比,10,0),colorlired;
STICKLINE(买卖选择='清仓',0,五日均线比,10,0),colorligreen;
STICKLINE((买卖选择!='清仓') AND 最强简称='沪深300',0,-2,10,0),colorblue;
STICKLINE((买卖选择!='清仓') AND 最强简称='中证1000',0,-2,10,0),colormagenta;
STICKLINE((买卖选择!='清仓') AND 最强简称='创业板50',0,-2,10,0),colorcyan;
STICKLINE((买卖选择!='清仓') AND 最强简称='黄金ETF',0,-2,10,0),coloryellow;
STICKLINE((买卖选择!='清仓') AND 最强简称='纳指ETF',0,-2,10,0),colorwhite;
STICKLINE((买卖选择!='清仓') AND 最强简称='国证2000',0,-2,10,0),colorgray;
STICKLINE((买卖选择!='清仓') AND 最强简称='德国ETF',0,-2,10,0),colorlicyan;
STICKLINE((买卖选择!='清仓') AND 最强简称='标普500ETF',0,-2,10,0),colorliblue;
[url=http://www.70822.com/soft/sort013/sort036/down-165909.html]均线动量轮动(同花顺公式 副图 源码 测试图)[/url]