大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频75-大伊香蕉在线精品视频人碰人

您現(xiàn)在的位置:程序化交易>> 期貨公式>> 金字塔等>> 金字塔知識(shí)>>正文內(nèi)容

[原創(chuàng)]輪詢交易,信號(hào)反復(fù),導(dǎo)致多次開(kāi)平。我參考了個(gè)程序,看看能否行? [金字塔]

  • 咨詢內(nèi)容:

    WARNING_DISABLE:4;
    ss:=1; //手?jǐn)?shù)
    extgbdataset('t1_position',0);
    //0表示沒(méi)有倉(cāng)位,1表示持有多頭, -1表示持有空頭
    extgbdataset('t1_holding',0);
    //0表示沒(méi)有倉(cāng)位,>0表示持有多頭, <0表示持有空頭
    extgbdataset('t1_enterbarpos',0);//記錄其開(kāi)倉(cāng)的K線

    maa:ema(c,10);
    bpk:=cross(c,maa);
    spk:=cross(maa ,c);
    //非最后一根K線退出
    if not(islastbar) or workmode<>1 then exit;

    //如果當(dāng)是最后一根k線,執(zhí)行
    IF islastbar and  time<151000 then begin

     // 如果最后一根k線發(fā)生過(guò)開(kāi)倉(cāng)信號(hào),則那一根k線不再交易
     if extgbdata('t1_enterbarpos') = barpos then begin
      goto continueline ;
     end
     
    //沒(méi)有持倉(cāng)狀態(tài)
    if extgbdata('t1_position')=0  and extgbdata('t1_holding')=0 then begin
         if  bpk then begin
          
            buy(1,ss,c);
            extgbdataset('t1_position',1);
            extgbdataset('t1_holding',ss);
            extgbdataset('t1_enterbarpos',barpos);
            goto continueline ;
          
          end

          if spk then begin
         
             buyshort(1,ss,c);
             extgbdataset('t1_position',-1);//程序化交易 m.weiqiv.net.cn
             extgbdataset('t1_holding',-ss);
             extgbdataset('t1_enterbarpos',barpos);
             goto continueline ;
           
          end
    end//沒(méi)有持倉(cāng)狀態(tài)
       
    //持有倉(cāng)位狀態(tài)
       //持有空頭
    if bpk and extgbdata('t1_position')=-1   and  extgbdata('t1_holding')<0 then begin

           sellshort(1,ss,c);
           buy(1,ss,c);
           extgbdataset('t1_position',1);
           extgbdataset('t1_holding',ss);
           extgbdataset('t1_enterbarpos',barpos);
           goto continueline ;
         
    end
        //持有多頭
    if spk and extgbdata('t1_position')=1    and  extgbdata('t1_holding')>0  then begin

            sell(1,ss,c);
            buyshort(1,ss,c);
            extgbdataset('t1_position',-1);
            extgbdataset('t1_holding',-ss);
            extgbdataset('t1_enterbarpos',barpos);
            goto continueline ;
          
    end
    END//if  ISLASTBAR

    if  time>=151300 then begin

                 sell(extgbdata('t1_holding')>0,ss,c);
                 sellshort(extgbdata('t1_holding')<0,ss,c);
                 extgbdataset('t1_position',0);
                 extgbdataset('t1_holding',0);
                        
    end

    continueline@ 資產(chǎn):tasset,linethick0;
    position:=extgbdata('t1_position');
    t1holding:=extgbdata('t1_holding');
    debugfile('d:\debug\803555.txt','position=%.0f' ,position) ;
    debugfile('d:\debug\803555.txt','t1holding=%.0f' ,t1holding) ;

     

     

    以上代碼能在金子塔里測(cè)試嗎?我用了,不能出信號(hào)。

     

  • 金字塔客服: 要學(xué)會(huì)自己測(cè)試+調(diào)試

 

有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友

可聯(lián)系技術(shù)人員 QQ: 1145508240  有需要幫忙請(qǐng)點(diǎn)擊這里留言!!!進(jìn)行 有償 編寫!不貴!點(diǎn)擊查看價(jià)格!


【字體: 】【打印文章】【查看評(píng)論

相關(guān)文章

    沒(méi)有相關(guān)內(nèi)容
主站蜘蛛池模板: 天天操女人 | 欧美性狂猛bbbbxxxx | 国产91精品高清一区二区三区 | 中国国产高清一级毛片 | 青青草99热这里都是精品 | 久久国产精品久久久久久久久久 | 欧美一区二区手机在线观看视频 | 一本大道香蕉中文在线高清 | 十八女人毛片 | 国产毛片在线 | 日本高清h色视频在线观看 日本高清不卡二区 | 久久毛片久久毛 | 色网站在线 | 爱搞逼综合 | 一本岛高清v不卡免费一三区 | 免费看一区二区三区 | 亚洲热热久久九九精品 | 日日干夜夜欢 | 国产美女流白浆的免费视 | 国产羞羞视频在线播放 | 中文字幕第13亚洲另类 | 国产欧美日韩一区 | 天堂福利视频 | 欧美日韩中文字幕 | 福利院肉动漫视频在线观看 | 日本高清免费不卡毛片 | 色啦啦在线观看 | 久久香蕉国产线 | 在线视频欧美精品 | 国产99久久九九精品免费 | 第一国内永久免费福利视频 | 自拍偷自拍亚洲精品被多人伦好爽 | 国产一区二区三区乱码网站 | 国产图片综合 | 亚洲精品国产成人专区 | 奇米影视9999 | 亚洲国产精品线播放 | 日韩精品欧美成人 | a级做爰片毛片视频 | 国产美女白丝袜精品_a不卡 | 亚洲综合成人网在线观看 |