等级: 免费版
- 注册:
- 2021-6-3
- 曾用名:
|
老师,你好!
我将图表交易与后台交易混合到一起,请看以下8句 的写法是否合适?
特别是第2句的加仓以及第5句的平掉多余仓位是否正确 ? 谢谢
M5:Ma(open,5) ;
M10:Ma(open,10) ;
lot:=5;//开仓数量
//====开仓及加仓=======
1后台开: Tbuy ( M5>M10 and cond and Holding=0 , Lot,LMT,C ) ;
2通过后台加仓: Tbuy( Holding<>0 and Tbuyholding(1)=0 and Cond2 , Lot, LMT, C ) ; //虚拟持仓不为0 但实际持仓为0 的时候加仓
3图表开: Buy(M5>M10 and cond and Holding=0 , Lot,Limitr,C ) ;
//== 平仓及平掉多余仓位 =================================
4后台平: TSell( M5<M10 and Cond3 and Enterbars>=10 and Holding>0 , Holding, LMT,C) ;
5后台平推多余仓位: Tsell ( Tbuyholding(1)>= Lot +1 and H>=Tenterprice , Tbuyholding(1) - Lot, LMT, Tenterprice); // 因为开平仓信号有时候闪烁,会出现持仓数量大于虚拟仓位
6图表平: Sell( M5<M10 and Cond3 and Enterbars>=10 and Holding>0 , Holding,Limitr,C) ;
//=== 止损部分 ===================
Zhisun:=Enterprice*0.995 ,colorgray;
7后台止损L: Tsell( Low<=Zhisun and Enterbars>=1 and Holding>0,Holding, LMT, Zhisun );
8图表止损L: Sell( Low<=Zhisun and Enterbars>=1 and Holding>0,Holding, Limitr, Zhisun );
|
|