指标公式错误 [文华财经]
-
咨询内容:
指标公式出现错误,不允许有BUY出现,判断语句
文件名:qq图片20180126221349.png
的结尾来源:程序化99
-
文华技术人员:
您需要发一下源码。
来源: WWW.CXH99.COM
-
文华客服:
LOWV:=LLV(LOW,N);
HIGHV:=HHV(HIGH,N);
RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,M);
K:=EMA(RSV,M);
D:=MA(K,M);
B:=CROSS(K,D) AND K<50;
S:=CROSS(D,K) AND D>50;
BM:=BARSLAST(B);
SM:=BARSLAST(S);
BM1:=IF(BM[1]=-1 AND B,1,IF(BM[1]!=-1 AND SM[1]!=-1 AND BM[1]>SM[1] AND B AND B[1]=0,1,0));
SM1:=IF(SM[1]=-1 AND BM[1]!=-1 AND S,1,IF( SM[1]!=-1 AND BM[1]!=-1 AND SM[1]>BM[1] AND S AND S[1]=0,1,0));
IF(BM1>0)
BUY;
IF(SM1>0)
SELL;
-
网友回复:
源码修改如下,您加载到wh8中可以直接使用
N:=10; M:=5; LOWV:=LLV(LOW,N); HIGHV:=HHV(HIGH,N); RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,M); K:=EMA(RSV,M); D:=MA(K,M); B:=CROSS(K,D) AND K<50; S:=CROSS(D,K) AND D>50; BM:=BARSLAST(B); SM:=BARSLAST(S); BM1:=IF(REF(BM,1)=-1 AND B,1,IF(REF(BM,1)<>-1 AND REF(SM,1)<>-1 AND REF(BM,1)>REF(SM,1) AND B AND REF(B,1)=0,1,0)); SM1:=IF(REF(SM,1)=-1 AND REF(BM,1)<>-1 AND S,1,IF( REF(SM,1)<>-1 AND REF(BM,1)<>-1 AND REF(SM,1)>REF(BM,1) AND S AND REF(S,1)=0,1,0)); BM1>0,BK; SM1>0,SP; AUTOFILTER; -
网友回复:
添加完指标
文件名:qq图片20180126225331.png
之后提示这个
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容