[求助]老师帮编写交易程序 [文华财经]
- 咨询内容: TMP:=OPEN-CLOSE;DRAWLINE(TMP>0.00001,HIGH,TMP>0.00001,OPEN,COLORCYAN);DRAWLINE(TMP>0.00001,LOW,TMP>0.00001,CLOSE,COLORCYAN);DRAWLINE(TMP<-0.00001,HIGH,TMP<-0.00001,CLOSE,COLORRED);DRAWLINE(TMP<-0.00001,LOW,TMP<-0.00001,OPEN,COLORRED);DRAWLINE(ABS(TMP)<0.00001,LOW,ABS(TMP)<0.00001,OPEN,COLORWHITE);DRAWLINE(ABS(TMP)<0.00001,HIGH,ABS(TMP)<0.00001,OPEN,COLORWHITE);STICKLINE(TMP>0,OPEN,CLOSE,COLORCYAN,0);STICKLINE(TMP<=0,OPEN,CLOSE,COLORRED,1);
-
文华技术人员:
您在原指标后面添加下面指令语句即可,出b的时候开多,出s的时候开空
BARSLAST(DWTREND)=1,BPK;BARSLAST(UPTREND)=1,SPK;AUTOFILTER;来源: WWW.CXH99.COM
-
文华客服:
老师帮我直接修改吧 我不知道应该添加在什么地方
-
网友回复:
请参考,另外具体的参数请自行设置
TMP:=OPEN-CLOSE;
DRAWLINE(TMP>0.00001,HIGH,TMP>0.00001,OPEN,COLORCYAN);
DRAWLINE(TMP>0.00001,LOW,TMP>0.00001,CLOSE,COLORCYAN);
DRAWLINE(TMP<-0.00001,HIGH,TMP<-0.00001,CLOSE,COLORRED);
DRAWLINE(TMP<-0.00001,LOW,TMP<-0.00001,OPEN,COLORRED);
DRAWLINE(ABS(TMP)<0.00001,LOW,ABS(TMP)<0.00001,OPEN,COLORWHITE);
DRAWLINE(ABS(TMP)<0.00001,HIGH,ABS(TMP)<0.00001,OPEN,COLORWHITE);
STICKLINE(TMP>0,OPEN,CLOSE,COLORCYAN,0);
STICKLINE(TMP<=0,OPEN,CLOSE,COLORRED,1);
//*********************************************************//M1:MA(C,N);HPB:=REF(HHV(H,N),1);LPB:=REF(LLV(L,T),1);//{多头交易}BUYIN:=H>HPB AND C>M1;BUYEXIT:=L<LPB;SINGAL:=IFELSE(BUYIN,1,IFELSE(BUYEXIT,-1,0));CURRSIGN:=REF(SINGAL,BARSLAST(SINGAL));UPTREND:=CURRSIGN= 1;DWTREND:=CURRSIGN=-1;//{跟踪止损}SELLSTOP:=IFELSE(DWTREND,HPB,M1),COLORBLUE;//{空平:PARTLINE(VAR1>REF(VAR2,1),VAR2);}PARTLINE(DWTREND,HPB,COLORBLUE);
BUYSTOP:=IFELSE(UPTREND,LPB,M1),COLORRED;PARTLINE(UPTREND,LPB,COLORRED);
CONTINUE:=IFELSE(DWTREND,BARSLAST(UPTREND),BARSLAST(DWTREND));//DRAWICON(BARSLAST(DWTREND)=1,BUYSTOP,5);DRAWTEXT(BARSLAST(DWTREND)=1,BUYSTOP,'';//DRAWICON(BARSLAST(UPTREND)=1,SELLSTOP,0);DRAWTEXT(BARSLAST(UPTREND)=1,SELLSTOP,'';//DRAWKLINE(HIGH,OPEN,LOW,CLOSE);//MA(C,N);
改成我们文化8 量化交易
来源:程序化99
//*********************************************************// M1:MA(C,N); HPB:=REF(HHV(H,N),1); LPB:=REF(LLV(L,T),1); //{多头交易} BUYIN:=H>HPB AND C>M1; BUYEXIT:=L<LPB; SINGAL:=IFELSE(BUYIN,1,IFELSE(BUYEXIT,-1,0)); CURRSIGN:=REF(SINGAL,BARSLAST(SINGAL)); UPTREND:=CURRSIGN= 1; DWTREND:=CURRSIGN=-1; //{跟踪止损} SELLSTOP:=IFELSE(DWTREND,HPB,M1),COLORBLUE; //{空平:PARTLINE(VAR1>REF(VAR2,1),VAR2);} PARTLINE(DWTREND,HPB,COLORBLUE);
BUYSTOP:=IFELSE(UPTREND,LPB,M1),COLORRED; PARTLINE(UPTREND,LPB,COLORRED);
CONTINUE:=IFELSE(DWTREND,BARSLAST(UPTREND),BARSLAST(DWTREND)); //DRAWICON(BARSLAST(DWTREND)=1,BUYSTOP,5); DRAWTEXT(BARSLAST(DWTREND)=1,BUYSTOP,''; //DRAWICON(BARSLAST(UPTREND)=1,SELLSTOP,0); DRAWTEXT(BARSLAST(UPTREND)=1,SELLSTOP,''; //DRAWKLINE(HIGH,OPEN,LOW,CLOSE); //MA(C,N); BARSLAST(DWTREND)=1,BPK; BARSLAST(UPTREND)=1,SPK; AUTOFILTER;
*******************************************************************
模型编写请参考置顶帖 https://help.wenhua.com.cn/dispbbs.asp?boardid=14&Id=571777
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容