Shared_AccdistStoch_Signal21 watchlist

iSul

Member
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

p_1806wadt51.png


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:
Here is the code for your watchlist column:

Code:
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));

HVd5Jgj.png
 
BEN . there is different between the chart and the watchlist .

watchlist for AAPL the number ( .72 )

p_1814u2i6o1.png


in the chart the number ( .41834 )

p_18149yunj1.png


I tried all the time frame but still the same the numbers not match

p_1814by3sk1.png
 
@iSultan That is because the timeframe setting from the watchlist column is a bit different. Not the time period, but the setting that's being set by ThinkorSwim.

Go to your chart's settings > Equities > uncheck "Start aggregations at market."

pQHkW4Y.png


After that, the number should be the same.
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Thread starter Similar threads Forum Replies Date
M When you share a shared file -can it be sabotaged Questions 2
retrobeast Is there a way to see code of a shared chart? Questions 2

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
437 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top