Welch Bollinger Band ® Width

0
(0)
Tên:
Welch Bollinger Band ® Width
Tác giả: maj1es2tic (2011.08.08 12:44)
Đã tải xuống: 6131
Tải xuống:
Welch Bollinger Band ® Width 1
WelchBBWidth.mq4 (5.0 Kb) Xem
Tác giả:

maj1es2tic (Tim Welch)

Sự miêu tả:

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 Và 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, vân vân.
              // At any given time, only one of these 3 will have a value greater than 0. That value is 300.

double WelchBBWidth_Green = iCustom(VÔ GIÁ TRỊ, 0, "WelchBBWidth", 20, 0, 2.0, 20, "x", 100, "x", SAI, 0, Giai đoạn);
double WelchBBWidth_Yellow = iCustom(VÔ GIÁ TRỊ, 0, "WelchBBWidth", 20, 0, 2.0, 20, "x", 100, "x", SAI, 1, Giai đoạn);
double WelchBBWidth_Red = iCustom(VÔ GIÁ TRỊ, 0, "WelchBBWidth", 20, 0, 2.0, 20, "x", 100, "x", SAI, 2, Giai đoạn);

// This will give you the actual width in PIPs of the Bollinger Bands
double WelchBBWidth = iCustom(VÔ GIÁ TRỊ, 0, "WelchBBWidth", 20, 0, 2.0, 20, "x", 100, "x", SAI, 3, Giai đoạn);

// 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(VÔ GIÁ TRỊ, 0, "WelchBBWidth", 20, 0, 2.0, 20, "x", 100, "x", SAI, 4, Giai đoạn);
double WelchBBWidth_UpperLine = iCustom(VÔ GIÁ TRỊ, 0, "WelchBBWidth", 20, 0, 2.0, 20, "x", 100, "x", SAI, 5, Giai đoạn);
double WelchBBWidth_LoweLine = iCustom(VÔ GIÁ TRỊ, 0, "WelchBBWidth", 20, 0, 2.0, 20, "x", 100, "x", SAI, 6, Giai đoạn);

You could put something like this in your Expert Advisor:

/*
* int areWeRanging(int period=0)
*
* trả lại 1 for GREEN (ranging)
* trả lại -1 for YELLOW ( start/end of range)
* trả lại 0 nếu không thì (no range)
*/

int areWeRanging(int period=0) 
{
 double WelchBBWidth_Green = iCustom(VÔ GIÁ TRỊ, 0, "WelchBBWidth", 20, 0, 2.0, 20, "x", 100, "x", SAI, 0, Giai đoạn);
 double WelchBBWidth_Yellow = iCustom(VÔ GIÁ TRỊ, 0, "WelchBBWidth", 20, 0, 2.0, 20, "x", 100, "x", SAI, 1, Giai đoạn);

 nếu như ( WelchBBWidth_Green > 0 ) 
 {
   trở lại (1);
 } 
 else if ( WelchBBWidth_Yellow > 0) 
 {
   trở lại (-1);
 }

 trở lại (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.
nếu như ( areWeRanging(1)==1 && (areWeRanging(0)==-1 || areWeRanging(0)==0) ) 
 {
  In("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. **

Hình ảnh:

Welch Bollinger Band ® Width 2

*GHI CHÚ: 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

Thưởng thức!

-Tim

Bài đăng này hữu ích như thế nào?

Bấm vào một ngôi sao để đánh giá nó!

Đánh giá trung bình 0 / 5. Số phiếu bầu: 0

Không có phiếu bầu cho đến nay! Hãy là người đầu tiên đánh giá bài viết này.

Chúng tôi xin lỗi vì bài đăng này không hữu ích cho bạn!

Hãy để chúng tôi cải thiện bài đăng này!

Hãy cho chúng tôi biết cách chúng tôi có thể cải thiện bài đăng này?



Tác giả: Nhóm ngoại hối Wiki
Chúng tôi là một nhóm gồm các Nhà giao dịch ngoại hối giàu kinh nghiệm [2000-2023] những người cống hiến để sống cuộc sống theo cách riêng của chúng ta. Mục tiêu chính của chúng tôi là đạt được sự độc lập và tự do về tài chính, và chúng tôi đã theo đuổi việc tự học và có được nhiều kinh nghiệm trong thị trường ngoại hối như là phương tiện của chúng tôi để đạt được lối sống bền vững.