以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  日内模型BB  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=171987)

--  作者:jzt666
--  发布时间:2019/9/9 12:19:51
--  日内模型BB
老师你好,收盘价上穿日线开盘价做多,下穿日线开盘价反手做空,盈利大于等于200跳止盈(无论多空只要一边盈利200),不再开仓

注:盈利之前开仓次数不限,因为价格在日线开盘价附近,亏损不会太大

--  作者:FireScript
--  发布时间:2019/9/9 13:43:51
--  
空头的话只能等盈利到200点平仓?因为你必须考虑到如果当日空头盈利不到200  要持仓到隔日吗?还有就是金叉时候 如果是空头持仓是否需要平仓?

--  作者:jzt666
--  发布时间:2019/9/9 13:58:25
--  
日内模型到时间清仓,是个反手模型,收盘价上穿日线开盘价做多,如果盈利没到200跳回头下穿日线开盘价,反手做空,如果盈利没到200跳,回头上穿日线开盘价,反手做多,这样循环开仓,如果到收盘不论多空,有无盈利直接清仓
次日再开始,

--  作者:FireScript
--  发布时间:2019/9/9 14:27:29
--  
 VARIABLE:mark:=0;//全局变量限制开仓

cday:=CALLSTOCK(\'\',vtCLOSE,6);
jc:cross(c,CDAY);
sc:CROSS(CDAY,c);

if jc then
begin
sellshort(holding<0,holding,market);
buy(HOLDING=0 and jc and mark=0,1,market);        
end

if sc then
begin
sell(holding>0,holding,market);
buyshort(holding=0 and sc and mark=0,1,market);    
end

dtyl:(c-AvGENTERPRICE)>=200*MINDIFF and holding>0;//多头盈利
ktyl:(AvGENTERPRICE-c)>=200*MINDIFF and holding<0;

if dtyl then
begin
sell(holding>0,holding,market);    
mark:=1;
end


if ktyl then
begin
sellshort(holding<0,holding,market);
mark:=1;
end

if time=CLOSETIME(0) then
begin
收盘空头平仓:sellshort(holding<0,holding,market);    
收盘多头平仓:sell(holding>0,holding,market);
mark:=0;    
end


供参考。
[此贴子已经被作者于2019/9/9 14:27:51编辑过]

--  作者:jzt666
--  发布时间:2019/9/9 14:32:36
--  
?????
--  作者:FireScript
--  发布时间:2019/9/9 14:49:40
--  
 参考4楼,已经解除屏蔽了。