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

您現在的位置:程序化交易>> 期貨公式>> 交易開拓者(TB)>> 開拓者知識>>正文內容

轉譯TB勝修浮屠 [開拓者 TB]

  • 咨詢內容: 若有善男子善女人愿持此網格轉譯TB,可謂勝修浮屠。

    input: pricevalue(close), length(200), flag_bar(60), Minpip(5), Maxpip(25), buyp(10), sloss(2), account("66666-152032345(CNY)");
    var: flag1(0), flag2(-flag_bar), mp(0), leg(0),mid(0), b1(0), b2(0), b3(0), b4(0), s1(0), s2(0), s3(0), s4(0), zhs(0), initial(0), capital_var(0), cur_bar(1);
    array: arr_num[8](0), b1234[4](0),b1234_tf[4](false);

    mp=marketposition;
    if getappinfo(aistrategyauto)=1 then
    ? ? ? ? if not lastbaronchart_s then
    ? ? ? ? ? ? ? ? cur_bar=currentbar+1
    ? ? ? ? else once cur_bar=currentbar;
    ? ? ? ?

    //computing order funds
    once initial=getrtcashbalance(account);
    capital_var=getrtcashbalance(account);
    value2=minlist(buyp*0.01*initial,capital_var);
    value1=intportion(value2/(close*bigpointvalue*100))*100;
    //computing order funds

    //trend adjustment
    if postradeexitname(1,postradecount(1)-1)="zhs" and mp[1]=1 and mp=0 then
    ? ? ? ? flag2=currentbar;
    if mp=0 and currentbar>=cur_bar then
    ? ? ? ? flag1=flag1+1
    else flag1=0;
    //trend adjustment

    //computing price
    if cur_bar=currentbar or (mp<>mp[1] and mp=0) or flag1=flag_bar or flag2+flag_bar=currentbar then begin
    ? ? ? ? value11=highest(pricevalue,length);
    ? ? ? ? value22=lowest(pricevalue,length);
    ? ? ? ? value33=intportion(((value11-value22)/(minmove*1 point))/8);

    ? ? ? ? if value33<Minpip then
    ? ? ? ? ? ? ? ? leg=Minpip
    ? ? ? ? else if value33>Maxpip then
    ? ? ? ? ? ? ? ? leg=Maxpip
    ? ? ? ? else leg=value33;
    ? ? ? ? mid=close;
    ? ? ? ? b1=mid-1*leg*(minmove*1 point);
    ? ? ? ? b2=mid-2*leg*(minmove*1 point);
    ? ? ? ? b3=mid-3*leg*(minmove*1 point);
    ? ? ? ? b4=mid-4*leg*(minmove*1 point);
    ? ? ? ? s1=mid+1*leg*(minmove*1 point);
    ? ? ? ? s2=mid+2*leg*(minmove*1 point);
    ? ? ? ? s3=mid+3*leg*(minmove*1 point);
    ? ? ? ? s4=mid+4*leg*(minmove*1 point);
    ? ? ? ? zhs=b4-sloss*leg*(minmove*1 point);
    ? ? ? ? arr_num[0]=TL_new_bn(currentbar,mid,currentbar,mid);
    ? ? ? ? arr_num[1]=tl_new_bn(currentbar,b1,currentbar,b1);
    ? ? ? ? arr_num[2]=tl_new_bn(currentbar,b2,currentbar,b2);
    ? ? ? ? arr_num[3]=tl_new_bn(currentbar,b3,currentbar,b3);
    ? ? ? ? arr_num[4]=tl_new_bn(currentbar,b4,currentbar,b4);
    ? ? ? ? arr_num[5]=tl_new_bn(currentbar,s1,currentbar,s1);
    ? ? ? ? arr_num[6]=tl_new_bn(currentbar,s2,currentbar,s2);
    ? ? ? ? arr_num[7]=tl_new_bn(currentbar,s3,currentbar,s3);
    ? ? ? ? arr_num[8]=tl_new_bn(currentbar,s4,currentbar,s4);
    ? ? ? ? tl_setcolor(arr_num[0],blue);
    ? ? ? ? flag1=0;
    end;
    //computing price

    //T+1
    value4=0;
    fill_array(b1234,0);
    fill_array(b1234_tf,false);
    for value5=0 to postradecount(0)-1 begin
    ? ? ? ? if postradeisopen(0,value5)=true and postradeentryname(0,value5)="Initial Entry" then begin
    ? ? ? ? ? ? ? ? b1234[0]=postradesize(0,value5);
    ? ? ? ? ? ? ? ? if juliantodate(postradeentrydatetime(0,value5))<>date or (bartype_ex>=4 and bartype_ex<=7) then begin
    ? ? ? ? ? ? ? ? ? ? ? ? b1234_tf[0]=true;
    ? ? ? ? ? ? ? ? ? ? ? ? value4=value4+b1234[0];
    ? ? ? ? ? ? ? ? end;
    ? ? ? ? end
    ? ? ? ? else if postradeisopen(0,value5)=true and postradeentryname(0,value5)="b1" then begin
    ? ? ? ? ? ? ? ? b1234[1]=postradesize(0,value5);
    ? ? ? ? ? ? ? ? if juliantodate(postradeentrydatetime(0,value5))<>date or (bartype_ex>=4 and bartype_ex<=7) then begin
    ? ? ? ? ? ? ? ? ? ? ? ? b1234_tf[1]=true;
    ? ? ? ? ? ? ? ? ? ? ? ? value4=value4+b1234[1];
    ? ? ? ? ? ? ? ? end;
    ? ? ? ? end
    ? ? ? ? else if postradeisopen(0,value5)=true and postradeentryname(0,value5)="b2" then begin
    ? ? ? ? ? ? ? ? b1234[2]=postradesize(0,value5);
    ? ? ? ? ? ? ? ? if juliantodate(postradeentrydatetime(0,value5))<>date or (bartype_ex>=4 and bartype_ex<=7) then begin
    ? ? ? ? ? ? ? ? ? ? ? ? b1234_tf[2]=true;
    ? ? ? ? ? ? ? ? ? ? ? ? value4=value4+b1234[2];
    ? ? ? ? ? ? ? ? end;
    ? ? ? ? end
    ? ? ? ? else if postradeisopen(0,value5)=true and postradeentryname(0,value5)="b3" then begin
    ? ? ? ? ? ? ? ? b1234[3]=postradesize(0,value5);
    ? ? ? ? ? ? ? ? if juliantodate(postradeentrydatetime(0,value5))<>date or (bartype_ex>=4 and bartype_ex<=7) then begin
    ? ? ? ? ? ? ? ? ? ? ? ? b1234_tf[3]=true;
    ? ? ? ? ? ? ? ? ? ? ? ? value4=value4+b1234[3];
    ? ? ? ? ? ? ? ? end;
    ? ? ? ? end
    ? ? ? ? else if postradeisopen(0,value5)=true and postradeentryname(0,value5)="b4" then begin
    ? ? ? ? ? ? ? ? b1234[4]=postradesize(0,value5);
    ? ? ? ? ? ? ? ? if juliantodate(postradeentrydatetime(0,value5))<>date or (bartype_ex>=4 and bartype_ex<=7) then begin
    ? ? ? ? ? ? ? ? ? ? ? ? b1234_tf[4]=true;
    ? ? ? ? ? ? ? ? ? ? ? ? value4=value4+b1234[4];
    ? ? ? ? ? ? ? ? end;
    ? ? ? ? end;
    end;
    //T+1

    //order
    if currentbar>=cur_bar and flag2+flag_bar<=currentbar then begin
    ? ? ? ? if b1234[1]=0 and close>b2 then
    ? ? ? ? ? ? ? ? buy("b1") value1 shares next bar at b1 limit;
    ? ? ? ? if b1234[2]=0 and close>b3 then
    ? ? ? ? ? ? ? ? buy("b2") value1 shares next bar at b2 limit;
    ? ? ? ? if b1234[3]=0 and close>b4 then
    ? ? ? ? ? ? ? ? buy("b3") value1 shares next bar at b3 limit;
    ? ? ? ? if b1234[4]=0 and close>b4-leg*(minmove*1 point) then
    ? ? ? ? ? ? ? ? buy("b4") value1 shares next bar at b4 limit;

    ? ? ? ? if b1234_tf[4]=true then
    ? ? ? ? ? ? ? ? sell("s1") from entry("b4") next bar at s1 limit;
    ? ? ? ? if b1234_tf[3]=true then
    ? ? ? ? ? ? ? ? sell("s2") from entry("b3") next bar at s2 limit;
    ? ? ? ? if b1234_tf[2]=true then
    ? ? ? ? ? ? ? ? sell("s3") from entry("b2") next bar at s3 limit;
    ? ? ? ? if b1234_tf[1]=true then
    ? ? ? ? ? ? ? ? sell("s4") from entry("b1") next bar at s4 limit;
    ? ? ? ? if b1234_tf[0]=true then
    ? ? ? ? ? ? ? ? sell("Initial_Entry") from entry("Initial Entry") next bar at s4 limit;
    ? ? ? ? sell("zhs") value4 shares total next bar at zhs stop;
    ? ? ? ? tl_setend_bn(arr_num[0],currentbar,mid);
    ? ? ? ? tl_setend_bn(arr_num[1],currentbar,b1);
    ? ? ? ? tl_setend_bn(arr_num[2],currentbar,b2);
    ? ? ? ? tl_setend_bn(arr_num[3],currentbar,b3);
    ? ? ? ? tl_setend_bn(arr_num[4],currentbar,b4);
    ? ? ? ? tl_setend_bn(arr_num[5],currentbar,s1);
    ? ? ? ? tl_setend_bn(arr_num[6],currentbar,s2);
    ? ? ? ? tl_setend_bn(arr_num[7],currentbar,s3);
    ? ? ? ? tl_setend_bn(arr_num[8],currentbar,s4);
    end;
    //order

    ?

    ?來源:CXH99.COM

  • TB技術人員: 五步之內,必有芳草。

    ?

  • TB客服: 善版主

    ?

  • 網友回復: 好程序

 

