模型編寫求助
作者:金字塔 來源:cxh99.com 發(fā)布時間:2020年01月10日
-
咨詢內(nèi)容:
日線是陽線,當(dāng)前周期 5 10 20均線多頭排列,并且為陰線,且最低點小于5均線做多,5 10均線死叉平倉
?
-
金字塔客服:
?day_c:CALLSTOCK('',vtCLOSE,6,0);
day_o:CALLSTOCK('',vtOPEN,6,0);
c1:day_c>day_o;//日線是陽線
ma5:ma(c,5);
ma10:ma(c,10);
ma20:ma(c,20);
dtbl:ma5>ma10 and ma10>ma20;//多頭排列
cd:dtbl and c<o and c<ma5 and c1;
if? cd? and? holding=0 then buy(holding=0,1,market);
平倉的你自行處理下。