以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- [求助]有关均价线的模型AAA (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=88913) |
-- 作者:Mikewang -- 发布时间:2015/12/28 11:33:06 -- [求助]有关均价线的模型AAA 有关均价线的模型 思路: 1、收盘价大于分时均价线价买入,收盘价小于分时均价线价卖出; 2、最大亏损12跳; 3、盈利4跳至9跳,如果回调至盈利1跳时平仓;盈利10跳至14跳,如果回调至盈利3跳时平仓;盈利15跳至19跳,如果回调至盈利8跳时平仓;盈利20跳至22跳,如果回调至盈利18跳时平仓;23跳以上跟踪止盈,则最新价从上一次高点回撤3跳,止赢;if c>=enterprice+4 and
c<=enterprice+9 and cross(enterprice+1,c) then sell(1,0,market); if
c>=enterprice+10 and c<=enterprice+14 and cross(enterprice+3,c) then
sell(1,0,market); if
c>=enterprice+15 and c<=enterprice+19 and cross(enterprice+8,c) then
sell(1,0,market); if
c>=enterprice+20 and c<=enterprice+22 and cross(enterprice+18,c) then sell(1,0,market); if
c<=enterprice-4 and c>=enterprice-9 and cross(c,enterprice-1) then
sellshort(1,0,market); if
c<=enterprice-10 and c>=enterprice-14 and cross(c,enterprice-3) then
sellshort(1,0,market); if
c<=enterprice-15 and c>=enterprice-19 and cross(c,enterprice-8) then
sellshort(1,0,market); if
c<=enterprice-20 and c>=enterprice-22 and cross(c,enterprice-18) then
sellshort(1,0,market); if
hhv(h,enterbars+1)>enterprice+20 and hhv(h,enterbars+1)+23 and
cross(enterprice-2,close) then sell(1,0,market); if
llv(l,enterbars+1)<enterprice-20 and llv(l,enterbars+1)-23 and
cross(c,enterprice+2) then sellshort(1,0,market); if
openprofit>=0 and time0>=timetot0(closetime(0))-60*2 then begin sell(1,0,market); sellshort(1,0,market); end
|
-- 作者:jinzhe -- 发布时间:2015/12/28 13:20:19 -- 有关问题在原来的帖子回复,不要再发帖了 |
-- 作者:Mikewang -- 发布时间:2015/12/28 14:00:58 -- 1、当收盘价大于分时均价线价空单平仓同时买入开仓; 2、收盘价小于分时均价线价多单平仓同时卖出开仓; 3、过滤原则。 4、最大亏损12跳; 5、盈利4跳至9跳,如果回调至盈利1跳时平仓;盈利10跳至14跳,如果回调至盈利3跳时平仓;盈利15跳至19跳,如果回调至盈利8跳时平仓;盈利20跳至22跳,如果回调至盈利18跳时平仓;23跳以上跟踪止盈,则最新价从上一次高点回撤3跳,止赢。 |
-- 作者:jinzhe -- 发布时间:2015/12/28 14:23:12 -- dm:=4*-INTPART(LOG(C)); 均线:ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),dm),COLORYELLOW; if close>均线 then begin sellshort(1,0,market); buy(holding=0,1,market); end
if close<均线 then begin sell(1,0,market); buyshort(holding=0,1,market); end
if openprofit<=-12*mindiff*multiplier then begin sellshort(1,0,market); sell(1,0,market); end
if c>=enterprice+10*mindiff and c<=enterprice+14*mindiff and c<=hhv(h,enterbars+1)-3*mindiff then sell(1,0,market); if c>=enterprice+15*mindiff and c<=enterprice+19*mindiff and c<=hhv(h,enterbars+1)-8*mindiff then sell(1,0,market); if c>=enterprice+20*mindiff and c<=enterprice+22*mindiff and c<=hhv(h,enterbars+1)-18*mindiff then sell(1,0,market); if c<=enterprice-4*mindiff and c>=enterprice-9*mindiff and c>=llv(l,enterbars+1)+mindiff then sellshort(1,0,market); if c<=enterprice-10*mindiff and c>=enterprice-14*mindiff and c>=llv(l,enterbars+1)+3*mindiff then sellshort(1,0,market); if c<=enterprice-15*mindiff and c>=enterprice-19*mindiff and c>=llv(l,enterbars+1)+8*mindiff then sellshort(1,0,market); if c<=enterprice-20*mindiff and c>=enterprice-22*mindiff and c>=llv(l,enterbars+1)+18*mindiff then sellshort(1,0,market); if llv(l,enterbars+1)<=enterprice-23*mindiff and close>=llv(l,enterbars+1)+3*mindiff then sellshort(1,0,market); |
-- 作者:Mikewang -- 发布时间:2015/12/28 14:47:06 -- 谢谢,不过: 是分时均价线价哦 1、当收盘价大于分时均价线价空单平仓同时买入开仓; 2、收盘价小于分时均价线价多单平仓同时卖出开仓; 3、过滤原则。
|
-- 作者:jinzhe -- 发布时间:2015/12/28 15:07:17 -- 上面的就是分时均价线 |
-- 作者:Mikewang -- 发布时间:2015/12/28 15:33:13 -- 谢谢老师!可是: 我是仅在分时均价线:1、当收盘价大于分时均价线价空单平仓同时买入开仓; 2、收盘价小于分时均价线价多单平仓同时卖出开仓; 3、过滤原则。 而4楼的程序为什么还在价格远远超过分时均价线之上还有多次开仓。应该是如果超过分时均价线后收盘价没有再跌回均价线之下仅有一次在收盘价超过分时均价线开仓,没有再次开仓的。
|
-- 作者:jinzhe -- 发布时间:2015/12/28 15:39:58 -- 而4楼的程序为什么还在价格远远超过分时均价线之上还有多次开仓。应该是如果超过分时均价线后收盘价没有再跌回均价线之下仅有一次在收盘价超过分时均价线开仓,没有再次开仓的。
这个就是过滤原则的解释吗? |
-- 作者:jinzhe -- 发布时间:2015/12/28 15:44:44 -- 前面的代码做如下修改: variable:bj=0; 均线:ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),dm),COLORYELLOW; if close>均线 then begin sellshort(1,0,market); buy(holding=0 and bj=1,1,market);
if close<均线 then begin sell(1,0,market); buyshort(holding=0 and bj=2,1,market); |
-- 作者:Mikewang -- 发布时间:2015/12/28 16:01:42 -- 是的,谢谢老师。8楼的理解太对了。 |