策略交易不显示信号 [通达信]
-
咨询内容:
N:=BARSLAST(DATE<>REF(DATE,1))+1;JZ1:=HHV(H,N);HZ1:=REF(HHV(H,N),N);QZ1:=REF(REF(HHV(H,N),N),N);HH:=HHV(H,N-1);JZ2:=LLV(L,N);HZ2:=REF(LLV(L,N),N);QZ2:=REF(REF(LLV(L,N),N),N);LL:=LLV(L,N-1);绿一:=HZ1=MAX(JZ1,HZ1);绿二:=REF(C,N)>REF(O,N)&&C>MAX(HH,HZ1)&&C<HZ2;绿三:=C<REF(L,BARSLAST(C<O)+1);绿四:=C<HZ2;VV:=((REF(C,1)>REF(O,1) AND H>REF(H,1) AND C<REF(L,1))) OR (REF(H,1)=HHV(H,3) AND C<REF(L,1)) OR C<REF(L,BARSLAST(C>O)) ;红一:=HZ2=MIN(JZ2,HZ2);红二:=REF(C,N)<REF(O,N)&&C<MIN(LL,HZ2)&&C>HZ1;红三:=C>REF(H,BARSLAST(C<O)+1);红四:=C>HZ1;OO:=(REF(L,1)=LLV(L,3) AND C>REF(H,1)) OR ((REF(O,1)>REF(C,1) AND L<REF(L,1) AND C>REF(H,1))) OR C>REF(H,BARSLAST(C<O));COUD1:=CROSS(COUNT(VV,BARSLAST(OO))=1,0.5);COUD2:=CROSS(COUNT(OO,BARSLAST(VV))=1,0.5);STICKLINE(COUD1,O,CLOSE,2,0),COLORGREEN;STICKLINE(COUD2,O,CLOSE,2,0),COLORRED;MID :=MA(CLOSE,26);UPPER: MID + Q*STD(CLOSE,E),COLORRED,LINETHICK2;LOWER: MID - Q*STD(CLOSE,E),COLORGREEN,LINETHICK2;A1:=(REF(O,1) + REF(C,1)) / 2;A2:=(H + L + C) / 3;A3:=MAX(MAX(A1,A2),H);A4:=MIN(MIN(A1,A2),L);A5:=IF(A1 < A2,A3 - A4 + A2 - A1,A3 - A4);A6:=IF(A1 > A2,A3 - A4 + A1 - A2,A3 - A4);A7:=A5 / (A5 + A6) * AMOUNT * MAX(ABS(A1 - A2) / (A3 - A4),0.15) / 10000;A8:=A6 / (A5 + A6) * AMOUNT * MAX(ABS(A1 - A2) / (A3 - A4),0.15) / 10000;主力净买资金:=(A7 - A8) * 2.5;KK0:=((H>UPPER AND C<UPPER ) OR CROSS(C,UPPER));KK1:=主力净买资金<0 ;KD0:=((L<LOWER AND C>LOWER ) OR CROSS(LOWER,C)) ;KD1:=主力净买资金>0;FJ:=COUNT(KK0,3)>0;FJ1:=COUNT(KD0,3)>0;KK:= (KK0 AND KK1) OR (FJ AND KK1);KD:= (KD0 AND KD1) OR (FJ1 AND KD1);PD:=C<REF(L,BARSLAST(KD)+1) OR KK;PK:=C>REF(H,BARSLAST(KK)+1) OR KD;BUY(KD,LOW*0.9999);SELL(PD,HIGH*1.0001);SELLSHORT(KK,HIGH*1.0001);BUYSHORT(PK,LOW*0.9999);AUTOFILTER;上面是我的代码,可是为什么放到期货上面就没有信号显示。在股票上面有信号!!
- 通达信技术部: 股票和期权具体截图看下。
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容