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

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

拋物線轉(zhuǎn)向系統(tǒng)分享 [開拓者 TB]

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

     

  • TB技術(shù)人員: 原創(chuàng)作品,轉(zhuǎn)載注明出處
    1. //------------------------------------------------------------------------
    2. // 簡稱: SAR_system
    3. // 名稱:
    4. // 類別: 公式應(yīng)用
    5. // 類型: 用戶應(yīng)用
    6. // 輸出: 穿堂風(fēng)
    7. //------------------------------------------------------------------------

    8. Params
    9.         Numeric AfStep(0.02);
    10.         Numeric AfLimit(0.2) ;
    11.         Numeric malen(120);
    12.         Numeric stopLoss(1);
    13.         Numeric BuyLots(1);
    14.         Numeric offset(0);
    15. Vars
    16.         Numeric oParCl( 0 );
    17.         Numeric oParOp( 0 );
    18.         Numeric oPosition( 0 );
    19.         Numeric oTransition( 0 );
    20.         NumericSeries oParOp_s;
    21.         Numeric oParOp_p;
    22.         Numeric i_offset;
    23.         Numeric ma;
    24.         Bool bUpline;
    25.         string strkey;
    26.         string strValue;
    27.         Numeric i_stopLoss;
    28.        
    29. Begin

    30.         ma = Average(Open,malen);
    31.         bUpline = Open>= ma;
    32.         ParabolicSAR( AfStep, AfLimit, oParCl, oParOp, oPosition, oTransition ) ;
    33.         oParOp_s = oParOp;
    34.         oParOp_p = oParOp_s[1];
    35.         i_offset = offset*MinMove*PriceScale;
    36.         i_stopLoss = stopLoss*(OpenD(0)/100);
    37.        
    38.         Commentary("oParOp:"+Text(oParOp));
    39.         Commentary("oTransition:"+Text(oTransition));
    40.         Commentary("oPosition:"+Text(oPosition));
    41. If(CurrentBar>malen)
    42. {
    43.         PlotNumeric("oParCl",oParCl);
    44.         If(malen != 0)
    45.         {
    46.                 PlotNumeric("ma",ma);
    47.         }


    48.         If(MarketPosition == 0)
    49.         {
    50.                 If(malen == 0)
    51.                 {
    52.                         bUpline = True;
    53.                 }

    54.                 If(oTransition == 1 and bUpline)
    55.                 {
    56.                         Buy(BuyLots,Max(Open,oParOp_p)+i_offset);
    57.                         Return;
    58.                 }
    59.                
    60.                 If(malen == 0)
    61.                 {
    62.                         bUpline = False;
    63.                 }

    64.                 If(oTransition == -1 and bUpline==False)
    65.                 {
    66.                         SellShort(BuyLots,Min(Open,oParOp_p)-i_offset);
    67.                         Return;
    68.                 }
    69.         }

    70.         If(MarketPosition == 1)
    71.         {
    72.                 If(malen == 0)
    73.                 {
    74.                         bUpline = False;
    75.                 }
    76.                
    77.                 If(LastEntryPrice-Low>=i_stopLoss)
    78.                 {
    79.                         Sell(BuyLots,Min(Open,LastEntryPrice-i_stopLoss)-i_offset);
    80.                         Return;
    81.                 }
    82.                 If(oPosition == -1)
    83.                 {

    84.                         If(oTransition == -1 and bUpline==False)
    85.                         {
    86.                                 SellShort(BuyLots,Min(Open,oParOp_p)-i_offset);
    87.                         }
    88.                         Else
    89.                         {
    90.                                 Sell(BuyLots,Min(Open,oParOp_p)-i_offset);
    91.                         }
    92.                 }
    93.         }

    94.         If(MarketPosition == -1)
    95.         {
    96.                 If(malen == 0)
    97.                 {
    98.                         bUpline = True;
    99.                 }

    100.                 If(High-LastEntryPrice>=i_stopLoss)
    101.                 {
    102.                         BuyToCover(BuyLots,Max(Open,LastEntryPrice+i_stopLoss)+i_offset);
    103.                         Return;
    104.                 }               
    105.                 If(oPosition == 1)
    106.                 {
    107.                         If(oTransition == 1 and bUpline)
    108.                         {
    109.                                 Buy(BuyLots,Max(Open,oParOp_p)+i_offset);
    110.                         }
    111.                         Else
    112.                         {
    113.                                 BuyToCover(BuyLots,Max(Open,oParOp_p)+i_offset);
    114.                         }
    115.                 }
    116.         }
    117. }
    118. End

    119. //------------------------------------------------------------------------
    120. // 編譯版本        GS2010.12.08
    121. // 用戶版本        2011/09/05 12:21
    122. // 版權(quán)所有        穿堂風(fēng)
    123. // 更改聲明        TradeBlazer Software保留對TradeBlazer平臺
    124. //                        每一版本的TrabeBlazer公式修改和重寫的權(quán)利
    125. //------------------------------------------------------------------------
    復(fù)制代碼

     

  • TB客服: 1.jpg (69.84 KB, 下載次數(shù): 9) 2011-9-5 12:44:55 上傳 下載次數(shù): 9
    2.jpg (93.09 KB, 下載次數(shù): 6) 2011-9-5 12:44:55 上傳 下載次數(shù): 6

     

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

     

  • 網(wǎng)友回復(fù): 謝謝分享,,,好月餅!

 

如果以上指標(biāo)公式不適用于您常用的行情軟件

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

可以聯(lián)系我們相關(guān)技術(shù)人員 QQ: 262069696  點(diǎn)擊在線交流進(jìn)行 有償 改編!

 


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
主站蜘蛛池模板: 亚洲视频免费 | 亚洲在线视频 | 亚洲免费福利视频 | 国产精品欧美韩国日本久久 | 在线国产视频 | 国产99久久九九精品免费 | 99视频精品全国免费 | 久青草免费视频手机在线观看 | 免费视频不卡 | 久久的精品99精品66 | 色婷婷色综合激情国产日韩 | 91婷婷色 | 欧美日韩一二三区免费视频观看 | 日日做日日摸夜夜爽 | 日韩一区二区三区不卡视频 | 欧美成人综合视频 | 91视频大全| 欧美一区二区三区东南亚 | 97视97视频| 毛片在线看网站 | 日韩毛片在线免费观看 | 国产激情视频趣趣在线观看的 | 久青草香蕉精品视频在线 | 日本在线精品视频 | 久久福利资源站免费观看i 久久高清 | 亚洲一区欧洲一区 | 麻豆精品视频 在线视频 | 国产精品成人69xxx免费视频 | 精品中文字幕不卡在线视频 | 日韩欧美网站 | 国产成人精品午夜 | 国内精品免费一区二区观看 | 黄页在线播放网址 | 欧美一区高清 | 日韩亚洲欧美一区二区三区 | 手机在线看片国产日韩生活片 | 欧美乱大交xxxxxx喷潮免费 | 精品国产福利久久久 | 精品无人区乱码1区2区 | 四虎影院官网 | 七七七久久久久人综合 |