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

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

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




    

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

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

    3. // 名稱: 道氏理論

    4. // 類別: 交易指令

    5. // 類型: 多頭建倉

    6. // 輸出: m.weiqiv.net.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)所有        m.weiqiv.net.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)容
  主站蜘蛛池模板: 羞羞网站免费观看 | 亚洲欧美日韩一区 | 久久综合给会久久狠狠狠 | 春暖花开亚洲 | 中文字幕久久久久一区 | 亚洲激情视频网站 | 奇米1111| 97se亚洲综合 | 国产精品线在线精品国语 | 99热这里只有成人精品国产 | 免费看一毛一级毛片视频 | 偷拍清纯高清视频在线 | 深夜男人影院 | 日本一级毛片大片免费 | 亚洲国产国产综合一区首页 | www.伊人网| 欧美啊v在线观看 | 美女视频免费在线观看 | 精品精品国产欧美在线观看 | 欧美日韩午夜视频 | 欧美乱大交xxxxxx喷潮免费 | 四虎影永久在线观看精品 | 成人高清毛片a | 成人在线视频免费 | 全亚洲最大的免费私人影剧院 | 欧美一区二区三区久久久人妖 | 久久精品视频在线 | 色综合中文字幕 | 国产精品视频麻豆 | 九操网 | 99热最新在线 | 欧洲成人在线观看 | 五月天精品 | 日韩视频网址 | 国产短视频精品区第一页 | 一道本不卡免费视频 | 欧美激情在线精品一区二区 | 一区二区三 | 在线精品国精品国产不卡 | 四虎影视在线影院4hu | 欧美日韩国产综合一区二区三区 |