標(biāo)簽: 公式 開拓者 期貨 交易 RSI 開拓者(TB)
源碼: // 簡(jiǎn)稱: RSI_test // 名稱: 相對(duì)強(qiáng)弱指數(shù)測(cè)試版 // 類別: 技術(shù)指標(biāo) // 類型: 其它類 // 輸出: //------------------------------------------------------------------------ Params Numeric Length(14); Numeric Oversold(30); Numeric Overbought(70); Vars Numeric Upvalue(0); Numeric Downvalue(0); Numeric i; Numeric RSvalue; Numeric RSIvalue; Begin If(CurrentBar < Length ) RSIvalue = InvalidNumeric; Else For i = length - 1 DownTo 0 { If(Close > Close[i+1]) { Upvalue = Upvalue + Close; } Else If(Close < Close[i+1]) { Downvalue = Downvalue + Close; } RSvalue = (Upvalue/Length)/(Downvalue/Length); RSIvalue = 100*RSvalue/(1+RSvalue); } PlotNumeric("RSI",RSIvalue); PlotNumeric("超買",Overbought); PlotNumeric("超賣",Oversold); End //------------------------------------------------------------------------ // 編譯版本 GS2004.06.12 // 用戶版本 2009/09/06 08:57 // 版權(quán)所有 larsir // 更改聲明 TradeBlazer Software保留對(duì)TradeBlazer平臺(tái) // 每一版本的TrabeBlazer公式修改和重寫的權(quán)利 //------------------------------------------------------------------------ 點(diǎn)擊復(fù)制上述代碼粘貼到到公式管理器