BOLL 布林通道

 


 



1.計算方式
        布林通道上軌=20天移動平均線+2*標準差
        布林通道下軌=20天移動平均線-2*標準差
        天數可自訂
2.中文註解
        布林通道的本質是標示出股價運動的特殊狀態。
        當股價超出了布林通道的上軌之後,可能表示發生了兩件事情︰
        第一、 當股價處於盤整狀態之時,表示股價一時之間超買,
        股價將很快回落到正常的盤整區域。此時,上穿布林通道上軌發出賣出信號;
        第二、 也有可能,這是表示價格開始改變了以前的運行事態,開始一個長期大幅走強的新時期。
        此時,上穿布林通道上軌表示出現了行情機會;

3.TS語法
{*******************************************************************
Description : This Indictor plots Bollinger Bands
Provided By : Omega Research, Inc. (c) Copyright 1999
********************************************************************}
Input:  Price(Close), Length(9), StdDevUp(2), StdDevDn(-2), Displace(0);
Variables: BBTop(0), BBBot(0);
BBTop = BollingerBand(Price, Length, StdDevUp);
BBBot = BollingerBand(Price, Length, StdDevDn);
If Displace >= 0 OR CurrentBar > AbsValue(Displace) Then Begin
Plot1[Displace](BBTop, "BollTop");
Plot2[Displace](BBBot, "BollBot");
{Alert Criteria}
Condition1 = Plot1 <> Plot2;
If Price > Plot1 AND Condition1 Then
  Alert("Price is over the top band")
Else
  If Price < Plot2 AND Condition1 Then
   Alert("Price is under the bottom band");
{Bollinger Bands Expert Commentary}
#BeginCmtry
  Commentary(ExpertBollingerBands(Plot1 ,Plot2));
#End;
End;



arrow
arrow
    全站熱搜
    創作者介紹
    創作者 millertime2 的頭像
    millertime2

    miller投資小站~程式交易、外匯期貨研究操作

    millertime2 發表在 痞客邦 留言(0) 人氣()