Exit Indicators - PercentB

I have been prototyping a PercentB Exit indicator(it provides arrows when various percentage regions on Bollinger bands are crossed). It provides fast signals, but it can take me out of a trade that continues to increase shortly after a small dip. This may be unavoidable, but I thought it best to ask the community if anyone has a reliable method for filtering out false exits?
 
In the Picture below you may notice a lot of arrows are plotted(I have restricted down arrows to above the mid-line and up arrows below)Basically when the percent B crosses the Bollinger bands, midline, or halfway between those lines an arrow is produced indicating the end of the price movement. I need to filter out some of the arrows so that I don't abandon trades too early. This will likely require some sort of moving average cross or requirement of new highs/lows- some kind of filter, but I don't know what that filter needs to be.

This calls tops and bottems well and quicker than anyother indicator Ive seen, but it gives a lot of early signals too that I am hoping to filter at least some out somehow.

Code:
#percentB_Exit
declare lower;

input averageType = AverageType.SIMPLE;
input price = close;
input displace = 0;
input length = 20;
input Num_Dev_Dn = -2.0;
input Num_Dev_up = 2.0;

input Num_Dev_Dn_half = -1.0;
input Num_Dev_up_half = 1.0;


input Hulllength = 9;


def HMA = MovingAverage(AverageType.HULL, price, Hulllength)[-displace];

#HMA.DefineColor("Up", GetColor(1));
#HMA.DefineColor("Down", GetColor(0));
#HMA.AssignValueColor(if HMA > HMA[1] then HMA.color("Up") else HMA.color("Down"));

def upperBand = BollingerBands(price, displace, length, Num_Dev_Dn, Num_Dev_up, averageType).UpperBand;
def lowerBand = BollingerBands(price, displace, length, Num_Dev_Dn, Num_Dev_up, averageType).LowerBand;

def upperBandhalf = BollingerBands(price, displace, length, Num_Dev_Dn_half, Num_Dev_up, averageType).UpperBand;
def lowerBandhalf = BollingerBands(price, displace, length, Num_Dev_Dn_half, Num_Dev_up, averageType).LowerBand;
def PercentB = (price - lowerBand) / (upperBand - lowerBand) * 100;
plot  PercentB_half = (price - lowerBandhalf) / (upperBandhalf - lowerBandhalf) * 100;
plot ZeroLine = 0;
plot HalfLine = 50;
plot UnitLine = 100;
plot twenty5 = 25;
plot seventy5 = 75;

#PercentB.SetDefaultColor(GetColor(1));
#PercentB.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
#PercentB.SetLineWeight(1);
#ZeroLine.SetDefaultColor(GetColor(8));
#HalfLine.SetDefaultColor(GetColor(8));
#UnitLine.SetDefaultColor(GetColor(8));

plot reboundUp =  (PercentB[1] <= ZeroLine) and (PercentB > ZeroLine) or (PercentB[1] <= HalfLine) and (PercentB > HalfLine) or (PercentB[1] <= twenty5) and (PercentB > twenty5) and (Price[1] <= HMA[1]) and (PercentB[1] <= HMA[1]);

#(PercentB[1] <= UnitLine) and (PercentB > UnitLine) or (PercentB[1] <= seventy) and (PercentB > seventy)

reboundUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
reboundUp.SetLineWeight(1);
reboundUp.SetDefaultColor(Color.GREEN);

plot reboundDown = (PercentB[1] >= HalfLine) and (PercentB < HalfLine) or (PercentB[1] >= UnitLine) and (PercentB < UnitLine) or (PercentB[1] >= seventy5) and (PercentB < seventy5) and (Price[1] >= HMA[1]) and (PercentB[1] >= HMA[1]);

#(PercentB[1] >= twenty5) and (PercentB < twenty5) or (PercentB[1] >= ZeroLine) and (PercentB < ZeroLine) or

reboundDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
eF13HoI.png
[/IMG]
 
Last edited:

MerryDay

Administrative
Staff member
Staff
VIP
@Bladeof300 It might help you to review the Basics of a Good Strategy. The use of additional indicators and multiple-time frames are designed to help weed out false signals such as you describe.

Also, did you develop your strategy based on any of the established strategies out there? I googled trading with percent b. It brought up a plethora of ideas for reducing the false signals that seem to be associated with this indicator. Did you try them and false signals persisted?

The %B strategy on the StockCharts site combines it with the TOS money flow indicator as the basis for its strategy. It then adds some of the common indicators such as TOS MACD or others for use in confirming direction of the emerging trend to weed out false signals. It goes further to suggest that the use of the TOS ADX for confirmation of signal. In its conclusion, the site states that the indicator on its own is problematic but applied in a proper strategy, it is not useless:
044TyfQ.png


FYI, for future reference, it is proper forum etiquette to research your question before posting to the forum. There are several sites on the internet besides the one that I highlighted that turned up similar answers to your question and emphasizes the weaknesses of this indicator as anything other than a confirming signal in an otherwise established strategy.

The two biggest indicators of whether a retail investor will be successful are the ability to do research and the ability to apply that research. HTH
 
@Bladeof300 It might help you to review the Basics of a Good Strategy. The use of additional indicators and multiple-time frames are designed to help weed out false signals such as you describe.

Also, did you develop your strategy based on any of the established strategies out there? I googled trading with percent b. It brought up a plethora of ideas for reducing the false signals that seem to be associated with this indicator. Did you try them and false signals persisted?

The %B strategy on the StockCharts site combines it with the TOS money flow indicator as the basis for its strategy. It then adds some of the common indicators such as TOS MACD or others for use in confirming direction of the emerging trend to weed out false signals. It goes further to suggest that the use of the TOS ADX for confirmation of signal. In its conclusion, the site states that the indicator on its own is problematic but applied in a proper strategy, it is not useless:
044TyfQ.png


FYI, for future reference, it is proper forum etiquette to research your question before posting to the forum. There are several sites on the internet besides the one that I highlighted that turned up similar answers to your question and emphasizes the weaknesses of this indicator as anything other than a confirming signal in an otherwise established strategy.

The two biggest indicators of whether a retail investor will be successful are the ability to do research and the ability to apply that research. HTH
Thank you, for your help. This will be a huge help in developing an exit strategy
 

Similar threads

Top