-- 作者:jinzhe
-- 发布时间:2015/6/9 8:55:58
--
if holding>0 and close<ref(L,enterbars) then 止损多:sell(1,0,thisclose);
holding<0 and close>ref(H,enterbars) then 止损空:sellshort(1,0,thisclose);
类似这样的写法,止损多和止损空在一个策略里面只能存在一个,所以你的要求我写了两个止损来实现
|
-- 作者:jinzhe
-- 发布时间:2015/6/9 13:15:32
--
公式1:
bb:sum(buyvol,barslast(minute<>ref(minute,1))+1); ss:sum(sellvol,barslast(minute<>ref(minute,1))+1);
公式2
bb:=stkindi(\'\',\'公式1.bb\',0,0); ss:=stkindi(\'\',\'公式1.ss\',0,0);
stickline(1,0,bb,8,0),colorred; stickline(1,-1*ss,0,8,0),colorcyan;
[此贴子已经被作者于2015/6/9 13:19:57编辑过]
|