Need help reducing signals from CCI indicator

W

Woodman78

New member
Was curious how to remove duplicate/extra buy and sell signals from indicator? Id like to keep the first of a new signal and remove all others. Ive basically taken the CCI average indicator (lower) study and made it an (upper) study with buy and sell signals.
Code:
declare upper;

input cciLength = 14;
input cciAvgLength = 9;
input over_sold = -100;
input over_bought = 100;

def CCI = CCI(length = cciLength);
def CCIAvg = Average(CCI, cciAvgLength);
def OverBought = over_bought;
def OverSold = over_sold;

plot UpSignal = CCI crosses above oversold;
plot DownSignal = CCI crosses below overbought;

UpSignal.SetDefaultColor(Color.UPTICK);
UpSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
DownSignal.SetDefaultColor(Color.DOWNTICK);
DownSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
 

Similar threads

Top