Candle Wick Sentiment Indicator for ThinkorSwim

mashume

Expert
VIP
Lifetime
This gives bullish / bearish sentiment by looking at wick length vs body size. Potential pivots are indicated with green or red dots.

67aIEaj.png


Code:
# Experiment # 3
# Candle Wick Sentiment Indicator
# Seth Urion
# November 2019

declare lower;

input reversal = 33;
input trend_length = 5;

def total = high - low;
def upper_candle = high - Max(open, close);
def lower_candle = Min(open, close) - low;
def trend_mult = if close >= open then 1 else -1;

plot zero = 0;
zero.SetLineWeight(1);
zero.AssignValueColor(Color.WHITE);
zero.SetStyle(Curve.MEDIUM_DASH);

def Upper_Sentiment = if total != 0 then 100 - ((upper_candle / total) * 100) else 0;
def Lower_Sentiment = if total != 0 then -100 + (( lower_candle / total) * 100) else 0;

plot Trend = ExpAverage(Upper_Sentiment + Lower_Sentiment, length = trend_length);
Trend.SetLineWeight(3);
Trend.AssignValueColor(Color.WHITE);

plot UpperWickReversal = if Upper_Sentiment <= reversal and Upper_Sentiment != 0 then Upper_Sentiment else Double.NaN;
UpperWickReversal.SetPaintingStrategy(PaintingStrategy.POINTS);
UpperWickReversal.SetLineWeight(4);
UpperWickReversal.AssignValueColor(Color.RED);

plot LowerWickReversal = if Lower_Sentiment >= -reversal and Lower_Sentiment != 0 then Lower_Sentiment else Double.NaN;
LowerWickReversal.SetPaintingStrategy(PaintingStrategy.POINTS);
LowerWickReversal.SetLineWeight(4);
LowerWickReversal.AssignValueColor(Color.Green);


I got tired of looking at candles and wondering if they should be telling me something. This is not perhaps the clearest indicator and should not be used in isolation, but the turning points can be good indications that something is about to happen.

Happy Trading!
 

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

@marine, I generally use RSI in Laguerre time with Fractal Energy for entry points. This is my 'early warning' system to potential changes in the mood of the market.

I can walk you through the day illustrated above and what each signal might mean to me...
  1. The green dot just after 7:00 (remember I'm on a tick chart) with a generally positive sentiment tells me that the bears are losing control of the trade.
  2. The sentiment remains somewhat negative even as price rises through about 9:00 telling me that there is either some profit taking, or some reluctance to move higher. This sentiment is reversed just after 9:00 when the trend crosses into positive territory and price then rockets up.
  3. The red dot at 9:45, before the downward move, alerts me that there may be some move to the downside as the bulls have lost control of that candle.
  4. Bears lose control themselves just before 10:00 and the price is free to move higher again.
  5. Positive sentiment after 11:15 paired with decreasing prices sends a BIG warning sign that some downturn is on the way.
  6. The bulls lose control at the red dot at 12:00, setting off (but preceding) the precipitous plunge over lunch between 12 and 12:30.
This is how I read it. It's not generating buy and sell signals (other indicators do that well). It does give me some sense of the tug-of-war between bears and bulls on a candle-by-candle basis.

Change up the smoothing length, or the threshold (this sets the point at which dots are drawn).

The idea for the indicator was born after reading this article:
https://admiralmarkets.com/analytic...s-a-key-shortcut-during-forex-and-cfd-trading

Hope that helps you understand a bit of what this one is showing you. As always, your read of the market is your own.

Happy Trading
 
hello trying to get a scan where the high is very extreme from the open of a candlestick. In other words a very tall wick from the body of the candle
 
hello trying to get a scan where the high is very extreme from the open of a candlestick. In other words a very tall wick from the body of the candle
you need to specify what constitutes "Very extreme", as a percentage of close or something similar, before anybody anybody can help ya out
 
I have modified the script to my personal style but need help plotting arrows and alerting only at the last second of every candle (1m or 5m). Current errors:
1) the arrow appears and disappear
2) wicks appears in first 5 seconds but disappears last seconds
3) alerts is set to once per bar but since wick disapear it is a fake alert

I only want to plot (LowerWickReversal and UpperWickReversal ) and alert at the last second of every candle.

Here is my script:

input reversal = 33;
input trend_length = 5;

def total = high - low;
def upper_candle = high - Max(open, close);
def lower_candle = Min(open, close) - low;
def trend_mult = if close >= open then 1 else -1;


def Upper_Sentiment = if total != 0 then 100 - ((upper_candle / total) * 100) else 0;
def Lower_Sentiment = if total != 0 then -100 + (( lower_candle / total) * 100) else 0;


plot UpperWickReversal = (if Upper_Sentiment <= reversal and Upper_Sentiment != 0 then high+0.3 else Double.NaN);
UpperWickReversal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
UpperWickReversal.SetLineWeight(2);
UpperWickReversal.AssignValueColor(Color.RED);

Alert(UpperWickReversal > 0, "SPY Puts", Alert.bar, Sound.ding);

plot LowerWickReversal = (if Lower_Sentiment >= -reversal and Lower_Sentiment != 0 then low-0.30 else Double.NaN);
LowerWickReversal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
LowerWickReversal.SetLineWeight(2);
LowerWickReversal.AssignValueColor(Color.GREEN);

Alert(LowerWickReversal < 0, "SPY Calls", Alert.bar, Sound.ding);
 
Probably not.
You can change the conditions around so that it triggers if bar[1] meets the condition, that way only once the bar closes would there be an arrow. But I'm not sure this would really do it:

Code:
plot UpperWickReversal = (if Upper_Sentiment[1] <= reversal[1] and Upper_Sentiment[1] != 0 then high+0.3 else Double.NaN);

That probably won't do what I think it might. Life is crazy at the moment. I haven't been awake enough to take a trade in more than a week... just that much of my day job to do.

-mashume
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
342 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