I would like to add indicator ( Shared_AccdistStoch_Signal21 ) (1.0.yes ) to watchlist

Column for ( Shared_AccdistStoch_Signal21 ) is showing the value for ex : o , -12 , 6

Time frame ( 5 min )

I tried using custom but unfortunately no result .

If anyone can help

Column for ( Shared_AccdistStoch_Signal21 ) is showing the value for ex : o , -12 , 6

Time frame ( 5 min )

I tried using custom but unfortunately no result .

If anyone can help

Code:

```
declare lower;
input overbought = 1;
input oversold = 0;
def data = if close > close[1] then close - Min(close[1], low) else if close < close[1] then close - Max(close[1], high) else 0;
def over_bought = overbought;
def over_sold = oversold;
def AD = TotalSum(data);
plot AccDist = (AD - LowestAll(AD)) / (HighestAll(AD) - LowestAll(AD));
AccDist.SetDefaultColor(GetColor(1));
def stoch1 = StochasticSlow("over bought" = 100, "over sold" = 0, "k period" = 9, "d period" = 3).SlowD;
#plot SlowD1 = (stoch1 - LowestAll(stoch1)) / (HighestAll(stoch1) - LowestAll(stoch1));
#SlowD1.SetDefaultColor(GetColor(3));
def stoch2 = StochasticSlow("overbought" = 100, "over sold" = 0, "k period" = 5, "d period" = 3).SlowD;
#plot SlowD2 = (stoch2 - LowestAll(stoch2)) / (HighestAll(stoch2) - LowestAll(stoch2));
#SlowD2.SetDefaultColor(GetColor(5));
plot one = 1;
plot zero = 0;
#plot half = 0.5;
input showBreakoutSignals = yes;
plot signalup = if AccDist crosses above over_sold then over_sold else Double.NaN;
signalup.SetHiding(!showBreakoutSignals);
signalup.SetDefaultColor(Color.Green);
signalup.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
signalup.HideTitle();
plot signaldown = if AccDist crosses below over_bought then over_bought else Double.NaN;
signaldown.SetHiding(!showBreakoutSignals);
signaldown.SetDefaultColor(Color.Red);
signaldown.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
signaldown.HideTitle();
# Alerts
Alert(signalup, "BUY BUY BUY ", Alert.Bar, Sound.Chimes);
Alert(signaldown, "SELL SELL SELL ", Alert.Bar, Sound.Bell);
```

Last edited by a moderator: