通达信买卖密码指标公式源码
VAR1:=MA(CLOSE,5);
VAR2:=MA(CLOSE,10);
VAR3:=MA(CLOSE,20);
VAR4:=MA(CLOSE,30);
VAR5:=(VAR1+VAR2+VAR3+VAR4)/4;
VAR6:=(VAR5-REF(VAR5,5))/REF(VAR5,5)*1500;
VAR7:=(VAR5-REF(VAR5,5))/REF(VAR5,5)*1500;
VAR8:=EMA(VAR6,8);
VAR9:=TROUGHBARS(3,15,1)
VAR10:=PEAKBARS(3,15,1)
VAR11:=IF(VAR9=1,50,0);
VAR12:=IF(VAR10=1,50,0);
底部勇于介入:= IF(VAR11=50,50,0);
头部果断出局:= IF(VAR12=50,100,0);
买入:IF( 底部勇于介入 REF(底部勇于介入,1),50,0),COLORRED;
Q2:=(CLOSE-LLV(LOW, 18))/(HHV(HIGH, 18)-LLV(LOW, 18))*100;
Q3:=SMA(Q2, 9, 1);
Q4:=SMA(Q3, 3, 1);
短趋势:3*Q3-2*Q4,COLORWHITE,LINETHICK3;
趋势线:EMA(Q3, 3),COLORRED,LINETHICK3;
DRAWTEXT(CROSS(趋势线, 短趋势) AND REF(短趋势,1) 80, REF(短趋势,3), '*顶'),COLORRED,LINETHICK5;
★逢低筹钱: DRAWTEXT(REF(CROSS(趋势线,短趋势),82) AND 趋势线 1.3*短趋势,短趋势,'★ -逢低筹钱'),LINETHICK1;
★低买: DRAWTEXT(REF(CROSS(短趋势,趋势线),0.7) AND 短趋势 0.95*趋势线,趋势线,'★低买'),COLORRED,LINETHICK1;
VAR13:=PEAKBARS(3,15,1)
VAR15:=IF(VAR13=1,2,0);
顶:= IF(VAR15=2,2,0);
顶A:IF(顶 REF(顶,1),50,0),COLORGREEN;
DRAWTEXT(顶A=50,45,'快跑'),COLOR00FF00;