马上注册,享用更多功能,让你轻松玩转本论坛。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
511.问:
美国大鲨鱼形态如何写
答(wzhhm):
SFF:=H/REF(H,1)<1 AND REF(h,1)/REF(h,2)<1 AND L/REF(L,1)>1 and REF(L,1)/REF(L,2)>1 ;
EXPLAIN(SFF,'美国大鲨鱼形态:密切关注')coloryellow;
当股价突破前天的最高价时买入!!
当股价跌破前天的最低价时卖出!!
也就是说成收敛状态!最高价一天比一天低,最低价一天比一天高
512.问:
怎样改变指标灯的颜色?我在几个贴中看到飞狐的指示灯颜色变得非常漂亮
答(jsyjsybt):
1. Partline
Partline(位置,条件){分析家5.x用}
Partline(条件,位置){飞狐用}
2.DrawIcon
DRAWIcon(条件,位置,类型);
类型=0~14(但分析家与飞狐的输出图案不一样)
测试公式:
A1:=Ma(C,21);
A2:=Ma(C,48);
A3:=(A1+A2)/2;
{分析家5.x用}
Partline(A1,A1>A2),Colorred,linethick2;
Partline(A2,A1>A2),Colorred,linethick2;
Partline(A1,A1<=A2),Colorgreen,linethick2;
Partline(A2,A1<=A2),Colorgreen,linethick2;
{飞狐用这四行}
Partline(A1>A2,A1),Colorred,linethick2;
Partline(A1>A2,A2),Colorred,linethick2;
Partline(A1<=A2,A1),Colorgreen,linethick2;
Partline(A1<=A2,A2),Colorgreen,linethick2;
DRAWIcon(Slope(A1,2)>0,0.98*A1,9);
DRAWIcon(Slope(A1,2)<=0,A1/0.98,10);
DRAWIcon(Slope(A2,2)>0,0.98*A2,4);
DRAWIcon(Slope(A2,2)<=0,A2/0.98,5);
drawtext(Cross(A2,A1),A1,'死叉'),colorgreen,linethick2;
drawtext(Cross(A1,A2),A2,'金叉'),colorred,linethick2;
{乾坤K线}
STICKLINE(C>O,O,C,7,0),COLORRED;
STICKLINE(C>O,O,C,4,0),COLORB0B0FF;
STICKLINE(C>O,O,C,2,0),COLORYELLOW;
STICKLINE(C>O,L,H,0.1,0),COLORYELLOW;
STICKLINE(C< O,O,C,7,0),COLORFF2020;
STICKLINE(C< O,O,C,4,0),COLORFF6600;
STICKLINE(C< O,O,C,2,0),COLORCYAN;
STICKLINE(C< O,L,H,0.1,0),COLORCYAN;
STICKLINE(C=O AND C>=REF(C,1),O,C,7,0),COLORRED;
STICKLINE(C=O AND C>=REF(C,1),O,C,4,0),COLORB0B0FF;
STICKLINE(C=O AND C>=REF(C,1),O,C,2,0),COLORYELLOW;
STICKLINE(C=O AND C>=REF(C,1),L,H,0.1,0),COLORYELLOW;
STICKLINE(C=O AND C< REF(C,1),O,C,7,0),COLORFF2020;
STICKLINE(C=O AND C< REF(C,1),O,C,4,0),COLORFF6600;
STICKLINE(C=O AND C< REF(C,1),O,C,2,0),COLORCYAN;
STICKLINE(C=O AND C< REF(C,1),L,H,0.1,0),COLORCYAN;
513.问:
如何在主副图公式设计中加入自己希望显示的内容
答(jsyjsybt):
如何在主副图公式设计中加入自己希望显示的内容,主要涉及以下三个函数的使用:
drawtext(条件,位置,'内容'),颜色,大小;
drawIcon(条件,位置,1或2);
Stickline(条件,起始位置,终止位置,宽度,0),颜色,大小;
大小: Linethickn (n=0~7);
位置:在主图中与股票价格有关(H、L、O、L);
在副图中与所设纵坐标最大值和最小值有关条件:根据需要写成表达式。
这里提供主副图公式各一个,自己引入后改变参数试几次看看效果就知道了。
1、主图编辑
A1:=Ma(C,10);
A2:=Ma(C,34);
A3:=(A1+A2)/2;
{均线变色}
IF (A1>A2,A1,A3),Colorred,linethick2;{2号}
IF (A1>A2,A2,A3),Colorred,linethick2;
IF (A1<=A2,A1,A3),Colorgreen,linethick2;
IF (A1<=A2,A2,A3),Colorgreen,linethick2;
A3,colorwhite,linethick2;
{笑脸与哭脸}
drawIcon(Cross(A1,A2),A2,2);
drawIcon(Cross(A2,A1),A1,1);
{文字}
drawtext(Cross(A1,A2),A1,'金叉2号'),coloryellow,linethick2;{3号}
drawtext(Cross(A2,A1),A2,'死叉3号'),colorgreen,linethick3;{4号}
{方块}
Stickline(Cross(A1,A2),1.02*H,1.06*H,10,0),coloryellow;
Stickline(Cross(A2,A1),0.94*L,0.99*L,10,1),colorgreen;
Stickline(A1>A2,A1,A2,0.1,1),colorMAGENTA;
Stickline(A1<=A2,A1,A2,0.1,1),color22CC33;
2、副图编辑
J1:=EMA(WINNER(COST(50)),21);
J2:=EMA(WINNER(C),13)-J1;
J3:=EMA(J2,8);
J4:=(3*J2-2*J3+0.5)*100;
J5:=(H+L+C*2)/4;
J6:=EMA(J5,18);
J7:=STD(J5,18);
J8:=((J5-J6)/J7*100+200)/4;
J9:=EMA(J8,5);
JA:=EMA(J9,5);
JB:=(H+L+C*2)/4;
JC:=EMA(JB,10);
JD:=STD(JB,10);
JE:=(JB-JC)*100/JD;
JF:=EMA(JE,5);
J10:=EMA(JF,10);
J11:=(O+L+H+C*2)/5;
J12:=REF(C,1);
J13:=SMA(MAX(J11-J12,0),5,1)/SMA(ABS(J11-J12),5,1)*100;
J14:=SMA(MAX(J11-J12,0),10,1)/SMA(ABS(J11-J12),10,1)*100;
J15:=SMA(MAX(J11-J12,0),21,1)/SMA(ABS(J11-J12),21,1)*100;
J16:=(HHV(H,5)-C)/(HHV(H,5)-LLV(L,5));
J17:=(HHV(H,13)-C)/(HHV(H,13)-LLV(L,13));
J18:=(HHV(H,21)-C)/(HHV(H,21)-LLV(L,21));
J19:=(HHV(H,34)-C)/(HHV(H,34)-LLV(L,34));
J1A:=(HHV(H,55)-C)/(HHV(H,55)-LLV(L,55));
J1B:=(HHV(H,89)-C)/(HHV(H,89)-LLV(L,89));
J1C:=(HHV(H,145)-C)/(HHV(H,145)-LLV(L,145));
J1D:=(J16*8+J17*7+J18*6+J19+J1A+J1B+J1C)/25;
J1E:=J17;
J1F:=SMA(J1D,8,1);
J20:=EMA(EMA((J1E+J1F)/2,2),2);
J21:=(J13+J14+J15)/3;
J22:=(EMA(JF,10)+100)/2;
J24:=((J9+JA*4+J20+J21+J22+J4)/9-10)*1.588;
K0:EMA(J24,4);
K1:EMA(K0,4);
K2:EMA(K1,4);
K3:EMA(K2,4);
K4:EMA(K3,4);
K5:EMA(K4,4);
0;{坐标最小值}
100;{坐标最大值}
{笑脸与哭脸}
drawIcon(Cross(K0,K5) AND K0<50,K5,2);
drawIcon(Cross(K5,K0) AND K0>50,K0,1);
{文字}
drawtext(Cross(K0,K5) AND K0<50,K0,'金叉2号'),coloryellow,linethick2;{2号}
drawtext(Cross(K5,K0) AND K0>50,K5,'死叉3号'),colorgreen,linethick3;{4号}
{方块}
Stickline(Cross(K0,K5) AND K0<50,0,K0,10,0),coloryellow;
Stickline(Cross(K5,K0) AND K0>50,K5,100,10,1),colorgreen;
Stickline(K0>K5,K0,K5,0.1,1),colorMAGENTA;
Stickline(K0<=K5,K0,K5,0.1,1),color22CC33;
514.问:
均线如何变色
答(jsyjsybt):
5日线金叉10日线,5、10日线为红色,
5日线死叉10日线,5、10日线为绿色。
均线变色原码
A1:=Ma(C,5);
A2:=Ma(C,10);
A3:=(A1+A2)/2;
IF (A1>A2,A1,A3),Colorred,linethick2;
IF (A1>A2,A2,A3),Colorred,linethick2;
IF (A1<=A2,A1,A3),Colorgreen,linethick2;
IF (A1<=A2,A2,A3),Colorgreen,linethick2;
A3,colorwhite,linethick2;
drawIcon(Cross(A1,A2),L,2);
drawIcon(Cross(A2,A1),L,1);
515.问:
如何做筹码相对集中的选股公式
答(TZTZ):
只是便于选出筹码相对集中的个股,不作为操作依据!!胡子!!
{筹码20:集中度=28-88-50}
A1:=cost(20);
A2:=cost(85);
获利:=WINNER(CLOSE)*100;
A1-A2<集中度/100 AND A2-A1<集中度/100
|