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

onbarclose應(yīng)用實(shí)例好像不執(zhí)行 [開拓者 TB]

  • 咨詢內(nèi)容:

    Vars

    ? ? Array<numeric>settime([0.095800,0.105800,0.11295800,0.135800,0.145800,0.215800,0.225800]);
    ?? ?
    ?? ?Numeric Lotsold;
    ?? ?Numeric Lotsnew;
    ?? ??? ?
    ? ? Series<Numeric> MA3; ? ? ?? ??? ??? ?//中軌
    ?? ?Series<Numeric> SD ; ? ??? ??? ??? ?//通道距離
    ?? ?Series<Numeric> Top; ? ??? ??? ??? ?//通道高點(diǎn)
    ?? ?Series<Numeric> Bottom; ?? ?
    ? ? Series<Numeric> Bottomm;?? ?//通道低點(diǎn)

    ?? ?
    ?? ?bool cnbpk;
    ?? ?bool cnspk;
    ?? ?bool timecondition;
    ?? ?
    Events

    ? ?OnBar(ArrayRef<Integer> indexs)
    ? ?
    ? ?
    ? ?
    ? ? { ??
    ? ? ?? ?
    ? ?? ?
    ? ? ?? ?
    ? ? ?? ??? ?//平移boll通道計(jì)算
    ? ? ? ? MA3 = Average(C,P3); ? ? ? ?
    ? ? ?? ?SD = StandardDev(c,p3,2)*p;
    ? ? ?? ?Top = ma3 + SD;
    ? ? ?? ?Bottom = ma3 - SD;
    ? ? ?? ?PlotNumeric("MA3",MA3);
    ? ? ?? ?PlotNumeric("Top",top);
    ? ? ?? ?PlotNumeric("Bottom",bottom);
    ? ? ?? ?lotsold=ooo;
    ? ? ?? ?lotsnew=nnn;
    ? ? ?? ?
    ? ? ? ? Bottomm=Highest(bottom,2);
    ? ? ?? ?
    ? ? ?? ?cnbpk=c>top;
    ? ? ?? ?cnspk=c<bottom;
    ? ? ?? ?
    ? ? ?? ?
    ? ? ?? ?
    ? ? ?? ? timecondition=(time==0.09 and currenttime>time+0.0210) or (time==0.12 and currenttime>time+0.0240) Or (time==0.21 and currenttime>time+0.0140);
    ? ? //------------------------------------------------------------?? ?
    ? ? ?? ?If(CNbpk==true )//分開處理,首次建倉
    ? ? ?? ?{
    ? ? ?? ??? ?
    ? ? ?? ??? ?if (MarketPosition==0) ?
    ? ? ?? ??? ?{
    ? ? ?? ? ?? ?Buy(lotsnew,c)
    ? ? ?? ??? ?;
    ? ? ?? ??? ?if (timecondition==True ) Alert("空空")
    ? ? ?? ??? ?;
    ? ? ?? ??? ?}
    ? ? ?? ??? ?
    ? ? ?? ?if (marketposition==-1)?
    ? ??
    ? ? ?? ? ?{
    ? ? ? ? ??? ?BuyToCover(lotsold,c) and Buy(lotsnew,c)?
    ? ? ?? ??? ?;
    ? ? ?? ? ? if (timecondition==True ) Alert("空空")
    ? ? ?? ??? ?;
    ? ? ?? ? ? }
    ? ? ?? ?
    ? ? ?? ? }
    ? ? ?? ? ??
    ? ? ?//---------------------------------------------------------------------------------------
    ? ? ?If ?( CNspk==true )//and CurrentTime>0.1045
    ? ? ?? ?{
    ? ? ?? ?
    ? ? ? ? ?? ?if (MarketPosition==0?? ? ? ?) ??
    ? ? ?? ??? ?{
    ? ? ?? ? ??? ?SellShort(Lotsnew,c)
    ? ? ?? ??? ?;
    ? ? ?? ??? ?if (timecondition==True ) Alert("空空")
    ? ? ? ? ? ?? ?;
    ? ? ?? ??? ?}
    ? ? ?? ?if (marketposition==1
    ? ? ?? ? ? ?) ?
    ? ? ?? ??? ?{
    ? ? ?? ??? ?sell(lotsold,c) and SellShort(Lotsnew,c)
    ? ? ?? ??? ?;
    ? ? ?? ??? ?if (timecondition==True ) Alert("空空")
    ? ? ?? ?;
    ? ? ?? ?}
    ? ? ?? ?
    ? ? ?? ?} ? ?
    ? ? }
    ? ??
    ? ?OnBarClose(ArrayRef<Integer> indexs)
    ? ?
    ? ?{
    ? ??? ?SetTriggerBarClose(settime);
    ? ??? ?}

    一個(gè)布林通道實(shí)例,限制交易時(shí)間在每個(gè)小時(shí)k線即將結(jié)束2分鐘。

    ?

    ?來源:CXH99.COM

  • TBQuant技術(shù)回復(fù):

    開發(fā)手冊(cè)就是沒有啊,具體的視頻及案例課的鏈接可以給個(gè)嗎?

    ?

  • TB資深用戶 回復(fù):

    onbarclose里不寫交易業(yè)務(wù)的代碼?寫個(gè)settrigger是什么意思?

    建議再好好看看開發(fā)手冊(cè)或者學(xué)習(xí)視頻里?關(guān)于時(shí)間驅(qū)動(dòng)的視頻及案例課

 

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

可聯(lián)系技術(shù)人員 QQ: 262069696  點(diǎn)擊在線交流或微信號(hào):cxh99cxh99  進(jìn)行 有償收費(fèi) 編寫!

怎么收費(fèi),代編流程等詳情請(qǐng)點(diǎn)擊閱讀!

(注:由于人數(shù)限制,QQ或微信請(qǐng)選擇方便的一個(gè)聯(lián)系我們就行,加好友時(shí)請(qǐng)簡(jiǎn)單備注下您的需求,否則無法通過。謝謝您!)


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
主站蜘蛛池模板: 亚洲av中文无码乱人伦在线视色 | 999这里只有精品| 日本a∨在线观看| 美女被cao免费看在线看网站| 波多野结衣办公室在线观看| 最刺激黄a大片免费观看下截| 岳又湿又紧粗又长进去好舒服 | 国产乱理伦片在线观看大陆| 亚洲美女视频一区二区三区| 久久国产精品视频一区| 99在线视频网站| 青青草99热这里都是精品| 特级黄色毛片视频| 日韩av激情在线观看| 在车里被撞了八次高c| 国产人成免费视频| 亚洲精品无码久久| 中文日韩亚洲欧美制服| 永久看日本大片免费35分钟| 精品亚洲麻豆1区2区3区| 暖暖免费高清日本韩国视频| 天天在线欧美精品免费看| 国产寡妇树林野战在线播放| 亚洲综合丁香婷婷六月香| 丰满亚洲大尺度无码无码专线| 全免费毛片在线播放| 粉嫩被粗大进进出出视频| 日本漂亮继坶中文字幕| 国产精品久久久久久福利| 人妻丝袜无码专区视频网站| 久久国产免费一区| 在线视频国产网址你懂的在线视频| 精品国产一区二区三区免费看| 日韩亚洲欧美性感视频影片免费看| 国产裸拍裸体视频在线观看| 午夜国产精品久久影院| 久久人人爽人人爽人人片dvd| 884hutv四虎永久7777| 永久免费无内鬼放心开车| 小东西怎么流这么多水怎么办| 国产乱子伦精品无码码专区|