連虧次數 [金字塔]
- 咨詢內容:
老師好,如果 求的連虧次數的次數,,就是連虧5次,,一共出現了幾次,連虧3次,一共出現 幾次,測試報告里沒有呀
- 金字塔客服:
沒有這樣的數據的
- 用戶回復:
是軟件里沒有函數,還是寫不出來 ,,,在3年內,,連續虧損3次,4次,5次,,,一共出現了幾次,
- 網友回復:
沒有這樣的函數的,
寫法參考:
variable:n=0;
variable:ss3=0,ss4=0,ss5=0;
if 平多條件 and holding>0 then begin
sell.......;
if numprofit(1)>=0 then n:=0;
if numprofit(1)<0 then n:=n+1;
if n=3 then ss3:=ss3+1;
if n=4 then ss4:=ss4+1;
if n=5 then ss5:=ss5+1
end
if 平空條件 and holding<0 then begin
seshortll.......;
if numprofit(1)>=0 then n:=0;
if numprofit(1)<0 then n:=n+1;
if n=3 then ss3:=ss3+1;
if n=4 then ss4:=ss4+1;
if n=5 then ss5:=ss5+1
end
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容