等级: 新手上路
- 注册:
- 2021-6-29
- 曾用名:
|
A:EMA(CLOSE,21);
Variable:LJYK=0;//累计净盈亏
KDTJ:CROSS(CLOSE,A),NODRAW;
KDTJDN:=BARSLAST(KDTJ),PRECISION0,NODRAW;
DKC:REF(CLOSE,KDTJDN)*10000,PRECISION0,NODRAW;
SHOU:=10;
PD:=CROSS(A,CLOSE) OR TIME=145500,NODRAW;
CCS:CLOSE,PRECISION4,NODRAW;
If PD AND HOLDING()>0 then begin //单笔盘中止损条件判断
DCMYK:=(CCS-DKC)*SHOU;
DCSXF:=SHOU*-4;
LJYK:=LJYK+DCMYK+DCSXF;
DRAWNUMBER(1,LOW*(0.8),LJYK,0,COLORBLACK,0);
DRAWNUMBER(1,LOW*(0.7),CCS,0,COLORRED,0);
DRAWNUMBER(1,LOW*(0.6),DKC,0,COLORBLUE,0);
DCMYK=0;
DCSXF=0;
SHOU=0;
End
SELL(PD AND HOLDING()>0,0,MARKET);
BUY(KDTJ AND HOLDING()=0,SHOU,MARKET);
补充内容 (2021-7-18 20:03):
问题解决了!不用回复了!谢谢! |
-
在300ETF21年7月5250认沽合约中测试截图
|