請(qǐng)老師幫忙寫個(gè)策略
作者:金字塔 來源:cxh99.com 發(fā)布時(shí)間:2019年12月01日
-
咨詢內(nèi)容:
老師:請(qǐng)幫忙寫個(gè)代碼
連續(xù)2根陽線,第3根open 開多,盈利10跳 平多(開倉當(dāng)根,若滿足盈利就當(dāng)根平倉);
?
-
金字塔客服:
老師:請(qǐng)幫忙寫個(gè)代碼
連續(xù)2根陽線,第3根open 開多,盈利10跳 平多(開倉當(dāng)根,若滿足盈利就當(dāng)根平倉);若開倉后low<第一根陽線的LOW,則止損。
?
?來源:程序化久久網(wǎng)( www.tumamayizhan.com )
-
用戶回復(fù):
if ref(all(c>o,2),1) and holding=0 then buy(1,1,marketr);
if close-enterprice>10*mindiff and holding>0 then sell(1,holding,marketr);
if low<ref(low,enterbars+1) and holding>0 then sell(1,1,marketr);