連續(xù)虧損N次停止開倉M周期 [金字塔]
- 咨詢內(nèi)容:
請教:連續(xù)虧損N次后,停止開倉M周期如何寫?
- 金字塔客服:
variable:n1=0;
if 平倉條件 and 持倉判斷 then begin
平倉語句;
if numprofit(1)>0 then n1:=0;
if numprofit(1)<0 then n1:=n1+1;
end
這段套在平倉語句里面
if 開倉條件 and barslast(n1=n)>=m and 持倉判斷 then 開倉語句;
這句直接添加,原來的開倉語句保留
- 用戶回復(fù):
謝謝您的回復(fù),多謝
- 網(wǎng)友回復(fù):
- 網(wǎng)友回復(fù): 謝謝jinzhe老師,又學(xué)會一招
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫!(不貴!點擊查看價格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容