求寫關(guān)于5個(gè)周期內(nèi)最高最低突破的簡(jiǎn)單策略 [金字塔]
- 咨詢內(nèi)容:
這里以3分鐘圖表為例
開倉條件
開盤5個(gè)周期后,價(jià)格突破前5個(gè)周期的最高價(jià),并且5個(gè)周期內(nèi)價(jià)格的最高減最低超過10個(gè)點(diǎn),并且5日均線向上,則做多
開盤5個(gè)周期后,價(jià)格突破前5個(gè)周期的最低價(jià),并且5個(gè)周期內(nèi)價(jià)格的最高減最低超過10個(gè)點(diǎn),并且5日均線向下,則做空
平倉條件
價(jià)格突破前5個(gè)周期的最高價(jià),則平掉空單
價(jià)格突破前5個(gè)周期的最低價(jià),則平掉多單
開盤最后第二個(gè)周期全部平倉,并且不再開單
要求能在免費(fèi)版情況下使用
請(qǐng)問怎么解決,我是菜鳥,求指教,感激不盡
- 金字塔客服:
如何定義均線向上
- 用戶回復(fù):
當(dāng)前K線的均線值比上一周期的均線值大,就是向上,反之向下
- 網(wǎng)友回復(fù):
ma5:ma(c,5);
n1:=barslast(date<>ref(date,1))+1;
timet:= time>090300 and time<145700;
cond1:=c>ref(hhv(h,5),1) ;cond2:=c<ref(llv(l,5),1);
cond3:=c>ref(hhv(h,5),1) and ref(hhv(h,5),1)-ref(llv(l,5),1)>=10*mindiff and ma5>ref(ma5,1);
cond4:=c<ref(llv(l,5),1) and ref(hhv(h,5),1)-ref(llv(l,5),1)>=10*mindiff and ma5<ref(ma5,1);
if n1>=5 and timet then begin
if cond1 then sellshort(holding<0,0,market);
if cond2 then sell(holding>0,0,market);
if cond3 then buy(holding=0,1,market);
if cond4 then buyshort(holding=0,1,market);
end
if time>=145700 and time<=150000 then begin
sell(1,0,market);
sellshort(1,0,market);
end - 網(wǎng)友回復(fù): 多謝高手指點(diǎn),早上有事出去了,我馬上測(cè)下
如果以上指標(biāo)公式不適用于您常用的行情軟件
或者您想改編成選股公式,以便快速選出某種形態(tài)個(gè)股的話,
- 上一篇:[求助]Fun 對(duì)象中有無相關(guān)系數(shù)的函數(shù)
- 下一篇:沒有了!
相關(guān)文章
-
沒有相關(guān)內(nèi)容