560交易系统【50%仓】——使用改良后的60分钟大趋势数据
INPUT:TOPVALUE(70,65,95,1),BOTTOMVALUE(30,5,35,1); RUNMODE:0; IF MOD(MINUTE,60)>0 THEN BEGIN SUM_MIN60HI1:=(("dqs.H1##MIN60"*5)+2*C)/7; SUM_MIN60HI2:=(("dqs.H2##MIN60"*17)+2*C)/19; END H1:IF(MOD(MINUTE,60)=0,"dqs.H1#MIN60",SUM_MIN60HI1); H2:IF(MOD(MINUTE,60)=0,"dqs.H2#MIN60",SUM_MIN60HI2); VAR5:=LLV(LOW,26); VAR6:=HHV(HIGH,34); VAR7:=EMA((CLOSE-VAR5)/(VAR6-VAR5)*4,4)*25; IF H1>H2 AND "hm.VAR7#MIN5"<BOTTOMVALUE AND HOLDING=0 THEN BEGIN BUY(1,50%,THISCLOSE); 最大多头盈利:0,linethick0; END SELL((H1<H2 OR C<LLV(L,20)) AND HOLDING>0,HOLDING,MARKET); IF H1<H2 AND "hm.VAR7#MIN5">TOPVALUE AND HOLDING=0 THEN BEGIN BUYSHORT(1,50%,THISCLOSE); 最大空头盈利:0,linethick0; END SELLSHORT((H1>H2) AND HOLDING<0,HOLDING,MARKET); stickline(holding>0,c,o,5,0),colorred; stickline(holding<0,c,o,5,0),colorblue; 持仓:holding,linethick0; 资产:asset,noaxis,COLORGRAY; 可用现金:cash(0),linethick0;
560交易系统【单手】——使用改良后的60分钟大趋势数据
INPUT:TOPVALUE(70,65,95,5),BOTTOMVALUE(30,5,35,5); RUNMODE:0; IF MOD(MINUTE,60)>0 THEN BEGIN SUM_MIN60HI1:=(("dqs.H1##MIN60"*5)+2*C)/7; SUM_MIN60HI2:=(("dqs.H2##MIN60"*17)+2*C)/19; END H1:IF(MOD(MINUTE,60)=0,"dqs.H1#MIN60",SUM_MIN60HI1); H2:IF(MOD(MINUTE,60)=0,"dqs.H2#MIN60",SUM_MIN60HI2); VAR5:=LLV(LOW,26); VAR6:=HHV(HIGH,34); VAR7:=EMA((CLOSE-VAR5)/(VAR6-VAR5)*4,4)*25; IF H1>H2 AND "hm.VAR7#MIN5"<BOTTOMVALUE AND HOLDING=0 THEN BEGIN BUY(1,1,THISCLOSE); END SELL((H1<H2 OR C<LLV(L,20)) AND HOLDING>0,HOLDING,MARKET); IF H1<H2 AND "hm.VAR7#MIN5">TOPVALUE AND HOLDING=0 THEN BEGIN BUYSHORT(1,1,THISCLOSE); END SELLSHORT((H1>H2) AND HOLDING<0,HOLDING,MARKET); stickline(holding>0,c,o,5,0),colorred; stickline(holding<0,c,o,5,0),colorblue; 持仓:holding,linethick0; 资产:asset,noaxis,COLORGRAY; 可用现金:cash(0),linethick0;
560交易系统【反手型-单手】
INPUT:TOPVALUE(70,65,95,5),BOTTOMVALUE(30,5,35,5),LOTS(1,1,100,1); RUNMODE:0; IF MOD(MINUTE,60)>0 THEN BEGIN SUM_MIN60HI1:=(("dqs.H1##MIN60"*5)+2*C)/7; SUM_MIN60HI2:=(("dqs.H2##MIN60"*17)+2*C)/19; END H1:IF(MOD(MINUTE,60)=0,"dqs.H1#MIN60",SUM_MIN60HI1); H2:IF(MOD(MINUTE,60)=0,"dqs.H2#MIN60",SUM_MIN60HI2); VAR5:=LLV(LOW,26); VAR6:=HHV(HIGH,34); VAR7:=EMA((CLOSE-VAR5)/(VAR6-VAR5)*4,4)*25; //空仓 If (HOLDING=0) THEN BEGIN BUY(H1>H2 AND "hm.VAR7#MIN5"<BOTTOMVALUE AND HOLDING=0,LOTS,THISCLOSE); BUYSHORT(H1<H2 AND "hm.VAR7#MIN5">TOPVALUE AND HOLDING=0,LOTS,THISCLOSE); END //多头 If (HOLDING>0) THEN BEGIN SELL(H1<H2 AND HOLDING>0,HOLDING,MARKET); BUYSHORT(1,LOTS,THISCLOSE); END //空头 If (HOLDING<0) THEN BEGIN SELLSHORT((H1>H2) AND HOLDING<0,HOLDING,MARKET); BUY(1,LOTS,THISCLOSE); END stickline(holding>0,c,o,5,0),colorred; stickline(holding<0,c,o,5,0),colorblue; 持仓:holding,linethick0; //资产:asset,noaxis,COLORGRAY; 可用现金:cash(0),linethick0;
560突破混合系统
//针对大趋势和Daul Thrust的模式切换 input:K1(0.4,0,2,0.05);//多头突破波动比例 input:K2(0.4,0,2,0.05);//空头突破波动比例 input:Mday(1,0,9,1);//M日期最大价差 input:Nday(1,0,9,1);//N日前最大价差 input:LOTS(1,0,9,1); IF MOD(MINUTE,60)>0 THEN BEGIN SUM_MIN60HI1:=(("dqs.H1##MIN60"*5)+2*C)/7; SUM_MIN60HI2:=(("dqs.H2##MIN60"*17)+2*C)/19; END H1:IF(MOD(MINUTE,60)=0,"dqs.H1#MIN60",SUM_MIN60HI1); H2:IF(MOD(MINUTE,60)=0,"dqs.H2#MIN60",SUM_MIN60HI2); HighD:=callstock(stklabel,vthigh,6,-1); LowD:=callstock(stklabel,vtlow,6,-1); CloseD:=callstock(stklabel,vtclose,6,-1); CYC:=barslast(date<>ref(date,1))+1; OpenD:=valuewhen(cyc=1,open); HH:= HHV(HighD,Mday); HC:= HHV(CloseD,Mday); LL:= LLV(LowD,Mday); LC:= LLV(CloseD,Mday); SellRange:=Max(HH - LC,HC - LL); HH:=HHV(HighD,Nday); HC:=HHV(CloseD,Nday); LL:=LLV(LowD,Nday); LC:=LLV(CloseD,Nday); BuyRange:=Max(HH - LC,HC - LL); UpperBand: OpenD + K1*BuyRange,COLORRED; LowerBand: OpenD - K2*SellRange,COLORGREEN; PRICE:=0; If (HOLDING=0) THEN BEGIN If (High>=UpperBand AND C>H1) THEN BEGIN Buy(HOLDING=0,LOTS,LIMITR,MAX(O,UPPERBAND)); PRICE:=MAX(O,UPPERBAND); END If (Low<=LowerBand AND C<H1) THEN BEGIN BuyShort(HOLDING=0,LOTS,LIMITR,MIN(O,LOWERBAND)); PRICE:=MIN(O,LOWERBAND); END END If (HOLDING<0) THEN BEGIN If (High>=UpperBand AND C>H1) THEN BEGIN SELLSHORT(HOLDING<0,LOTS,LIMITR,MAX(O,UPPERBAND)); Buy(HOLDING=0,LOTS,LIMITR,MAX(O,UPPERBAND)); PRICE:=MAX(O,UPPERBAND); END END If (HOLDING>0) THEN BEGIN If (Low<=LowerBand AND C<H1) THEN BEGIN Sell(holding>0,LOTS,LIMITR,MIN(O,LOWERBAND)); BuyShort(holding=0,LOTS,LIMITR,MIN(O,LOWERBAND)); PRICE:=MIN(O,LOWERBAND); END END 开仓价格:price,LINETHICK0; stickline(holding>0,c,o,5,0),colorred; stickline(holding<0,c,o,5,0),colorblue; //持仓:holding,linethick0; //资产:asset,noaxis,COLORGRAY; //可用现金:cash(0),linethick0;
560突破系统
INPUT:TOPVALUE(70,65,95,5),BOTTOMVALUE(30,5,35,5); RUNMODE:0; IF MOD(MINUTE,60)>0 THEN BEGIN SUM_MIN60HI1:=(("dqs.H1##MIN60"*5)+2*C)/7; SUM_MIN60HI2:=(("dqs.H2##MIN60"*17)+2*C)/19; END H1:IF(MOD(MINUTE,60)=0,"dqs.H1#MIN60",SUM_MIN60HI1); H2:IF(MOD(MINUTE,60)=0,"dqs.H2#MIN60",SUM_MIN60HI2); VAR5:=LLV(LOW,26); VAR6:=HHV(HIGH,34); VAR7:=EMA((CLOSE-VAR5)/(VAR6-VAR5)*4,4)*25; IF H1>H2 AND "hm.VAR7#MIN5"<BOTTOMVALUE AND HOLDING=0 THEN BEGIN BUY(1,1,THISCLOSE); END SELL((H1<H2 OR C<LLV(L,20)) AND HOLDING>0,HOLDING,MARKET); IF H1<H2 AND "hm.VAR7#MIN5">TOPVALUE AND HOLDING=0 THEN BEGIN BUYSHORT(1,1,THISCLOSE); END SELLSHORT((H1>H2) AND HOLDING<0,HOLDING,MARKET); stickline(holding>0,c,o,5,0),colorred; stickline(holding<0,c,o,5,0),colorblue; //持仓:holding,linethick0; 资产:asset,noaxis,COLORGRAY; //可用现金:cash(0),linethick0;
560突破系统1——财富游戏1
input:PercentOfRange(0.5,0,1,0.1); //多头突破波动比例 input:LOTS(1,0,9,1);//手数 HighD:=callstockEX(stklabel,vthigh,6,-1,1000); LowD:=callstockEX(stklabel,vtlow,6,-1,1000); OpenD:=valuewhen(date<>REF(date,1),open); RangeT:= HighD-LowD; UpperBand: OpenD +PercentOfRange*RangeT; LowerBand: OpenD -PercentOfRange*RangeT; If (holding=0) THEN BEGIN If (High>=UpperBand) THEN BEGIN Buy(holding=0,1,THISCLOSE);//LIMITR,Max(Open,UpperBand)); END If (Low<=LowerBand) THEN BEGIN BuyShort(holding=0,1,THISCLOSE);//LIMITR,Min(Open,LowerBand)); END END If (holding<0) THEN BEGIN If (High>=UpperBand) THEN BEGIN SellShort(holding<0,1,THISCLOSE);//LIMITR,Max(Open,UpperBand)); Buy(holding=0,1,THISCLOSE);//LIMITR,Max(Open,UpperBand)); END END If (holding>0) THEN BEGIN If (Low<=LowerBand) THEN BEGIN Sell(holding>0,1,THISCLOSE);//LIMITR,Min(Open,LowerBand)); BuyShort(holding=0,1,THISCLOSE);//LIMITR,Min(Open,LowerBand)); END END stickline(holding>0,c,o,5,0),colorred; stickline(holding<0,c,o,5,0),colorblue; 持仓:holding,linethick0; 资产:asset,noaxis,COLORGRAY; 可用现金:cash(0),linethick0;
560突破系统2——财富游戏3
input:K1(0.4,0.3,0.8,0.02);//多头突破波动比例 input:K2(0.4,0.3,0.8,0.02);//空头突破波动比例 input:Mday(1,0,9,1);//M日期最大价差 input:Nday(1,0,9,1);//N日前最大价差 input:LOTS(1,0,9,1); HighD:=callstock(stklabel,vthigh,6,-1); LowD:=callstock(stklabel,vtlow,6,-1); CloseD:=callstock(stklabel,vtclose,6,-1); CYC:=barslast(date<>ref(date,1))+1; OpenD:=valuewhen(cyc=1,open); HH:= HHV(HighD,Mday); HC:= HHV(CloseD,Mday); LL:= LLV(LowD,Mday); LC:= LLV(CloseD,Mday); SellRange:=Max(HH - LC,HC - LL); HH:=HHV(HighD,Nday); HC:=HHV(CloseD,Nday); LL:=LLV(LowD,Nday); LC:=LLV(CloseD,Nday); BuyRange:=Max(HH - LC,HC - LL); UpperBand: OpenD + K1*BuyRange; LowerBand: OpenD - K2*SellRange; If (HOLDING=0) THEN BEGIN If (High>=UpperBand) THEN Buy(HOLDING=0,LOTS,LIMITR,Max(Open,UpperBand)); If (Low<=LowerBand) THEN BuyShort(HOLDING=0,LOTS,LIMITR,Min(Open,LowerBand)); END If (HOLDING<0) THEN BEGIN If (High>=UpperBand) THEN BEGIN SELLSHORT(HOLDING<0,LOTS,LIMITR,Max(Open,UpperBand)); Buy(HOLDING=0,LOTS,LIMITR,Max(Open,UpperBand)); END END If (HOLDING>0) THEN BEGIN If (Low<=LowerBand) THEN BEGIN Sell(holding>0,LOTS,limitr,Min(Open,LowerBand)); BuyShort(holding=0,LOTS,limitr,Min(Open,LowerBand)); END END stickline(holding>0,c,o,5,0),colorred; stickline(holding<0,c,o,5,0),colorblue; //持仓:holding,linethick0; //资产:asset,noaxis,COLORGRAY; //可用现金:cash(0),linethick0;
6日线顺向反K交易系统
RUNMODE:0; INPUT:LOTS(1,1,9,1); IF MOD(MINUTE,60)>0 THEN BEGIN SUM_MIN60HI1:=(("dqs.H1##MIN60"*5)+2*C)/7; SUM_MIN60HI2:=(("dqs.H2##MIN60"*17)+2*C)/19; END H1:IF(MOD(MINUTE,60)=0,"dqs.H1#MIN60",SUM_MIN60HI1); H2:IF(MOD(MINUTE,60)=0,"dqs.H2#MIN60",SUM_MIN60HI2); If (HOLDING=0) THEN BEGIN If (CLOSE<OPEN AND C>H1) THEN Buy(HOLDING=0,LOTS,THISCLOSE); If (C>OPEN AND C<H1) THEN BuyShort(HOLDING=0,LOTS,THISCLOSE); END If (HOLDING<0) THEN BEGIN If (CLOSE>OPEN AND CLOSE<H1) THEN BEGIN SELLSHORT(HOLDING<0,LOTS,THISCLOSE); Buy(HOLDING=0,LOTS,THISCLOSE); END END If (HOLDING>0) THEN BEGIN If (CLOSE<OPEN AND C<H1) THEN BEGIN Sell(holding>0,LOTS,THISCLOSE); BuyShort(holding=0,LOTS,THISCLOSE); END END stickline(holding>0,c,o,5,0),colorred; stickline(holding<0,c,o,5,0),colorblue; 持仓:holding,linethick0; 资产:asset,noaxis,COLORGRAY; 可用现金:cash(0),linethick0;
H1Min60连续策略。单均线交易系统
作者:石世特
出处:http://www.cnblogs.com/TivonStone/
希望本文对你有所帮助,想转随便转,心情好的话给我的文章留个链接.o(. .)o