当前位置:首页 > 知识>权证操作--飞狐公式

权证操作--飞狐公式

飞狐 权证2015-01-13 20:02:11
摘要 : INPUT: P1(2.7,2,3.2),P2(3.13,3,3.5),P3(3.43,3,3.8),p4(3.71,3.5,3.9),n(21,3,100),n1(3,3,100),zz(1,1,2); //zz是多空显示开关。
m1:=ma(c,5);
m2:ma(c,20),COLORGREEN;...

INPUT: P1(2.7,2,3.2),P2(3.13,3,3.5),P3(3.43,3,3.8),p4(3.71,3.5,3.9),n(21,3,100),n1(3,3,100),zz(1,1,2); //zz是多空显示开关。
m1:=ma(c,5);
m2:ma(c,20),COLORGREEN;
均线变异:if(m1>m2,m2,m1),,Color0000FF;
partline(均线变异>ref(均线变异,1) and 均线变异=m2,均线变异),linethick2,COLORred;
var1:=(hhv(high,n)-close)/(hhv(high,n)-llv(low,n))*100;
var3:=(close-llv(low,n))/(hhv(high,n)-llv(low,n))*100;
var6:=var3-var1;
z:=ma(var6,n1);
stickline(z>=0 {and zz=2},O,C,6,0),colorred;
stickline(z>=0 {and zz=2},H,max(O,C),0,1),colorred;
stickline(z>=0 {and zz=2},min(O,C),L,0,1),COLORred;
stickline(z<0 {and zz=1},O,C,6,1),COLORCYAN;
stickline(z<0 {and zz=1},h,max(O,c),0,1),COLORCYAN;
stickline(z<0 {and zz=1},min(O,C),l,0,1),COLORCYAN;
stickline(z>=0 and m2>c,O,C,6,0),COLORBLUE;
stickline(z>=0 and m2>c,H,max(O,C),0,1),COLORBLUE;
stickline(z>=0 and m2>c,min(O,C),L,0,1),COLORBLUE;
stickline(z<0 and m2stickline(z<0 and m2stickline(z<0 and m2DRAWTEXT(IF(RANGE(BARPOS,SYSPARAM(1)-2,SYSPARAM(1)+1) AND CROSS(z,0),1,0),l,'平空开多!'),COLORRED;
DRAWTEXT(IF(RANGE(BARPOS,SYSPARAM(1)-2,SYSPARAM(1)+1) AND CROSS(0,z),1,0),h,'平多开空!'),COLORgreen;
Var2:=LLV(LOW,10);
Var3:=HHV(HIGH,25);
警戒线:= p1 ;
减仓线:= p2 ;
卖出线:= p3 ;
空头线:=p4;
动力线:= EMA((CLOSE-Var2)/(Var3-Var2)*4,4);
DRAWTEXT(IF(RANGE(BARPOS,SYSPARAM(1)-2,SYSPARAM(1)+1) AND CROSS(动力线,警戒线),1,0),c,'预警 '),ALIGN4,colorwhite;
DRAWTEXT(IF(RANGE(BARPOS,SYSPARAM(1)-2,SYSPARAM(1)+1) AND CROSS(动力线,减仓线),1,0),c,'减磅 '),ALIGN5,COLORYELLOW;
DRAWTEXT(IF(RANGE(BARPOS,SYSPARAM(1)-2,SYSPARAM(1)+1) AND CROSS(动力线,卖出线),1,0),c,'出局?'),ALIGN4,COLORGREEN ;
DRAWTEXT(IF(RANGE(BARPOS,SYSPARAM(1)-2,SYSPARAM(1)+1) AND CROSS(动力线,空头线),1,0),c,'与虎谋皮 '),ALIGN3,COLORRED;

快速索引: