人人爽天天爽夜夜爽qc-人人爽天天爽夜夜爽曰-人人天天爱天天做天天摸-人人天天夜夜-色网站在线-色网站在线看

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

開拓者道氏理論交易策略源碼[開拓者公式]




    

  • 道氏理論內(nèi)容:
    1. //------------------------------------------------------------------------

    2. // 簡(jiǎn)稱: D1

    3. // 名稱: 道氏理論

    4. // 類別: 交易指令

    5. // 類型: 多頭建倉(cāng)

    6. // 輸出: www.kzuj.com.cn

    7. //------------------------------------------------------------------------

    8.  

    9. Params

    10.         Numeric ATime(918);

    11.         Numeric CTime(1510);

    12.         Numeric Lot(1);

    13.         Numeric MoneyLoss(0.6);

    14.         Numeric BarCross(1);

    15.         Numeric Length(5);

    16.        

    17. Vars

    18.         Numeric bTime(0);

    19.         Numeric MyClose(0);

    20.         Numeric MyDiff(0);

    21.         NumericSeries estP(0);

    22.         NumericSeries ExitP(0);

    23.         NumericSeries Position(0);

    24.         NumericSeries est(0);

    25.         NumericSeries est1(0);

    26.         NumericSeries est2(0);

    27.         NumericSeries est3(0);

    28.        

    29.         Bool bTimeCon;

    30.         Bool BarUpCon;

    31.         Bool BarDownCon;

    32.         Bool BarExitCon;

    33.         Bool LongOpenCon;

    34.         Bool ShortOpenCon;

    35.         Bool LongExitCon;

    36.         Bool ShortExitCon;

    37.        

    38. Begin

    39.        

    40.         If (Date != Date[1])

    41.                 {

    42.                         est = Open;

    43.                         est1 = Open;

    44.                         est2 = Open;

    45.                         est3 = Open;

    46.                         estP = 0;

    47.                         ExitP = 0;

    48.                         Position = 0;

    49.                         MyClose = Open;

    50.                 }

    51.         Else

    52.                 {

    53.                         est = est[1];

    54.                         est1 = est1[1];

    55.                         est2 = est2[1];

    56.                         est3 = est3[1];

    57.                         estP = estP[1];

    58.                         ExitP = ExitP[1];

    59.                         Position = Position[1];

    60.                         If(Length != 0) MyClose = Average(Close[1],Length);

    61.                         Else MyClose = Close[1];

    62.                 }

    63.                

    64.         MyDiff = MyClose * BarCross / 1000;

    65.        

    66.         bTime = IntPart(Time*10000);

    67.         bTimeCon = (bTime > ATime) And (bTime < CTime);

    68.        

    69.         If((MyClose < est And MyClose < est1) Or (MyClose > est And MyClose > est1)) est = MyClose;

    70.         If(((MyClose - est) > MyDiff And est < est1) Or ((est - MyClose) > MyDiff And est > est1))

    71.                 {

    72.                         est3 = est2;

    73.                         est2 = est1;

    74.                         est1 = est;

    75.                         est = MyClose;

    76.                 }

    77.                

    78.         If(Position > 0 And High > estP) estP = High;

    79.         If(Position < 0 And Low < estP) estP = Low;

    80.         If(Position > 0) ExitP = estP * (100 - MoneyLoss) / 100;

    81.         If(Position < 0) ExitP = estP * (100 + MoneyLoss) / 100;

    82.        

    83.         If(bTime >= CTime)

    84.         {

    85.                 If (Position > 0)

    86.                         Sell(lot,Open);

    87.                 Else

    88.                         BuyToCover(lot,Open);

    89.         }

    90.          

    91.         If(bTimeCon)

    92.         {

    93.                 If (Position == 0)

    94.                 {

    95.                         If(est3 < est1 And (est2 / 2000 + est2) <= est And est3 < est2)

    96.                         {

    97.                                 Buy(lot,Open);

    98.                                 Position = lot;

    99.                                 estP = Open;

    100.                                 ExitP = estP * (100 - MoneyLoss) / 100;

    101.                                 Commentary("LongOpen");

    102.                                

    103.                         }

    104.                          

    105.                         Else If(est3 > est1 And (est2 - est2 / 2000) >= est And est3 > est2)

    106.                         {

    107.                                 SellShort(lot,Open);

    108.                                 Position = lot * -1;

    109.                                 estP = Open;

    110.                                 ExitP = estP * (100 + MoneyLoss) / 100;

    111.                                 Commentary("ShortOpen");

    112.                         }

    113.                 }

    114.                

    115.                 Else

    116.                

    117.                 {

    118.                         If(Position > 0 And est3 > est1)

    119.                         {

    120.                                 Sell(lot,Open);

    121.                                 Position = 0;

    122.                                 Commentary("LongExit1");

    123.                         }

    124.                        

    125.                         Else If(Position < 0 And est3 < est1)

    126.                         {

    127.                                 BuyToCover(lot,Open);

    128.                                 Position = 0;

    129.                                 Commentary("ShortExit1");

    130.                         }

    131.                        

    132.                         Else If(Position > 0 And Open < ExitP)

    133.                         {

    134.                                 Sell(lot,Open);

    135.                                 Position = 0;

    136.                                 Commentary("LongExit2");

    137.                         }

    138.                        

    139.                         Else If(Position < 0 And Open > ExitP)

    140.                         {

    141.                                 BuyToCover(lot,Open);

    142.                                 Position = 0;

    143.                                 Commentary("ShortExit2");

    144.                         }

    145.                 }

    146.         }

    147.        

    148.         Commentary("Position = "+Text(Position));

    149.         Commentary("ExitP = "+Text(ExitP));

    150. End

    151.  

    152. //------------------------------------------------------------------------

    153. // 編譯版本        GS2004.06.12

    154. // 用戶版本        2011/05/03 13:21

    155. // 版權(quán)所有        www.kzuj.com.cn

    156. // 更改聲明        TradeBlazer Software保留對(duì)TradeBlazer平臺(tái)

    157. //                        每一版本的TrabeBlazer公式修改和重寫的權(quán)利

    158. //------------------------------------------------------------------------

     

 

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

