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 kb) 보다
작가:

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, period);
double WelchBBWidth_Yellow = iCustom(없는, 0, "WelchBBWidth", 20, 0, 2.0, 20, "엑스", 100, "엑스", 거짓, 1, period);
double WelchBBWidth_Red = iCustom(없는, 0, "WelchBBWidth", 20, 0, 2.0, 20, "엑스", 100, "엑스", 거짓, 2, period);

// 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, period);

// 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, period);
double WelchBBWidth_UpperLine = iCustom(없는, 0, "WelchBBWidth", 20, 0, 2.0, 20, "엑스", 100, "엑스", 거짓, 5, period);
double WelchBBWidth_LoweLine = iCustom(없는, 0, "WelchBBWidth", 20, 0, 2.0, 20, "엑스", 100, "엑스", 거짓, 6, period);

You could put something like this in your Expert Advisor:

/*
* int areWeRanging(int period=0)
*
* 보고 1 for GREEN (ranging)
* 보고 -1 for YELLOW ( start/end of range)
* 보고 0 그렇지 않으면 (no range)
*/

int areWeRanging(int period=0) 
{
 double WelchBBWidth_Green = iCustom(없는, 0, "WelchBBWidth", 20, 0, 2.0, 20, "엑스", 100, "엑스", 거짓, 0, period);
 double WelchBBWidth_Yellow = iCustom(없는, 0, "WelchBBWidth", 20, 0, 2.0, 20, "엑스", 100, "엑스", 거짓, 1, period);

 만약에 ( 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) ) 
 {
  Print("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

현재까지 투표가 없습니다! 이 게시물을 가장 먼저 평가해 보세요..

이 게시물이 귀하에게 도움이 되지 못했다니 죄송합니다!

이 게시물을 개선해 보겠습니다.!

이 게시물을 개선할 수 있는 방법을 알려주세요.?



작가: 외환 위키 팀
우리는 경험이 풍부한 Forex 트레이더 팀입니다. [2000-2023] 우리 자신의 조건에 따라 삶을 살기 위해 헌신하는 사람들. 우리의 주요 목표는 재정적 독립과 자유를 얻는 것입니다., 우리는 자기 교육을 추구하고 Forex 시장에서 자립 가능한 라이프 스타일을 달성하기 위한 수단으로 광범위한 경험을 얻었습니다..