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

請老師幫忙修改:連續(xù)虧損兩次后程序就停止買賣30分鐘,30分鐘后還虧再停30分鐘?先謝了 [金字塔]

  • 咨詢內(nèi)容:

    //2013-09-01

    variable:HigherAfterEntry=0,LowerAfterEntry=999999;


    input:n1(3,1,30,1);
    input:n2(24,5,40,1);
    input:n3(90,50,100,5);
    input:n4(1,1,4,1);
    input:n5(68,50,100,5);
    input:n6(2,1,30,1);
    input:n7(13,3,30,1);
    input:n8(13,3,30,1);


    open5_1:callstock('',vtopen,2,-1);//5分鐘周期的開盤價
    close5_1:callstock('',vtclose,2,-1);//5分鐘周期的收盤價

    open3_1:callstock('',vtopen,17,-1);//3分鐘周期的開盤價
    close3_1:callstock('',vtclose,17,-1);//3分鐘周期的收盤價

    vols20_1:=callstock('',vtvol,22,20);//20秒周期的成交量
    vol1_1:=callstock('',vtvol,1,-1);//1分鐘周期的成交量

    avvol:ma(ref(vol,2),5),noaxis,linethick0;
    dayopen:=valuewhen(date<>ref(date,1),open);

    開盤價:=dayopen,noaxis,linethick0;
    成交量:=REF(vol,1),noaxis,linethick0;

    if date<>ref(date,1) then
    begin

    loss:=0; //限制開倉方式一,只開一次
    count1:=1;
    count2:=1;

    end

    計數(shù)一:=count1,noaxis,linethick0;
    計數(shù)二:=count2,noaxis,linethick0;
    計數(shù)三:=loss,noaxis,linethick0;

    h_1:=ref(h,1);
    l_1:=ref(l,1);

    c_1:=ref(c,1);

    o_1:=ref(o,1);

    vol_1:=ref(vol,1);

    vol_2:=ref(vol,2);

    vol_3:=ref(vol,3);

    vol_4:=ref(vol,4);

    sumvol:vol_2+vol_3+vol_4,noaxis,linethick0;

    lots:=1;

     
     If enterbars=0 then
     begin
     HigherAfterEntry:=enterprice;
     LowerAfterEntry:=enterprice;
     end;
    else If enterbars>=1 then
     begin
     HigherAfterEntry:=max(HigherAfterEntry,h_1);
     LowerAfterEntry:=min(LowerAfterEntry,l_1);
     end;
     hh:HigherAfterEntry,noaxis,linethick0;
    ll:LowerAfterEntry,noaxis,linethick0;


     
     if holding>0  and  l<=ENTERPRICE-n2
     
     then 
     begin
     sell(1,holding,limitr,enterprice-n2),IGNORECHECKPRICE;

     end
     
     if holding<0  and  h>=ENTERPRICE+n2
     then 
     begin
     sellshort(1,holding,limitr,enterprice+n2),IGNORECHECKPRICE;

     end
     
      

     
     if  holding=0  and count2=1 then
     
     begin
     
     if *************************
     then
     begin
     buy(1,lots,limitr,open),IGNORECHECKPRICE;
     HigherAfterEntry:=enterprice;
     LowerAfterEntry:=enterprice;
    end
     
     end
     
     
      if  holding=0  and count2=1
     
     then
     
     begin

     if  ***************************
     then
     begin
      buySHORT(1,lots,limitr,open),IGNORECHECKPRICE;
     HigherAfterEntry:=enterprice;
     LowerAfterEntry:=enterprice;
       end
      
     end
     
     
     //再次開多單的平倉
     
     if holding>0 and enterbars>0  then
     
     begin
     
     
     if  enterbars>=1   and *****************
     then
     begin
     price:=EnterPrice+(HigherAfterEntry-EnterPrice)*n5/100;
     if low<=price then
     begin
     sell(1,holding,limitr,min(open,price)),IGNORECHECKPRICE;
     count2:=1;
     end;
    end
     
     
     
     
    //再次開空單的平倉
     
     if holding<0 and enterbars>0  then
     
     begin
     
        if  enterbars>=1   and *****************************
     then
     begin
     price:=EnterPrice - (EnterPrice-LowerAfterEntry)*n5/100;
     if high>=price then
     begin
     sellshort(1,holding,limitr,max(open,price)),IGNORECHECKPRICE;
      count2:=1;
     end;
     end;
     
     

     

     

  • 金字塔客服:

    30分鐘后無論條件是否滿足都要開倉?

    這個策略用在哪個公式上?

 

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

可聯(lián)系技術(shù)人員 QQ: 1145508240  點擊這里給我發(fā)消息進(jìn)行 有償 編寫!不貴!點擊查看價格!


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
主站蜘蛛池模板: 亚洲综合五月天欧美| 中文字幕无码精品亚洲资源网 | 两个体校校草被c出水| 欧美一级在线视频| 免费五级在线观看日本片| 青青青亚洲精品国产| 国产精品国产三级国产在线观看| 一个人看的www片免费中文| 日本大片在线看黄a∨免费| 亚洲午夜在线一区| 男人桶女人j的视频在线观看| 国产三级在线视频播放线| 亚洲综合五月天欧美| 在线视频一区二区日韩国产| 中国内地毛片免费高清| 日美韩电影免费看| 亚洲六月丁香婷婷综合| 狠色狠色狠狠色综合久久| 四虎影永久在线高清免费| 黄色毛片视频免费| 国产精品莉莉欧美自在线线| www.色午夜| 我和岳乱妇三级高清电影| 九九精品视频在线播放8| 欧美精品中文字幕亚洲专区| 免费精品视频在线| 老子影院午夜伦不卡| 国产又黄又爽胸又大免费视频| 1024手机看片基地| 在线看的你懂的| xxxx日本免费| 无码专区永久免费AV网站| 久久超碰97人人做人人爱| 欧美大交乱xxxxxbbb| 亚洲精品mv在线观看| 男女性接交无遮挡免费看视频 | 一区二区三区中文| 无套进入30p| 久久免费观看国产精品88av| 机机对机机30分钟无遮挡的软件免费大全 | 再深点灬用力灬太大了|