以下是(大智慧L2)源码和使用说明
使用说明
计算周期选择:首先,您需要选择要计算分时均线的周期。周期可以是任意时间段,例如5分钟、15分钟、30分钟或60分钟等。选择适当的周期是根据您的交易策略和分析需求来确定的。
计算均线:一旦选择了计算周期,您可以开始计算分时均线。计算方法是将每个周期内的价格相加,然后除以周期的数量,得到平均价格。这个平均价格会在价格曲线上显示出来,并用于分析价格。
图表解读:分时均线在价格图表上呈现为一条平滑的曲线,该曲线代表了一段时间内的平均价格。通过观察分时均线与价格之间的关系,可以帮助您识别价格趋势以及可能的转折点。
价格趋势分析:当分时均线向上倾斜且价格位于均线上方时,这表明价格处于上升趋势。相反,当分时均线向下倾斜且价格位于均线下方时,这表明价格处于下降趋势。您可以根据这些趋势来决定买入或卖出的时机。
支撑与阻力:分时均线还可以用作支撑和阻力的参考。当价格从下方向上穿过分时均线时,分时均线可能成为支撑线,并提供买入信号。相反,当价格从上方向下穿过分时均线时,分时均线可能成为阻力线,并提供卖出信号。
交叉信号:当不同周期的分时均线相交时,也可以产生交叉信号。例如,短期均线向上穿过长期均线时,被称为"黄金交叉",可能暗示价格上涨趋势。相反,短期均线向下穿过长期均线时,被称为"死亡交叉",可能暗示价格下跌趋势。
分时均线(大智慧L2)源码:
rcc:=DYNAINFO(3);s2:=SMA(c,3,1);s6:=sma(c,5,1);
dk:=10*(s2-s6);kk:=IF(DATATYPE=8,0.95,1);
STICKLINE(dk 0,rcc*kk,rcc*kk+dk,0,1),COLORRED;
STICKLINE(dk 0,rcc*kk,rcc*kk+dk,0,1),COLORCYAN;
XG:HHV(H,480),DOTLINE,COLORRED;
STICKLINE(FILTER(crOSS(C,REF(XG,1)),10),C*0.99,C,8,0),COLORGREEN;
DRAWTEXT(FILTER(CROSS(C,REF(XG,1)),10),C*0.99,'上突'),COLORYELLOW;
T:=BARSCOUNT(C);
TP:=FILTER(C =HHV(H,T)ANDV MA(V,0)*2ANDDYNAINFO(17) 1ANDTIME0 39600,240);
DRAWTEXT(TP,L,'★'),COLORred;
VERTLINE(tp,1),COLORGREEN,LINETHICK2;
HHV(h,T),DOTLINE,Color00FFFF;
AYGB1:=(DVOL/C)/2,NODRAW;
AYGB2:=SUM(IF(AYGB1 100ANDCLOSE REF(CLOSE,1),AYGB1,0),0);
AYGB3:=SUM(IF(AYGB1 100ANDCLOSE REF(CLOSE,1),AYGB1,0),0);
AYGB4:=SUM(IF(AYGB1 100ANDCLOSE REF(CLOSE,1),AYGB1,0),0);
AYGB5:=SUM(IF(AYGB1 100ANDCLOSE REF(CLOSE,1),AYGB1,0),0);
AYGB6:=AYGB2+AYGB3+AYGB4+AYGB5;
机买:(AYGB2/AYGB6)*100-100,LINETHICK1,COLORRED;
机卖:(AYGB3/AYGB6)*100-100,LINETHICK1,COLORGREEN;
DRAWBAND(机买,RGB(80,10,10),机卖,RGB(10,80,10));
VLST1:=(C*2+H+L)/4*10;
VLST2:=EMA(VLST1,13)-EMA(VLST1,34);
VLST3:=EMA(VLST2,5);VLST4:=2*(VLST2-VLST3)*5.5;
进:IF(VLST4 =0,VLST4*3,0),COLORCYAN;
DRAWBAND(主力进,RGB(200,10,10),0,RGB(10,200,10));
V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
趋势线:=EMA(V11,3);
V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;
见顶清仓:STICKLINE(趋势线 =90ANDV12,50,60,2,0),COLORCYAN;
神奇:=HHV(MA(H,13),45),COLORMAGENTA,LINETHICK1;
均线:=IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(SUM(AMOUNT,0)/SUM(VOL*100,0))),COLORYELLOW;
均线H:=(均线*1.007),COLORFF6600;
放量:=SUM(VOL,6) REF(MA(VOL,30),1)*10;
横盘:=((HHV(CLOSE,BARSCOUNT(CLOSE))-LLV(CLOSE,BARSCOUNT(CLOSE)))/CLOSE)
横涨:=横盘AND放量AND(C 均线H);
VARYSY1:=EMA(EMA(CLOSE,9),9);
控盘:=(VARYSY1-REF(VARYSY1,1))/REF(VARYSY1,1)*500;
进货:=IF(控盘 REF(控盘,1)AND控盘 0,控盘,0);
洗盘:=IF(控盘 REF(控盘,1)AND控盘 0,控盘,0);
出货:=IF(控盘 0,控盘,0);
比例1:=进货+洗盘;
比例2:=-出货;
差额:=(SUM(比例1,0)-SUM(比例2,0))/20;
AYSY11:=(VOL/C)/2;
AYSY2:=SUM(IF(AYSY11 100ANDCLOSE REF(CLOSE,1),AYSY11,0),0);
AYSY3:=SUM(IF(AYSY11 100ANDCLOSE REF(CLOSE,1),AYSY11,0),0);
AYSY4:=SUM(IF(AYSY11 100ANDCLOSE REF(CLOSE,1),AYSY11,0),0);
AYSY5:=SUM(IF(AYSY11 100ANDCLOSE REF(CLOSE,1),AYSY11,0),0);
AYSY6:=AYSY2+AYSY3+AYSY4+AYSY5;
机买1:=(AYSY2/AYSY6)*100;
机卖1:=(AYSY3/AYSY6)*100;
主力差1:=机买1-机卖1;
秋梦:=差额 0.1AND主力差1 0ANDREF(主力差1,1) =0AND差额+0.3;
DRAWTEXT(秋梦,-40,'搏'),COLORYELLOW;
DXJP:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,21)-LLV(LOW,34))*100;
FSZX:(EMA(DXJP,3)-50)*2,COLORGRAY;
线:-95,COLORCYAN,POINTDOT;
见顶线:95,COLORGREEN,POINTDOT;
BGTYU:=IF(DATE =1150530,1,0);
GHYJKU:=BETWEEN((DCLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))),1.05,0.95);
VBNH:=IF(GHYJKU=0,MA((DCLOSE*BGTYU),BARSCOUNT((DCLOSE*BGTYU))),(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))));
STICKLINE(EXPMA(C,10) EXPMA(C,60),0,10,2.0,0),COLORGREEN;
STICKLINE(EXPMA(C,10) EXPMA(C,60),15,25,2.0,0),COLORRED;
STICKLINE(EXPMA((DCLOSE/VBNH),120) 1.003,30,40,2.0,0),COLORMAGENTA;
DRAWTEXT(FSZX =-95,-85,'↑'),COLORWHITE;
DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.04),-50,'板'),COLORCYAN;
DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.02),-60,'追'),COLORWHITE;
DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),-80,'量'),COLORWHITE;
DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.004),0,17);
VAR1:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;
VAR2:=SMA(VAR1,3,1);
VAR3:=SMA(VAR2,3,1);
VAR4:=SMA(VAR3,3,1);
VAR8:=CROSS(VAR2,VAR3)ANDVAR3 80ANDVAR3 VAR4;
VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;
VAR400:=EMA(VAR300,5);
操盘:=3*VAR300-2*VAR400;
A1:=CROSS(操盘,VAR300)ANDVAR300 2.1ANDC
VARE:=SMA(MAX(CLOSE-REF(CLOSE,1),0)/CLOSE,8,1)/SMA(ABS(INDEXC-REF(INDEXC,1))/INDEXC,8,1)*100-25;
VARF:=MA(VARE,3);
VAR6:=((2)*(CLOSE)+HIGH+LOW)/(4);
VAR11:=HHV(HIGH,34);
B1:=EMA(((VAR6-VAR8)/(VAR11-VAR8))*(100),8);
V1:=MA(C,5)=HHV(MA(C,5),20);
V2:=MA(C,5) MA(C,10);
V3:=MA(V,5) MA(V,40)*1.01;
V4:=COUNT(MA(C,1) REF(C,1),2)=2;
VV:=V1ANDV2ANDV3ANDV4;
A2:=EMA(A1,20);
A3:=CROSS(A1,A2);
A4:=A1 EMA(CLOSE,120);
STICKLINE((A3ANDA4)OR(V1ANDV2ANDV3ANDV4),70,80,2,0),COLORLIRED;
现价:=CLOSE,COLORWHITE;
MA30:=EMA(CLOSE,30);
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:=L1+P1*7/8,COLORGREEN;
支撑:=L1+P1*0.5/8,COLORMAGENTA;
DRAWICON(LONGCROSS(支撑,现价,2),-88,1);
DRAWICON(LONGCROSS(现价,阻力,2),95,2);
N:=1.5;
买:=(AYGB2/AYGB6);
卖:=(AYGB3/AYGB6);
TT:=EXPMA(C,10) EXPMA(C,60)ANDEXPMA((DCLOSE/VBNH),120) 1.003AND趋势线 =90ANDV12ANDVLST4
XG:=ABS((买-卖))/ABS((REF(买,1)-REF(卖,1))) =NAND买 卖ANDTT;
VARJ1:=EMA(EMA(CLOSE,13),13);
控盘2:=(VARJ1-REF(VARJ1,1))/REF(VARJ1,1)*1000;
STJ01:=控盘2 REF(控盘2,1)AND控盘2
STJ02:=控盘2
BTJ2:=控盘2 REF(控盘2,1)AND控盘2 -0.2;
BTJ22:=控盘2 REF(控盘2,1)AND控盘2
JJ:=DYNAINFO(11);
P:=55;S:=8;M1:=3;
能量:=(EMA(CLOSE,S)-EMA(C,P))*10;
空头:=EMA(能量,M1),COLOR00FF00;
BTJ1:=(CLOSE-JJ)/JJ -0.005;
BTJ11:=(CLOSE-JJ)/JJ -0.03;
BTJ12:=COUNT(JJ =REF(JJ,1),5) =4AND(CLOSE-JJ)/JJ 0.005;
STJ1:=(C-JJ)/JJ 0.005;
BTJ3:=CROSS(能量,空头)AND能量 -0.3;
BTJ32:=CROSS(能量,空头)AND能量 -0.1;
STJ31:=CROSS(空头,能量);
STJ32:=CROSS(空头,能量)AND能量 1.618;
A:=8;
BTJ81:=FILTER(BTJ1ANDBTJ2ANDBTJ3,A);
BTJ811:=FILTER(BTJ11ANDBTJ2ANDBTJ3,A);
BTJ82:=FILTER(BTJ12ANDBTJ22ANDBTJ32,A);
时长:=IF(HOUR =9ANDHOUR 14,1,0);{9点至14点}
捡钱:=BTJ811ANDTIME 15AND时长;
STICKLINE(捡钱,-90,-30,1,0),COLORRED;
DRAWTEXT(捡钱,-30,'关'),COLORLIMAGENTA;
主力差:=机买-机卖;
LQH:=主力差 0ANDREF(主力差,1)
STICKLINE(LQH,-30,30,2,0),COLORYELLOW;
DRAWTEXT(LQH,-30,'入'),COLORYELLOW;
突破:=FILTER(横涨,100);
STICKLINE(突破,30,90,4,0),COLORWHITE;
DRAWTEXT(突破,30,'突'),COLORWHITE;
分时均线(大智慧L2)截图