zcm6533 [金字塔]
- 咨询内容:
VARIABLE:最高资产=200000,最高回撤=0,swgd=0,swdd=0;//gbbh该捧进场编号,mrj买入价,GD高点,DD低点
variable:hd=0;
增仓手数:=1;
HH1:=IFELSE(H<REF(H,2)&&REF(H,1)<REF(H,2),REF(H,2),0);
LL1:=IFELSE(L>REF(L,2)&&REF(L,1)>REF(L,2),REF(L,2),0);
HH2:=VALUEWHEN(HH1>0,HH1);
LL2:=VALUEWHEN(LL1>0,LL1);
K1:=IFELSE(CLOSE>HH2,-3,IFELSE(LL2>CLOSE,1,0));
K2:=VALUEWHEN(K1<>0,K1);//K1不等于0时,取K1的值//第一信号入场
SELLSHORT(K2=-3 and HOLDING<0,0,LIMITR,c),ORDERQUEUE;
SELLSHORT(time=151500 and HOLDING<0,0,LIMITR,c),ORDERQUEUE;
BUY(K2=-3 and c>o-5 and BETWEEN(time,093000,144500) and HOLDING=0,1,LIMITR,c),ORDERQUEUE;
SELL(K2=1 and HOLDING>0,0,LIMITR,c),ORDERQUEUE;
SELL(time=151500 and HOLDING>0,0,LIMITR,c),ORDERQUEUE;
BUYSHORT(K2=1 and o>c-5 and BETWEEN(time,093000,144500) and HOLDING=0,1,LIMITR,c),ORDERQUEUE;//增仓
//增仓手数:=1;//原1+增4手//100万本金//4
ATR2:=ref(MA(TR,12),1);//12
反向:=ATR2*0.39;//0.39
回几k线内:=1;//1
顺几k线内:=1;//1
增仓赢几点出:=7;//7
zs1:=10;//10
zs2:=9;//9
zs3:=11;//11
zs4:=13;//13
zs5:=9;//9SELLSHORT(ENTERBARS>=1 and ENTERBARS<=2 and c>o and ENTERPRICE-l>增仓赢几点出 and HOLDING=-(1+增仓手数),0,LIMITR,min(ENTERPRICE-增仓赢几点出,o)),ORDERQUEUE;
SELLSHORT(ENTERBARS=1 and h-ENTERPRICE>zs1 and HOLDING=-(1+增仓手数),0,LIMITR,max(ENTERPRICE+zs1,o)),ORDERQUEUE;
SELLSHORT(ENTERBARS=2 and h-ENTERPRICE>zs2 and HOLDING=-(1+增仓手数),0,LIMITR,max(ENTERPRICE+zs2,o)),ORDERQUEUE;
SELLSHORT(ENTERBARS=3 and h-ENTERPRICE>zs3 and HOLDING=-(1+增仓手数),0,LIMITR,max(ENTERPRICE+zs3,o)),ORDERQUEUE;
SELLSHORT(ENTERBARS=4 and h-ENTERPRICE>zs4 and HOLDING=-(1+增仓手数),0,LIMITR,max(ENTERPRICE+zs4,o)),ORDERQUEUE;
SELLSHORT(ENTERBARS>4 and h-ENTERPRICE>zs5 and HOLDING=-(1+增仓手数),0,LIMITR,max(ENTERPRICE+zs5,o)),ORDERQUEUE;
SELLSHORT(ENTERBARS>0 and ENTERPRICE-l>增仓赢几点出 and HOLDING=-(1+增仓手数),0,LIMITR,min(ENTERPRICE-增仓赢几点出,o)),ORDERQUEUE;BUY(ENTERBARS>0 and ENTERBARS<=回几k线内 and l<=ENTERPRICE-反向 and HOLDING=1,增仓手数,LIMITR,min(ENTERPRICE-反向,o)),ORDERQUEUE;
BUY(ENTERBARS>0 and ENTERBARS<=顺几k线内 and H>ENTERPRICE and HOLDING=1,增仓手数,LIMITR,max(ENTERPRICE+MINDIFF,o)),ORDERQUEUE;SELL(ENTERBARS>=1 and ENTERBARS<=2 and o>c and h-ENTERPRICE>增仓赢几点出 and HOLDING=1+增仓手数,0,LIMITR,max(ENTERPRICE+增仓赢几点出,o)),ORDERQUEUE;
SELL(ENTERBARS=1 and ENTERPRICE-l>zs1 and HOLDING=1+增仓手数,0,LIMITR,min(ENTERPRICE-zs1,o)),ORDERQUEUE;
SELL(ENTERBARS=2 and ENTERPRICE-l>zs2 and HOLDING=1+增仓手数,0,LIMITR,min(ENTERPRICE-zs2,o)),ORDERQUEUE;
SELL(ENTERBARS=3 and ENTERPRICE-l>zs3 and HOLDING=1+增仓手数,0,LIMITR,min(ENTERPRICE-zs3,o)),ORDERQUEUE;
SELL(ENTERBARS=4 and ENTERPRICE-l>zs4 and HOLDING=1+增仓手数,0,LIMITR,min(ENTERPRICE-zs4,o)),ORDERQUEUE;
SELL(ENTERBARS>4 and ENTERPRICE-l>zs5 and HOLDING=1+增仓手数,0,LIMITR,min(ENTERPRICE-zs5,o)),ORDERQUEUE;
SELL(ENTERBARS>0 and h-ENTERPRICE>增仓赢几点出 and HOLDING=1+增仓手数,0,LIMITR,max(ENTERPRICE+增仓赢几点出,o)),ORDERQUEUE;BUYSHORT(ENTERBARS>0 and ENTERBARS<=回几k线内 and h>=ENTERPRICE+反向 and HOLDING=-1,增仓手数,LIMITR,max(ENTERPRICE+反向,o)),ORDERQUEUE;
BUYSHORT(ENTERBARS>0 and ENTERBARS<=顺几k线内 and l<ENTERPRICE and HOLDING=-1,增仓手数,LIMITR,min(ENTERPRICE-MINDIFF,o)),ORDERQUEUE;mhnk:ENTERBARS,NODRAW;
//VARIABLE:最高资产=200000,最高回撤=0,swgd=0,swdd=0;//gbbh该捧进场编号,mrj买入价,GD高点,DD低点
资产:ASSET,NOAXIS,colorgreen;
最高资产:=if(资产>最高资产,资产,最高资产);
回撤值:=最高资产-资产;
最高回撤:=if(回撤值>最高回撤,回撤值,最高回撤);
最大回撤值:最高回撤,NODRAW;
stickline(holding>0,low,high,0.1,1),coloryellow;
stickline(holding>0 and c>o,close,open,10,1),coloryellow;
stickline(holding>0 and c<=o,close,open,10,0),coloryellow;
stickline(holding<0,low,high,0.1,1),colorblue;
stickline(holding<0 and c>o,close,open,10,1),colorblue;
stickline(holding<0 and c<=o,close,open,10,0),colorblue;------------------------------------请助如何 实现收线建仓,即时平仓,谢谢,
- 金字塔客服:
走完k线开仓,及时平仓,要用图表交易的1秒固定时间间隔模式,然后堆开仓语句做下修改
比如:
BUY(K2=-3 and c>o-5 and BETWEEN(time,093000,144500) and HOLDING=0,1,LIMITR,c),ORDERQUEUE;
要改成
BUY(ref(K2=-3 and c>o-5 and BETWEEN(time,093000,144500),1) and HOLDING=0,1,LIMITR,c),ORDERQUEUE;
1秒固定时间间隔如下图设定
此主题相关图片如下:1.png
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容