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

您現在的位置:程序化交易>> 期貨公式>> 交易開拓者(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函數,在追漲殺跌置頂帖子中有人提到過,但是追漲殺跌老師沒寫,有高手一起研究一下嗎。

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

相關文章

    沒有相關內容
主站蜘蛛池模板: 亚洲成人91 | 久草精品视频 | 国产精品久久久久三级 | 日本一本二本免费播放视频 | 亚洲 欧美 中文字幕 | 亚洲综合中文 | 国产剧情一区二区 | 色综合色综合色综合色综合网 | 成人国产在线看不卡 | 四虎精品成在线播放 | 黄色一级片免费网站 | 一区二区中文字幕 | 波多野结衣一区免费作品 | 亚洲欧美日韩国产综合 | 日韩精品另类天天更新影院 | 精品久久一区 | 九九色综合 | 国产日产欧产麻豆精品精品推荐 | 亚洲一级毛片在线播放 | 性做久久久久久久久男女 | 日本在线亚州精品视频在线 | 老黄网站 | 91亚洲精品一区二区福利 | 久久久久久国产精品免费免费 | 日本一级毛片aaaaa | 久热re这里只有精品视频 | 日本精品夜色视频一区二区 | 黄色成人在线观看 | www久久久久 | 九九九九九九伊人 | 800玖玖爱在线观看香蕉 | 香蕉午夜视频 | 播放一级毛片 | 久久久国产视频 | 国产成人无精品久久久 | 国产精品成人免费观看 | 久久视频精品a线视频在线观看 | 亚洲综合图片网 | 国产精品久久久久久久久免费观看 | 国产性大片黄在线观看在线放 | 国产99久9在线 |