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

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

急救啊,求管理幫忙寫一個SAR,固定15分鐘算一次結果 - TradeBlazer公式 [開拓者 TB]

  • 咨詢內容: 一點頭緒沒用啊,求管理幫忙指引一下啊

     

  • TB技術人員: 不明白啥意思

     

  • TB客服: http://www.tradeblazer.net/forum/thread-17457-1-1.html

     

  • 網友回復: //------------------------------------------------------------------------
    // 簡稱: SAR_system
    // 名稱:
    // 類別: 公式應用
    // 類型: 用戶應用
    // 輸出: 穿堂風
    //------------------------------------------------------------------------

    Params
            Numeric AfStep(0.02);
            Numeric AfLimit(0.2) ;
            Numeric malen(120);
            Numeric stopLoss(1);
            Numeric BuyLots(1);
            Numeric offset(0);
    Vars
            Numeric oParCl( 0 );
            Numeric oParOp( 0 );
            Numeric oPosition( 0 );
            Numeric oTransition( 0 );
            NumericSeries oParOp_s;
            Numeric oParOp_p;
            Numeric i_offset;
            Numeric ma;
            Bool bUpline;
            string strkey;
            string strValue;
            Numeric i_stopLoss;
            
    Begin

            ma = Average(Open,malen);
            bUpline = Open>= ma;
            ParabolicSAR( AfStep, AfLimit, oParCl, oParOp, oPosition, oTransition ) ;
            oParOp_s = oParOp;
            oParOp_p = oParOp_s[1];
            i_offset = offset*MinMove*PriceScale;
            i_stopLoss = stopLoss*(OpenD(0)/100);
            
            Commentary("oParOp:"+Text(oParOp));
            Commentary("oTransition:"+Text(oTransition));
            Commentary("oPosition:"+Text(oPosition));
    If(CurrentBar>malen)
    {
            PlotNumeric("oParCl",oParCl);
            If(malen != 0)
            {
                    PlotNumeric("ma",ma);
            }


            If(MarketPosition == 0)
            {
                    If(malen == 0)
                    {
                            bUpline = True;
                    }

                    If(oTransition == 1 and bUpline)
                    {
                            Buy(BuyLots,Max(Open,oParOp_p)+i_offset);
                            Return;
                    }
                   
                    If(malen == 0)
                    {
                            bUpline = False;
                    }

                    If(oTransition == -1 and bUpline==False)
                    {
                            SellShort(BuyLots,Min(Open,oParOp_p)-i_offset);
                            Return;
                    }
            }

            If(MarketPosition == 1)
            {
                    If(malen == 0)
                    {
                            bUpline = False;
                    }
                   
                    If(LastEntryPrice-Low>=i_stopLoss)
                    {
                            Sell(BuyLots,Min(Open,LastEntryPrice-i_stopLoss)-i_offset);
                            Return;
                    }
                    If(oPosition == -1)
                    {

                            If(oTransition == -1 and bUpline==False)
                            {
                                    SellShort(BuyLots,Min(Open,oParOp_p)-i_offset);
                            }
                            Else
                            {
                                    Sell(BuyLots,Min(Open,oParOp_p)-i_offset);
                            }
                    }
            }

            If(MarketPosition == -1)
            {
                    If(malen == 0)
                    {
                            bUpline = True;
                    }

                    If(High-LastEntryPrice>=i_stopLoss)
                    {
                            BuyToCover(BuyLots,Max(Open,LastEntryPrice+i_stopLoss)+i_offset);
                            Return;
                    }               
                    If(oPosition == 1)
                    {
                            If(oTransition == 1 and bUpline)
                            {
                                    Buy(BuyLots,Max(Open,oParOp_p)+i_offset);
                            }
                            Else
                            {
                                    BuyToCover(BuyLots,Max(Open,oParOp_p)+i_offset);
                            }
                    }
            }
    }
    End

    //------------------------------------------------------------------------
    // 編譯版本        GS2010.12.08
    // 用戶版本        2011/09/05 12:21
    // 版權所有        穿堂風
    // 更改聲明        TradeBlazer Software保留對TradeBlazer平臺
    //                        每一版本的TrabeBlazer公式修改和重寫的權利
    //------------------------------------------------------------------------
    看了這個指令,在這個原有基礎上,只做判斷出場規則,進場規則不變可以嗎?

     

  • 網友回復: 其實想請教高手幫忙寫一個跨周期的SAR函數,在追漲殺跌置頂帖子中有人提到過,但是追漲殺跌老師沒寫,有高手一起研究一下嗎。

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

相關文章

    沒有相關內容
主站蜘蛛池模板: 亚洲欧美中文字幕影音先锋 | 日本成人午夜 | 麻豆国产免费影片 | 激情五月综合综合久久69 | 色综合久久久高清综合久久久 | 17videosex性欧美| 久青草视频免费视频播放线路1 | 欧美一级看片免费观看视频在线 | 午夜在线观看免费视频 | 国产欧美日韩成人 | 1024日本| 成人黄色在线免费观看 | 亚洲国产福利精品一区二区 | 国产成人精品免费视频大 | 成年黄网站在线观看免费 | 欧美亚洲天堂网 | 天天干天天操天天操 | 日本一道本在线视频 | a久久久久一级毛片护士免费 | 波多野结衣被强在线视频 | 性xxxxbbbb免费播放视频 | 国产高清在线免费视频 | 国内精品视频一区 | 日韩在线视频线视频免费网站 | 久久综合给合久久狠狠狠色97 | 性爱免费视频 | 欧美在线中文字幕高清的 | 天天做天天爱天天爽 | 中文字幕一区在线播放 | 欧美日本黄色片 | 亚洲人成网站色7777 | 国产精品久久久久网站 | haose16在线永久免费 | 六月天综合网 | 黄色国产免费观看 | 国内一级片 | 日韩久久一级毛片 | 亚洲日本va中文字幕线 | 成人嗯啊视频在线观看 | 青草视频网站 | 色片免费观看 |