以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  一根K线只能有一次平仓  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=65481)

--  作者:系统使用者
--  发布时间:2014/5/26 23:36:14
--  一根K线只能有一次平仓
Globalvariable:n=1;
//bar控制一根K线只能有一次开平仓
et1:=extgbdata(\'kaiduo\') ;
et2:=extgbdata(\'kaikong\') ;
if DYNAINFO(7)>et2 and TSELLHOLDING(1)>0 and barpos>extgbdata(\'bar\') then begin
   if mod(o-(et2+1),2)=0 then tsellshort(1,1,lmt,et2+n,0),SLITHERMETHOD;
   n:=1;
   if mod(o-(et2+3),2)>=0 then tsellshort(1,1,lmt,et2+2*n-1,0),SLITHERMETHOD;
   n:=n+1;
end
这样编写对?
[此贴子已经被作者于2014/5/26 23:36:30编辑过]

--  作者:jinzhe
--  发布时间:2014/5/27 9:00:02
--  
思路是什么?