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

06年的老系統,大家一起觀摩學習 - TradeBlazer公式 [開拓者 TB]

  • 咨詢內容: 它的代碼不是TB得,希望大蝦們能轉為TB,讓大家一起觀摩學習。

    背景簡介:
    這個系統的創作人是Philipp Kahler,德國人。由WLD開發者...場趨勢上獲利。
    實際的市場趨勢(牛/熊)由ADX、DIMinus和DIPlus確定,并由EMA的方向確認,交易信號由最高價和最低價的SMA產生。

    進場部分:
    ADX顯示趨勢有多強,作為一個標準值,如果ADX>30,趨勢就是強的。趨勢的方向由DIMinus和DIPlus決定。如果DMPlus在DIMinus之上,趨勢就是牛的(淺綠色背景),反之,就是熊的(淺紅色背景)。ADX、DIMinus和DIPlus的初始長度設置是18(讀物中的標準長度是14,而ADX的邊界值是20)。
    趨勢的確認通過觀察收盤價的EMA做到。如果實際的EMA比前一天的EMA高,市場就向上走,因此牛趨勢被確認。EMA的長度是28個K線。被確認的牛趨勢用暗綠色顯示,被確認的熊趨勢用暗紅色確認。
    買入信號(做多)在牛趨勢被檢測并確認時,并且收盤價大于最高價的SMA時產生。SMA的長度是5個K線。

    出場部分:
    當日最低價穿過它的SMA,或者收盤價低于它的EMA時,做多信號就被關閉。做空信號情況類似但相反。

    風險控制:
    無采取特別的風險控制措施。

    資金管理:
    每次交易用總帳戶的10%資金建倉。

    測試績效:
    根據Kahler的說法,從1998年10月開始,兩年內這個系統只交易德國債券合約(多空都交易),帳戶回報率達到400%(獲利因子profit factor=3.6),總共有30次交易(13個是多,其他是空),其中22個盈利,8個虧損,50%的時間在市。

    { Plot ADX Values }

    var Bar, ADXPeriod, ADXPane, Parameter, StopLossSeries: integer;
    var BarHighProfit, BarLowProfit, CumProfit, p, Shares: integer;
    var StartCapital, ATRValue, ProfitPercent, Profit, Price: float;
    var BullTrend, BearTrend, DipLong, DipShort: boolean;
    var ATRFactor, ChandelierExit, YoYoExit, SellPrice: float;
    var ExitLong, ExitShort: boolean;
    var ProfitControlPane, CumProfitPane: integer;

    ADXPane := CreatePane( 75, TRUE, FALSE );
    PlotSeries( ADXSeries( 18 ), ADXPane, 009, 2 );
    PlotSeries( DIPlusSeries( 18 ), ADXPane, 050, 0 );
    PlotSeries( DIMinusSeries( 18 ), ADXPane, 900, 0 );
    DrawLabel( 'ADX, DI+, DI-', ADXPane );
    DrawHorzLine( 0, ADXPane, 444, 1 );
    DrawHorzLine( 30, ADXPane, 444, 1 );

    { Plot SMAs and EMAs }
    PlotSeries( EMASeries( #Close, 28 ), 0, 044, 2 );
    PlotSeries( SMASeries( #High, 5 ), 0, 922, 0 );
    PlotSeries( SMASeries( #Low, 5 ), 0, 262, 0 );

    for Bar := 30 to BarCount() - 1 do
    begin
    { See if we're in a trend mode }
    BullTrend := false;
    BearTrend := false;
    if ADX( Bar, 18 ) > 30 then
    begin
    if DIPlus( Bar, 18 ) > DIMinus( Bar, 18 ) then
    begin
    BullTrend := true;
    SetBackgroundColor( Bar, 898 );
    end
    else if DIMinus( Bar, 18 ) > DIPlus( Bar, 18 ) then
    begin
    SetBackgroundColor( Bar, 988 );
    BearTrend := true;
    end;
    end;
    if LastPositionActive() then
    begin
    { Test for closing Long Positions }
    if PositionLong( LastPosition() ) then
    begin
    if ( PriceLow( Bar ) < SMA( Bar, #Low, 5 ) ) or ( PriceClose( Bar ) < EMA( Bar, #Close, 28 ) ) then
    SellAtMarket( Bar + 1, LastPosition(), '' );
    end
    else
    { Test for closing Short Positions }
    begin
    if ( PriceHigh( Bar ) > SMA( Bar, #High, 5 ) ) or ( PriceClose( Bar ) > EMA( Bar, #Close, 28 ) ) then
    CoverAtMarket( Bar + 1, LastPosition(), '' );
    end;
    end
    else
    begin
    { Confirm any trends with an EMA check }
    if BullTrend then
    BullTrend := EMA( Bar, #Close, 28 ) > EMA( Bar - 1, #Close, 28 );
    if BearTrend then
    BearTrend := EMA( Bar, #Close, 28 ) < EMA( Bar - 1, #Close, 28 );
    { Trigger long/short trades with the confirmed trends }
    if BullTrend then
    begin
    SetBackgroundColor( Bar, 787 );
    if PriceClose( Bar ) > SMA( Bar, #High, 5 ) then
    BuyAtMarket( Bar + 1, '' );
    end;
    if BearTrend then
    begin
    SetBackgroundColor( Bar, 877 );
    if PriceClose( Bar ) < SMA( Bar, #Low, 5 ) then
    ShortAtMarket( Bar + 1, '' );
    end;
    end;
    end;

     

  • TB技術人員: 自己頂起來

     

  • TB客服: 希望高手能夠翻譯成TB代碼......

     

  • 網友回復: 希望高手能夠翻譯成TB代碼希望高手能夠翻譯成TB代碼

     

  • 網友回復: 這個效果真是奇爛無比,出場太爛了。。
    1.JPG (134.89 KB, 下載次數: 6) 2012-5-4 14:56:18 上傳 下載次數: 6

 

如果以上指標公式不適用于您常用的行情軟件

或者您想改編成選股公式,以便快速選出某種形態個股的話,

可以聯系我們相關技術人員 QQ: 262069696  點擊在線交流進行 有償 改編!

 


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 内谢少妇XXXXX8老少交| 国产精品久久久久免费a∨| 丰满老妇女好大bbbbb| 最近韩国免费观看hd电影国语| 亚洲综合国产成人丁香五月激情| 精品国产污污免费网站入口| 国产免费av片在线无码免费看| 你懂得视频在线观看| 国色天香网在线| аⅴ天堂中文在线网| 我要看黄色一级毛片| 久久国产精品免费一区二区三区 | 成人福利网址永久在线观看| 国产麻豆精品免费密入口| 亚洲婷婷在线视频| 激情另类小说区图片区视频区| 公的大龟慢慢挺进我的体内视频 | 亚洲娇小性xxxx色| 波多野结衣视频网址| 免费看黄视频app| 经典国产一级毛片| 国产suv精品一区二区6| 青青青青久久久久国产| 国产成人 亚洲欧洲| 精品一区二区三区色花堂| 国产精品igao视频网网址| 18videosex性加拿大| 国产精品色内内在线播放| 91麻豆久久久| 在线观看免费宅男视频| av无码精品一区二区三区四区| 好男人在线社区www在线视频一| 一级做a爰片性色毛片16美国| 成人免费毛片观看| 中文字幕在线观看免费| 无码喷水一区二区浪潮AV| 久久天天躁狠狠躁夜夜躁综合| 日韩精品国产一区| 久久精品国产精品国产精品污| 日韩超碰人人爽人人做人人添| 乱人伦中文字幕在线不卡网站|