新手請教老師 ,以下寫法! [金字塔]
- 咨詢內容:
新手請教老師 以下策略應該什么寫?
本策略用在1分鐘日內交易
開多倉條件A:當天上午9:00后第一根K線是陽線,且C>ma60; 限制條件每天只在前6根線有信號才下單,(當天第二次下單是,第一單止贏或止損后,滿足以上條件再下第二單)
開空倉條件B:當天上午9:00后第一根K線是陰線,且C<ma60; 限制條件每天只在前6根線有信號才下單
多單出場策略一:
當天14:50全部平倉
虧損大于20跳平倉
贏利達到80跳平倉
空單則反之
不管多單還是空單只要連續虧損達到6次,那么第七次開倉手數為之前的3倍,直到盈利然后再恢復原來的倉位進行交易
以上請老師幫忙編寫,非常感謝!
- 金字塔客服:
處理中,請稍等
- 用戶回復:
variable:n=0,ss=1;
ma60:ma(c,60);
tt:=time<145000;
cond1:=(c>ma60 and todaybar<=6);
cond2:=(c<ma60 and todaybar<=6);
if cond1 and tt then buy(holding=0,ss,marketr);if cond2 and tt then buyshort(holding=0,ss,marketr);
if holding>0 and h-enterprice>=80*mindiff then begin
sell(1,0,marketr);
n:=0;
ss:=1;
end
if holding>0 and l<=enterprice-20*mindiff then begin
sell(1,0,marketr);
n:=n+1;
endif holding<0 and enterprice-l>=20*mindiff then begin
sellshort(1,0,marketr);
n:=0;
ss:=1;
end
if holding<0 and h-enterprice>=80*mindiff then begin
sellshort(1,0,marketr);
n:=n+1;
endif n=6 and ref(n=5,1) then ss:=ss*3;
if time=145000 then begin
sell(1,0,marketr);
sellshort(1,0,marketr);
endif time=closetime(0) then begin
n:=0;
ss:=1;
end
- 網友回復:
開多倉條件A:當天上午9:00后第一根K線是陽線,且C>ma60; 限制條件每天只在前6根線有信號才下單,(當天第二次下單是,第一單止贏或止損后,滿足以上條件再下第二單)
老師,當天上午9:00后第一根K線是陽線:這個條件好像沒加進去? - 網友回復:
現在看你的開倉條件有點看不懂?你的開倉條件是:全天的開倉取決于第一根是否陰陽,同時還要和ma60比較,之后的周期再怎么花樣都不影響開倉?
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容