有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友

可聯系技術人員 QQ: 511411198  點擊這里給我發消息進行 有償 編寫!不貴!點擊查看價格!


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 最新亚洲精品国自产在线 | 91啪国自产在线高清观看 | 中文乱码精品一区二区三区 | 六月婷婷久香在线视频 | 亚洲精品久久久久中文字幕一区 | 亚洲高清美女一区二区三区 | 五月婷婷一区 | 国内外成人在线视频 | 成人短视频在线观看视频 | 成年黄网站免费大全毛片 | 中文字幕日韩在线一区国内 | 日韩一区二区在线视频 | 日韩毛片欧美一级a网站 | 亚洲欧美色综合一区二区在线 | 97久久伊人精品影院 | 四虎影院免费观看 | 777精品视频| 久久99精品福利久久久 | 四虎黄色影视库 | 99久久99久久精品 | 日日碰日日摸日日澡视频播放 | 99精品视频在线在线视频观看 | 国内精品小视频在线 | 日韩不卡一区二区三区 | 国产精品亚洲综合第一区 | 欧美日韩乱码毛片免费观看 | xxx国产老太婆视频 xxx毛片 | 国产中文字幕在线观看 | 老子影院无码午夜伦不卡 | 黄页网址大全免费观看美女 | 欧美aav | 国产精品a在线观看香蕉 | 国产高清日韩 | 理论片我不卡在线观看 | 日本老年人精品久久中文字幕 | 欧美 日韩 中字 国产 | 欧美成人免费全部观看天天性色 | 奇米影视88888 | 九九色综合 | 亚洲精品一区二区三区五区 | 欧美一区二区三区久久久人妖 |