求程序糾錯(cuò)
作者:金字塔 來(lái)源:cxh99.com 發(fā)布時(shí)間:2015年09月24日
- 咨詢內(nèi)容:
收盤價(jià)大于50根K線的最高價(jià)開(kāi)多單,小于
50根K線的最小價(jià)開(kāi)空單回抽17個(gè)點(diǎn)平倉(cāng),不會(huì)開(kāi)單求程序糾錯(cuò)
input:cc(50,10,150,5);
h_1:=hhv(h,enterbars+1);l_1:=llv(l,enterbars+1);hh:=hhv(h,cc);ll:=llv(l,cc);
kd:=c>hh;kk:=c<ll;
buy(kd and holding=0,1,market);buyshort(kk and holding=0,1,market);
if l<h_1-17 then sell(1,0,market);if h>l_1+17 then sellshort(1,0,market);
- 金字塔客服:
input:cc(50,10,150,5);
h_1:=hhv(h,enterbars+1);
l_1:=llv(l,enterbars+1);
hh:=hhv(h,cc);
ll:=llv(l,cc);
kd:=h>ref(hh,1);
kk:=l<ref(ll,1);
if h>l_1+17 then sellshort(1,0,market);
buy(kd and holding=0,1,market);
if l<h_1-17 then sell(1,0,market);
buyshort(kk and holding=0,1,market);
- 用戶回復(fù):
感謝無(wú)所不能的版主