老师求助,模型不交易 [文华财经]
- 咨询内容:
N:=10;M:=2.5;TR1:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));UP:=(H+L)/2+MA(TR1,N)*M;DN:=(H+L)/2-MA(TR1,N)*M;L1:=REF(UP,BARSLAST(UP<=REF(UP,1)));L2:=LLV(UP,N*1.5);LL:=IF(L2<>REF(L2,1) AND L1<REF(L1,1),L1,IF(L1=L2,L1,L2));S1:=BARSLAST(CROSS(0.5,UP=LL))+1;S2:=CROSS(COUNT((CROSS(C,LL) OR CROSS(C,REF(LL,2))) AND UP>LL,S1),0.5);A6:=BARSLAST(S2);B6:=BARSLAST(CROSS(HHV(DN,A6+1),C));BY:=CROSS(B6,A6);SL:=CROSS(A6,B6);SUPERTREN:IF(B6>A6,HHV(DN,BARSLAST(BY)+1),LLV(UP,BARSLAST(SL)+1)),COLORWHITE;
M1:IFELSE(B6>A6,SUPERTREN,NULL),COLORRED,LINETHICK2,BPK;M2:IFELSE(B6<A6,SUPERTREN,NULL),COLORBLUE,LINETHICK2,SPK;
AUTOFILTER;
这套模型不交易,是我写的有问题么?
- 文华技术人员:
模型编写有误,这样修改。
N:=10;
M:=2.5;
TR1:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
UP:=(H+L)/2+MA(TR1,N)*M;
DN:=(H+L)/2-MA(TR1,N)*M;
L1:=REF(UP,BARSLAST(UP<=REF(UP,1)));
L2:=LLV(UP,N*1.5);
LL:=IF(L2<>REF(L2,1) AND L1<REF(L1,1),L1,IF(L1=L2,L1,L2));
S1:=BARSLAST(CROSS(0.5,UP=LL))+1;
S2:=CROSS(COUNT((CROSS(C,LL) OR CROSS(C,REF(LL,2))) AND UP>LL,S1),0.5);
A6:=BARSLAST(S2);
B6:=BARSLAST(CROSS(HHV(DN,A6+1),C));
BY:=CROSS(B6,A6);
SL:=CROSS(A6,B6);
SUPERTREN:IF(B6>A6,HHV(DN,BARSLAST(BY)+1),LLV(UP,BARSLAST(SL)+1)),COLORWHITE;
B6>A6,BPK;
B6<A6,SPK;
AUTOFILTER;
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容