马上注册,享用更多功能,让你轻松玩转本论坛。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
来自{秀山腾龙}老师的神奇线与牛熊线
对照了一段时间之后,整合成一个副图
着重显示原源码中的--转点--
图中箭头显示神奇线的转点
手指显示牛熊线的转点
看上去有点花喔 ,老师不要笑...
整合源码:
STICKLINE(C,95,95,0.5,0.5),COLOR3C3CFF;
STICKLINE(C,5,5,0.5,0.5),COLORCYAN;
均价:=(HIGH+LOW+CLOSE)/3;
大盘均价:=(INDEXH+INDEXL+INDEXC)/3;
个股趋势:SMA(((均价-LLV(均价,28))/(HHV(均价,28)-LLV(均价,28))*100),3,1),COLORYELLOW;
大盘趋势:SMA(((大盘均价-LLV(大盘均价,28))/(HHV(大盘均价,28)-LLV(大盘均价,28))*100),3,1),COLORRED;
中线转强:IF(个股趋势>50,个股趋势,DRAWNULL),COLORYELLOW;
中线转弱:IF(个股趋势<50,个股趋势,DRAWNULL),COLORWHITE;
RSV:=(均价-LLV(均价,9))/(HHV(均价,9)-LLV(均价,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
CCI:=(均价-MA(均价,14))/(0.015*AVEDEV(均价,14));
DIFF:=EMA(均价,2)-EMA(均价,55);
DEA:=EMA(DIFF,6);
MACD:=2*(DIFF-DEA);
转点:=IF(K>D AND CCI>0 AND DIFF>DEA AND MACD>0,1,0);
顶部:STICKLINE(C,75,75,0.5,0.5),COLOR3C3CFF;
底部:STICKLINE(C,25,25,0.5,0.5),COLORCYAN;
VAR1:=LLV(LOW,12);
VAR2:=HHV(HIGH,5);
快线:=EMA((均价-VAR1)/(VAR2-VAR1)*100,4);
慢线:=EMA(0.667*REF(快线,1)+0.333*快线,2);
转点1:=IF(快线>慢线,1,0);
N:=28;
个股LC:=REF(均价,1);
个股牛熊:SMA(MAX(均价-个股LC,0),N,1)/SMA(ABS(均价-个股LC),N,1)*100,COLORWHITE;
DRAWBAND(个股牛熊,RGB(155,50,50),50,RGB(0,100,50));
LC:=REF(大盘均价,1);
大盘牛熊:SMA(MAX(大盘均价-LC,0),N,1)/SMA(ABS(大盘均价-LC),N,1)*100,COLORYELLOW;
长线转强:IF(个股牛熊>50,个股牛熊,DRAWNULL),COLORRED;
长线转弱:IF(个股牛熊<50,个股牛熊,DRAWNULL),COLORGREEN;
DRAWBAND(大盘趋势,RGB(155,50,50),50,RGB(0,110,30));
DRAWBAND(个股趋势,RGB(1955,155,0),50,RGB(161,161,161));
DRAWBAND(大盘牛熊,RGB(225,0,225),50,RGB(0,255,255));
DRAWBAND(个股牛熊,RGB(255,215,0),50,RGB(193,210,230));
DRAWICON(转点>REF(转点,1),50,1);
DRAWICON(转点<REF(转点,1),50,2);
DRAWICON(转点1>REF(转点1,1),50,11);
DRAWICON(转点1<REF(转点1,1),50,12); |