5精打细算{飞狐版本}的指标源码
V1:=(C*2+H+L)/4*10;
V2:=EMA(V1,13)-EMA(V1,34);
V3:=EMA(V2,5); V4:=2*(V2-V3)*5.5;
主力撤: IF(V4<=0,V4,0),colorblue;
主力进: IF(V4>=0,V4,0),colorff00ff;
V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;
V6:=EMA(3*V5-2*SMA(V5,18,1),5);
V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;
V8:=(INDEXC*2+INDEXH+INDEXL)/4;
V9:=EMA(V8,13)-EMA(V8,34);
VA:=EMA(V9,3);
VB:=(V9-VA)/2;
大盘资金进场:IF(VB>=0,VB,0),Colorred;
大盘资金撤走:IF(VB<=0,VB,0),colorgreen;
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(V3,3)-10;
趋势线: EMA(V11,3);
V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;
准备现金: STICKLINE(趋势线<=13,0,20,5,0),colorcc9900;
aa:=(趋势线<=13) and filter((趋势线<=13),15);
drawtext (aa,30,'准备现金'),colorcc9900;
买入股票: STICKLINE(趋势线<=13 AND V12>13,0,50,4,0),color0099ff;
bb:= (趋势线<=13 AND V12>13) and filter((趋势线<=13 AND V12>13),10) ;
drawtext (bb,60,'买入股票'),color0099ff;
卖临界: STICKLINE(趋势线>90 and 趋势线>ref(趋势线,1),100,95,15,1),COLORFFFF00;
顶:filter(趋势线>90 and 趋势线<ref(趋势线,1) and 主力进<ref(主力进,1),8);
DRAWTEXT( 顶,60,'逃顶'),coloryellow;
cc:=(趋势线>=90 AND V12) and filter((趋势线>=90 AND V12),10);
stickline(大盘资金进场 and 趋势线<13,0,30,4,0),colorred;
stickline(大盘资金撤走 and 趋势线>90,0,30,4,0),colorgreen;
stickline(主力进 and 趋势线<13,0,40,4,0),colorff00ff;
stickline(主力撤 and 趋势线>90,0,40,4,0),colorblue;
V13:=(MA(C,1)+MA(C,3)+MA(C,5)+MA(C,7)+MA(C,9))/5;
V14:=(MA(C,2)+MA(C,4)+MA(C,6)+MA(C,8)+MA(C,10))/5;
V15:=MAX(EMA(V13,2)-EMA(V14,5),0)*200;
V16:=EMA(V15,5);
波浪峰:V16,stick,colorff00ff;
STICKLINE(V16<REF(V16,1),0,V16,1,0),color00ff00;
Var1:=EMA(HHV(HIGH,500),21);
Var2:=EMA(HHV(HIGH,250),21);
Var3:=EMA(HHV(HIGH,90),21);
Var4:=EMA(LLV(LOW,500),21);
Var5:=EMA(LLV(LOW,250),21);
Var6:=EMA(LLV(LOW,90),21);
Var7:=EMA((Var4*0.96+Var5*0.96+Var6*0.96+Var1*0.558+Var2*0.558+Var3*0.558)/6,21);
Var8:=EMA((Var4*1.25+Var5*1.23+Var6*1.2+Var1*0.55+Var2*0.55+Var3*0.65)/6,21);
Var9:=EMA((Var4*1.3+Var5*1.3+Var6*1.3+Var1*0.68+Var2*0.68+Var3*0.68)/6,21);
Var10:=IF(MA(CLOSE,58),1,0);
VarA:=EMA((Var7*3+Var8*2+Var9)/6*1.738,21);
VarB:=REF(LOW,1);
VarC:=SMA(ABS(LOW-VarB),3,1)/SMA(MAX(LOW-VarB,0),3,1)*100;
VarD:=EMA(IF(CLOSE*1.35<=VarA,VarC*10,VarC/10),3);
VarE:=LLV(LOW,30);
VarF:=HHV(VarD,30);
火焰山: EMA(IF(LOW<=VarE,(VarD+VarF*2)/2,0),3)/618*Var10,COLORRED;
火焰: STICKLINE(火焰山>0,0,火焰山,4,1);
今量:火焰山;{www.fxjgsw.com}
STICKLINE(火焰山>0,0,今量*1.2,8,0), COLOR0000ff;
STICKLINE(火焰山>0,0,今量*0.8,8,0), COLOR0066ff;
STICKLINE(火焰山>0,0,今量*0.6,8,0),COLOR0099ff;
STICKLINE(火焰山>0,0,今量*0.4,8,0), COLOR00ccff;
STICKLINE(火焰山>0,0,今量*0.2,8,0), COLOR00ffff;
VAR28:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
VAR29:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
VAR30:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
VAR31:=REF(CLOSE,1);
VAR32:=SMA(MAX(CLOSE-VAR31,0),5,1)/SMA(ABS(CLOSE-VAR31),5,1)*100;
VAR33:=(HIGH+LOW+CLOSE)/3;
VAR34:=(VAR33-MA(VAR33,14))/(0.015*AVEDEV(VAR33,14));
va1:=REF(CLOSE,1);
va2:=SMA(MAX(CLOSE-va1,0),7,1)/SMA(ABS(CLOSE-va1),7,1)*100,COLORYELLOW;
地:IF(va2<20,40,20),COLORRED;
天:IF(va2>80,60,80),COLORFFFF50;
var2↑:STICKLINE(FILTER(REF(va2,1)<20 AND va2>REF(va2,1),5),20,-20,4,0),COLORRED;
var2↓:STICKLINE(FILTER(REF(va2,1)>80 AND va2<REF(va2,1),5),60,80,3,0),COLORFFFF50;
DRAWTEXT(FILTER(REF(va2,1)<20 AND va2>REF(va2,1),5),-10 ,'买入' ),COLORFFFFFF;
DRAWTEXT(FILTER(REF(va2,1)>80 AND va2<REF(va2,1),5),100 ,'卖出' ),COLORFFFFFF;
80,COLORGREEN;
20,COLORRED;
|