您現在的位置:程序化交易>> 期貨公式>> 金字塔等>> 金字塔知識>>正文內容

求助編寫錯誤 [金字塔]

咨詢內容: 參數設置
KD:c>ma10;
pd:C<MA10;
KK:=pd;
pk:=kd;
A1:=c-AVGENTERPRICE;
if A1>0 AND A1>Q1*MINDIFFTHEN
BEGIN
SELL(1,0,MARKET);
if NUMPROFIT(1)>0 then zz:=1;
if NUMPROFIT(1)<0 then zz:=zz+1;
SELLSHORT(1,0,MARKET);
if NUMPROFIT(1)>0 then zz:=1;
if NUMPROFIT(1)<0 then zz:=zz+1;
END


if A1<0 AND ABS(A1) >Q2*MINDIFFTHEN
BEGIN
SELL(1,0,MARKET);
if NUMPROFIT(1)>0 then zz:=1;
if NUMPROFIT(1)<0 then zz:=zz+1;
SELLSHORT(1,0,MARKET);
if NUMPROFIT(1)>0 then zz:=1;
if NUMPROFIT(1)<0 then zz:=zz+1;
END

if pd and HOLDING>0 then BEGIN
sell(1,ss,MARKET);
if NUMPROFIT(1)>0 then zz:=1;
if NUMPROFIT(1)<0 then zz:=zz+1;
end



if pk and HOLDING<0 then BEGIN
sellshort(1,ss,MARKET);
if NUMPROFIT(1)>0 then zz:=1;
if NUMPROFIT(1)<0 then zz:=zz+1;
end

if zz=1 then ss:=1;
if zz=2 then ss:=1;
if zz=3 then ss:=2;
if zz=4 then ss:=4;
if zz=5 then ss:=8;
if zz>=6 then ss:=16;
if KD and HOLDING=0 then BEGIN
BUY( 1,ss,MARKET);
end

if Kk and HOLDING=0 then BEGIN
BUYshort( 1,ss,MARKET);
end

?

?來源: www.tumamayizhan.com

金字塔資深技術: [PEL] 復制代碼
INPUT:Q1(5,1,1000,1),Q2(5,1,1000,1),S(1,1,100,1);
ma10:ma(c,10);
SS:=S;
KD:c>ma10;
pd:C<MA10;
KK:=pd;
pk:=kd;
A1:=c-AVGENTERPRICE;
if A1>0 AND A1>Q1*MINDIFF  THEN  
BEGIN
SELL(1,0,MARKET);
if NUMPROFIT(1)>0 then zz:=1;
if NUMPROFIT(1)<0 then zz:=zz+1;
SELLSHORT(1,0,MARKET);
if NUMPROFIT(1)>0 then zz:=1;
if NUMPROFIT(1)<0 then zz:=zz+1;
END


if A1<0 AND ABS(A1) >Q2*MINDIFF  THEN  
BEGIN
SELL(1,0,MARKET);
if NUMPROFIT(1)>0 then zz:=1;
if NUMPROFIT(1)<0 then zz:=zz+1;
SELLSHORT(1,0,MARKET);
if NUMPROFIT(1)>0 then zz:=1;
if NUMPROFIT(1)<0 then zz:=zz+1;
END

if pd and HOLDING>0 then BEGIN
sell(1,ss,MARKET);
if NUMPROFIT(1)>0 then zz:=1;
if NUMPROFIT(1)<0 then zz:=zz+1;
end



if pk and HOLDING<0 then BEGIN
sellshort(1,ss,MARKET);
if NUMPROFIT(1)>0 then zz:=1;
if NUMPROFIT(1)<0 then zz:=zz+1;
end

if zz=1 then ss:=1;
if zz=2 then ss:=1;
if zz=3 then ss:=2;
if zz=4 then ss:=4;
if zz=5 then ss:=8;
if zz>=6 then ss:=16;
if KD and HOLDING=0 then BEGIN
BUY( 1,ss,MARKET);
end

if Kk and HOLDING=0 then BEGIN
BUYshort( 1,ss,MARKET);
end


參數默認值請參考input函數使用說明自行調整下。

  • 技術交流: 你們用一分鐘玻摛連續回測一下,發現10月14日以來手數是一下子跳到7。跳到16
    不是慢慢倍增上來,所以說這才是錯的

    ?

  • 技術交流: 如下圖

    截圖202110151637412643.png (148.26 KB, 下載次數: 578)

    下載附件

    2021-10-15 16:37 上傳

  •  

    有思路,想編寫各種指標公式,交易模型,選股公式,還原公式的朋友

    可聯系技術人員 QQ: 262069696  點擊在線交流或微信號:cxh99cxh99  進行 有償收費 編寫!

    怎么收費,代編流程等詳情請點擊閱讀!

    (注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)


    【字體: 】【打印文章】【查看評論

    相關文章

      沒有相關內容
    主站蜘蛛池模板: 久久青草免费91线频观看站街| 国产成人免费在线观看| 久久久国产99久久国产久| 狠狠综合亚洲综合亚洲色| 国产区视频在线观看| 91免费国产在线观看| 成人av电影网站| 久久综合久久综合九色| www.夜夜操| 福利片福利一区二区三区| 国产免费久久精品| 2020亚洲欧美日韩在线观看| 好大好深别停视频视频| 久久久久久久久女黄9999| 桃子视频在线观看高清免费视频 | 无遮挡动漫画在线观看| 亚洲午夜爱爱香蕉片| 狠狠色噜噜狠狠狠狠97不卡 | acg里番全彩侵犯本子福利| 打臀缝打肿扒开夹姜| 久久综合色综合| 欧美性天天影院欧美狂野| 免费一级欧美片在线观免看| 色吊丝永久性观看网站| 国产成人精品综合在线观看| 49289.com| 天堂…中文在线最新版在线| 中文japanese在线播放| 日韩一区二区三区免费视频| 国产麻豆剧看黄在线观看| 久久精品午夜一区二区福利| 欧美换爱交换乱理伦片不卡片| 午夜dj在线观看免费高清在线| 麻豆女神吴梦梦| 国产精品免费一区二区三区| 99精品国产99久久久久久97| 巫山27号制作视频直播| 久久91亚洲精品中文字幕| 日韩精品无码久久一区二区三| 亚洲欧美日韩国产精品专区 | 亚洲AV无码久久久久网站蜜桃|