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

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

獨(dú)特的思路,開拓者拋物線轉(zhuǎn)向交易系統(tǒng)源碼分享[開拓者公式]

  • 思路內(nèi)容: 剛才看到群里討論了會SAR,很多人也想寫一個SAR系統(tǒng),最近比較忙,利用午飯時間寫了個SAR系統(tǒng),大家拿去擴(kuò)充吧

     

  •  原創(chuàng)作品,轉(zhuǎn)載注明出處  作者 穿堂風(fēng) www.weiqiv.net.cn
    1. //------------------------------------------------------------------------

    2. // 簡稱: SAR_system

    3. // 名稱:

    4. // 類別: 公式應(yīng)用

    5. // 類型: 用戶應(yīng)用

    6. // 輸出: 穿堂風(fēng){程序化交易}

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

    8.  

    9. Params

    10.         Numeric AfStep(0.02);

    11.         Numeric AfLimit(0.2) ;

    12.         Numeric malen(120);

    13.         Numeric stopLoss(1);

    14.         Numeric BuyLots(1);

    15.         Numeric offset(0);

    16. Vars

    17.         Numeric oParCl( 0 );

    18.         Numeric oParOp( 0 );

    19.         Numeric oPosition( 0 );

    20.         Numeric oTransition( 0 );

    21.         NumericSeries oParOp_s;

    22.         Numeric oParOp_p;

    23.         Numeric i_offset;

    24.         Numeric ma;

    25.         Bool bUpline;

    26.         string strkey;

    27.         string strValue;

    28.         Numeric i_stopLoss;

    29.        

    30. Begin

    31.  

    32.         ma = Average(Open,malen);

    33.         bUpline = Open>= ma;

    34.         ParabolicSAR( AfStep, AfLimit, oParCl, oParOp, oPosition, oTransition ) ;

    35.         oParOp_s = oParOp;

    36.         oParOp_p = oParOp_s[1];

    37.         i_offset = offset*MinMove*PriceScale;

    38.         i_stopLoss = stopLoss*(OpenD(0)/100);

    39.        

    40.         Commentary("oParOp:"+Text(oParOp));

    41.         Commentary("oTransition:"+Text(oTransition));

    42.         Commentary("oPosition:"+Text(oPosition));

    43. If(CurrentBar>malen)

    44. {

    45.         PlotNumeric("oParCl",oParCl);

    46.         If(malen != 0)

    47.         {

    48.                 PlotNumeric("ma",ma);

    49.         }

    50.  

    51.  

    52.         If(MarketPosition == 0)

    53.         {

    54.                 If(malen == 0)

    55.                 {

    56.                         bUpline = True;

    57.                 }

    58.  

    59.                 If(oTransition == 1 and bUpline)

    60.                 {

    61.                         Buy(BuyLots,Max(Open,oParOp_p)+i_offset);

    62.                         Return;

    63.                 }

    64.                

    65.                 If(malen == 0)

    66.                 {

    67.                         bUpline = False;

    68.                 }

    69.  

    70.                 If(oTransition == -1 and bUpline==False)

    71.                 {

    72.                         SellShort(BuyLots,Min(Open,oParOp_p)-i_offset);

    73.                         Return;

    74.                 }

    75.         }

    76.  

    77.         If(MarketPosition == 1)

    78.         {

    79.                 If(malen == 0)

    80.                 {

    81.                         bUpline = False;

    82.                 }

    83.                

    84.                 If(LastEntryPrice-Low>=i_stopLoss)

    85.                 {

    86.                         Sell(BuyLots,Min(Open,LastEntryPrice-i_stopLoss)-i_offset);

    87.                         Return;

    88.                 }

    89.                 If(oPosition == -1)

    90.                 {

    91.  

    92.                         If(oTransition == -1 and bUpline==False)

    93.                         {

    94.                                 SellShort(BuyLots,Min(Open,oParOp_p)-i_offset);

    95.                         }

    96.                         Else

    97.                         {

    98.                                 Sell(BuyLots,Min(Open,oParOp_p)-i_offset);

    99.                         }

    100.                 }

    101.         }

    102.  

    103.         If(MarketPosition == -1)

    104.         {

    105.                 If(malen == 0)

    106.                 {

    107.                         bUpline = True;

    108.                 }

    109.  

    110.                 If(High-LastEntryPrice>=i_stopLoss)

    111.                 {

    112.                         BuyToCover(BuyLots,Max(Open,LastEntryPrice+i_stopLoss)+i_offset);

    113.                         Return;

    114.                 }               

    115.                 If(oPosition == 1)

    116.                 {

    117.                         If(oTransition == 1 and bUpline)

    118.                         {

    119.                                 Buy(BuyLots,Max(Open,oParOp_p)+i_offset);

    120.                         }

    121.                         Else

    122.                         {

    123.                                 BuyToCover(BuyLots,Max(Open,oParOp_p)+i_offset);

    124.                         }

    125.                 }

    126.         }

    127. }

    128. End

    129.  

    130. //------------------------------------------------------------------------

    131. // 編譯版本        GS2010.12.08{程序化交易}

    132. // 用戶版本        2011/09/05 12:21

    133. // 版權(quán)所有        穿堂風(fēng)

    134. // 更改聲明        TradeBlazer Software保留對TradeBlazer平臺

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

    136. //------------------------------------------------------------------------

      



     

  •  因為時間短促,已盡量考慮邏輯性,如果有質(zhì)疑的地方,一定要細(xì)看代碼,我不希望沒分析清楚就說未來函數(shù),這是對我的不尊重.

     

 

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

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

 


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
  主站蜘蛛池模板: 够爱久久 | 99在线精品免费视频九九视 | 四虎永久在线精品国产 | 国产剧情一区二区 | 亚洲一区二区在线视频 | 天天操天天拍 | www.日本色 | 欧美性大战久久久久久久蜜桃 | 久久国产精品一国产精品金尊 | 久久久噜噜噜久久老司机 | 国产欧美在线观看一区二区 | 伊人久久综合网站 | 国产午夜精品久久久久九九 | 91在线播 | 另类综合网 | 久久综合久久久 | 国产精品2020观看久久 | 99九色| 日本高清中文字幕在线观穿线视频 | 四虎影视2022入口网址 | 亚洲wuma| 国产区一区二区三 | 毛片女女女女女女女女女 | 国产精品久久久久这里只有精品 | 精品成人免费播放国产片 | 久久www香蕉免费人成 | 99尹人香蕉国产免费天天拍 | 免费在线亚洲 | 一级特级欧美aaaaa毛片 | 亚洲欧美精选 | 久久中文字幕久久久久91 | www.久久视频| 欧美性猛交ⅹxxx乱大交免费 | 亚洲精品tv久久久久 | 欧美国产综合日韩一区二区 | 日本视频中文字幕一区二区 | 亚洲欧美精品一中文字幕 | 91久久精品国产一区二区 | 天天曰天天操 | 欧美一区二区影院 | 超97在线观看精品国产 |