Welch Bollinger Band ® Width

0
(0)
名前:
Welch Bollinger Band ® Width
著者: maj1es2tic (2011.08.08 12:44)
ダウンロード済み: 6131
ダウンロード:
Welch Bollinger Band ® Width 1
WelchBBWidth.mq4 (5.0 キロバイト) 意見
著者:

maj1es2tic (Tim Welch)

説明:

This indicator takes the current Width of the Bollinger Bands and compares it to the Maximum and Minimum Width of the Bollinger Bands over N periods (WidthCalcPeriod).

If the calculated percentage is less than or equal to MinRangePercent, then the histogram shows Green. If the calculated percentage is 2x the MinRangePercent, then the histogram shows Yellow. If neither of those match, the histogram shows Red.

This works out well to quickly see if the currency pair is ranging, or about to break out of range. If you set ShowWidthLine to true, then it will also show a line with the actual width of the Bollinger Bands in PIPS. This should work for 4 と 5 digit brokers and it works on all currency pairs.

Using iCustom to pull out values for an Expert Advisor or other Custom Indicators:

You should be able to pull out any of the values externally using the following code:

int period=0; // how far back do you want to look? 0 == current bar. 1 == previous bar, 等.
              // At any given time, only one of these 3 will have a value greater than 0. That value is 300.

double WelchBBWidth_Green = iCustom(ヌル, 0, "WelchBBWidth", 20, 0, 2.0, 20, "バツ", 100, "バツ", 間違い, 0, 期間);
double WelchBBWidth_Yellow = iCustom(ヌル, 0, "WelchBBWidth", 20, 0, 2.0, 20, "バツ", 100, "バツ", 間違い, 1, 期間);
double WelchBBWidth_Red = iCustom(ヌル, 0, "WelchBBWidth", 20, 0, 2.0, 20, "バツ", 100, "バツ", 間違い, 2, 期間);

// This will give you the actual width in PIPs of the Bollinger Bands
double WelchBBWidth = iCustom(ヌル, 0, "WelchBBWidth", 20, 0, 2.0, 20, "バツ", 100, "バツ", 間違い, 3, 期間);

// These will give you the actual Bollinger Band Line values.
// These are the values that would be plotted on the MAIN chart, so it's based on price on the chart.
double WelchBBWidth_MiddleLine = iCustom(ヌル, 0, "WelchBBWidth", 20, 0, 2.0, 20, "バツ", 100, "バツ", 間違い, 4, 期間);
double WelchBBWidth_UpperLine = iCustom(ヌル, 0, "WelchBBWidth", 20, 0, 2.0, 20, "バツ", 100, "バツ", 間違い, 5, 期間);
double WelchBBWidth_LoweLine = iCustom(ヌル, 0, "WelchBBWidth", 20, 0, 2.0, 20, "バツ", 100, "バツ", 間違い, 6, 期間);

You could put something like this in your Expert Advisor:

/*
* int areWeRanging(int period=0)
*
* Returns 1 for GREEN (ranging)
* Returns -1 for YELLOW ( start/end of range)
* Returns 0 さもないと (no range)
*/

int areWeRanging(int period=0) 
{
 double WelchBBWidth_Green = iCustom(ヌル, 0, "WelchBBWidth", 20, 0, 2.0, 20, "バツ", 100, "バツ", 間違い, 0, 期間);
 double WelchBBWidth_Yellow = iCustom(ヌル, 0, "WelchBBWidth", 20, 0, 2.0, 20, "バツ", 100, "バツ", 間違い, 1, 期間);

 もしも ( WelchBBWidth_Green > 0 ) 
 {
   戻る (1);
 } 
 else if ( WelchBBWidth_Yellow > 0) 
 {
   戻る (-1);
 }

 戻る (0);
}

// Check to see if we are coming out of a range. 
// This tells us that the LAST candle was still in a range,
// but the current candle is now breaking free of the range.
もしも ( areWeRanging(1)==1 && (areWeRanging(0)==-1 || areWeRanging(0)==0) ) 
 {
  印刷する("We were ranging, but have now broken out of the range! Make a trade if other indicators confirm the breakout!");
 }

** Use any/all code at your own discretion, and only place real trades when you have confirmation of other indicators. **

画像:

Welch Bollinger Band ® Width 2

*ノート: The dark grey vertical lines and red arrows were added to show the correlation of the indicator to the bollinger bands on the chart and they will NOT show up on your chart.

Welch Bollinger Band ® Width 3

楽しみ!

-Tim

この投稿は役に立ちました?

星をクリックして評価してください!

平均評価 0 / 5. 投票数: 0

これまでのところ投票はありません! この投稿を最初に評価してください.

この投稿が役に立たなかったことをお詫び申し上げます!

この投稿を改善しましょう!

この投稿を改善する方法を教えてください?



著者: 外国為替ウィキチーム
私たちは経験豊富な外国為替トレーダーのチームです [2000-2023] 自分の思いどおりに人生を生きることに専念している人. 私たちの主な目的は、経済的自立と自由を獲得することです, 私たちは自立可能なライフスタイルを実現する手段として、独学で外国為替市場での豊富な経験を積んできました。.