逍遥操盘 逍遥趋势[同花顺公式]
相关标签:
本指标专门寻找波段的顶底趋势。白线表示短趋势。红线表示长趋势。当趋势信号出现时,会标出买的标记。
原理解析:
源码:
红买绿卖☆☆☆☆☆:STKNAME,coloryellow;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,COLORE800E8,LINETHICK2;趋势线:EMA(Q3, 3),COLOR35DCFF,LINETHICK2;DRAWTEXT(CROSS(趋势线, 主力线) AND REF(主力线,1)>80, REF(主力线,3), '顶'),colorred,LINETHICK5;逢低买: DRAWTEXT(REF(CROSS(趋势线,主力线),82) AND 趋势线>1.3*主力线,主力线,'逢低买'),LINETHICK1;买: DRAWTEXT(REF(CROSS(主力线,趋势线),1) AND 主力线>1.3*趋势线,趋势线,'买'),colorred,LINETHICK1;VAR3:=PEAKBARS(3,15,1)<10;VAR5:=IF(VAR3=1,2,0);金叉: CROSS(主力线,趋势线);DRAWTEXT(金叉,趋势线,'▲'),colorred;VARE:=REF(LOW,1)*0.9;VARF:=LOW*0.9;VAR10:=(VARF*VOL+VARE*(CAPITAL-VOL))/CAPITAL;VAR11:=EMA(VAR10,30);VAR12:=CLOSE-REF(CLOSE,1);VAR13:=MAX(VAR12,0);VAR14:=ABS(VAR12);VAR15:=SMA(VAR13,7,1)/SMA(VAR14,7,1)*100;VAR16:=SMA(VAR13,13,1)/SMA(VAR14,13,1)*100;VAR17:=BARSCOUNT(CLOSE);VAR18:=SMA(MAX(VAR12,0),6,1)/SMA(ABS(VAR12),6,1)*100;VAR19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;VAR1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;VAR1B:=SMA((SMA(VAR1A,4,1)-50)*2,3,1);VAR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;VAR1D:=SMA(VAR1C,4,1);VAR1E:=SMA(VAR1D,3,1);VAR1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;VAR20:=VAR18<=25 AND VAR19<-95 AND VAR1F>20 AND VAR1B<-30 AND VAR1E<30 AND VAR11-CLOSE>=-0.25 AND VAR15<22 AND VAR16<28 AND VAR17>50;VAR21:=(HIGH+LOW+CLOSE)/3;VAR22:=(VAR21-MA(VAR21,14))/(0.015*AVEDEV(VAR21,14));VAR23:=(VAR21-MA(VAR21,70))/(0.015*AVEDEV(VAR21,70));VAR24:=IF(VAR22>=150 AND VAR22<200 AND VAR23>=150 AND VAR23<200,10,0);VAR25:=IF(VAR22<=-150 AND VAR22>-200 AND VAR23<=-150 AND VAR23>-200,-10,VAR24);V6:=CLOSE/REF(CLOSE,3)>=1.1;V7:=BACKSET(V6,3);买:IF((V7 AND COUNT(V7,3)=1),50,0),colormagenta,LINETHICK2;DRAWTEXT(买,50,'买 '),colormagenta;V10:=PEAKBARS(3,15,1)<10; V12:=IF(V10=1,50,0);头部:= IF(V12=50,100,0);卖:IF(头部>REF(头部,1),50,0),colorgreen,LINETHICK2;DRAWTEXT(卖,50,'顶 '),colorgreen;V9:=TROUGHBARS(3,15,1)<10; V11:=IF(V9=1,50,0);底部:= IF(V11=50,50,0);买:IF( 底部>REF(底部,1),40,0),COLORFF00FF,LINETHICK2; DRAWTEXT(买,40,'底 '),COLORFF00FF;VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);VAR3:=EMA(VAR2,10);VAR4:=LLV(LOW,33);VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),5);//主力进场:STICKLINE(VAR5>REF(VAR5,1),0,VAR5,10,0 ),colorred;//洗盘:STICKLINE(VAR5<REF(VAR5,1),0,VAR5,10,0),colorgreen;//{绿}//主力进场阳:STICKLINE(VAR5>REF(VAR5,1) AND C>O,0,VAR5,10,0 ),coloryellow;//洗盘阴: www..comSTICKLINE(VAR5<REF(VAR5,1) AND C<O,0,VAR5,10,0),colorblue;大资金进场黄:0,coloryellow;大资金进场红:0,colorred;大资金洗盘蓝:0,colorblue;大资金洗盘绿:0,colorgreen;
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容