請(qǐng)教編碼1
作者:金字塔 來源:cxh99.com 發(fā)布時(shí)間:2016年09月16日
- 咨詢內(nèi)容:
以下思路,請(qǐng)幫忙編制代碼:
入場(chǎng)規(guī)則:創(chuàng)造一個(gè)新的20日高點(diǎn),并且在接下來的7個(gè)交易日中再創(chuàng)一個(gè)5日低點(diǎn)。一旦5日低點(diǎn)形成,就在下一個(gè)交易日開盤時(shí)買進(jìn)1手
出場(chǎng)規(guī)則分三種:1、在交易的第N天出場(chǎng)或虧損1000元出場(chǎng)2、在20日高點(diǎn)出場(chǎng)或虧損1000元出場(chǎng)3、在40天低點(diǎn)出場(chǎng)或虧損1000元出場(chǎng)
謝謝!
- 金字塔客服:
日線策略嗎?
- 用戶回復(fù):
日線
- 網(wǎng)友回復(fù):
if ref(l=llv(l,5) and barslast(h=hhv(h,20))<=7,1) then buy(holding=0,1,marketr);
if openprofit<-1000 then sell(1,0,marketr);
if enterbars=n then sell(1,0,marketr);
if enterbars>0 and h=hhv(h,20) then sell(1,0,marketr);
if enterbars>0 and l=llv(l,40) then sell(1,0,marketr)
- 網(wǎng)友回復(fù):
多謝!