同时有多单又有空单,帮忙检查下哪里错了 [金字塔]
- 咨询内容:
INPUT:N1(160,20,300,10),N2(160,20,300,10),N3(200,20,300,10),N4(200,20,300,10);
DIFF:=EMA(C,12)-EMA(C,26);
DEA:=EMA(DIFF,9);MA20:MA(C,20);
D1:=COUNT(CROSS(DIFF,0),10)>=1;
D2:=COUNT(CROSS(C,MA20),10)>=1;
K1:=COUNT(CROSS(0,DIFF),10)>=1;
K2:=COUNT(CROSS(MA20,C),10)>=1;
//开多
DK1:=CROSS(C,MA20) AND D1 ;//AND C>=D3
DK2:=CROSS(DIFF,0) AND D2 ;//AND C>=D3
DMA20:=VALUEWHEN(CROSS(C,MA20),MA20);//向上突破20均线时,取20周期均线的值
DJC:=DMA20+N1*MINDIFF;//进场价格为均线上N3个变动单位//开空
KK1:=CROSS(MA20,C) AND K1 ;
KK2:=CROSS(0,DIFF) AND K2 ;KMA20:=VALUEWHEN(CROSS(MA20,C),MA20);
KJC:=KMA20-N2*MINDIFF;//VERTLINE(D2),COLORRED;
//VERTLINE(KP1),COLORGREEN;
//
ADK:=DK1 OR DK2;
AKK:=KK1 OR KK2;
//开仓
BUY(ADK AND HOLDING=0,1,LIMITR,DJC);
buyshort(AKK AND HOLDING=0,1,LIMITR,KJC);//多头平仓
DCC:=KMA20-N3*MINDIFF;
DP1:=CROSS(DCC,L) ;
//空头平仓
KCC:=DMA20+N4*MINDIFF;
KP1:=CROSS(H,KCC) ;
//平仓
多方出场:sell(DP1 AND HOLDING>0,1,LIMITR,DCC);空方出场:sellshort(KP1 AND HOLDING<0,1,LIMITR,KCC);
- 金字塔客服:
图表?同时有多空单?有未来导致信号闪烁
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容