可聯(lián)系技術(shù)人員 QQ: 262069696  點(diǎn)擊在線交流進(jìn)行 有償 編寫!不貴!點(diǎn)擊查看價(jià)格!

 


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
  主站蜘蛛池模板: 7777在线| 九九九色视频在线观看免费 | 在线 色 | 98bb国产精品视频 | 亚洲视屏一区 | 欧美日韩成人午夜免费 | 免费午夜网站 | 成人羞羞视频在线观看 | 日韩一区二区三区四区不卡 | 最新亚洲情黄在线网站 | 久久成人综合网 | 可以免费看毛片的网站 | 一本大道香蕉在线观看视频 | 99免费精品视频 | 亚洲日韩视频 | 亚洲欧美在线综合一区二区三区 | 久久精品一区二区三区不卡牛牛 | 日本资源在线观看 | 福利所第一导航 | 精品国产第一页 | 干干日日| 最近中文字幕在线6 | 色噜噜狠狠狠狠色综合久 | 欧美成人激情在线 | 精品乱久久 | 国产一区成人 | 夜夜操夜夜爱 | 免费乱理伦片手机在线观看 | 人人干日日干 | 欧美成人观看免费完全 | 黄片毛片在线免费看 | 成人免费观看网站 | 爆操欧美美女 | 亚洲国产爱 | 欧洲做视频在线观看 | xxxxx日本 | 中国黄色一级视频 | 色xx综合| 亚洲国产成人va在线观看网址 | 欧美在线观看一区二区 | 亚洲精品国产成人 |