Candlestick trading daily count

koel

New member
Hello,

I am trying to add the count of the daily candlestick trading bullish or bearish candles on my chart using the script. Does anyone know how to achieve that in my Thinkorswim? So I can see how many candlesticks are green and red.

Thank you for all your help.
 
Hello,

I am trying to add the count of the daily candlestick trading bullish or bearish candles on my chart using the script. Does anyone know how to achieve that in my Thinkorswim? So I can see how many candlesticks are green and red.

Thank you for all your help.

[Edit] This will find the numbers for the last day

Screenshot-2022-11-23-072538.png

Ruby:
def green = if GetDay() == GetLastDay() then if close > open then green[1] + 1 else green[1] else green[1] ;
def red   = if GetDay() == GetLastDay() then if close < open then red[1] + 1 else red[1] else red[1];
def notRG = if GetDay() == GetLastDay() then if close == open then notRG[1] + 1 else notRG[1] else notRG[1];
AddLabel(1, "#Green Candles: " + green, Color.LIGHT_GREEN);
AddLabel(1, "#Red Candles: " + red, Color.LIGHT_RED);
AddLabel(1, "#Doji Candles: " + notRG, Color.YELLOW);
input test = no;
AddChartBubble(test, low, green + "\n" + red + "\n" + notRG, Color.GRAY, no);
 
Last edited:
This is awesome!!! Thank you SleepyZ, I am trying to edit to just display today but not able to update it. Could you help update the script just for today only? Appreciate your help, SleepZ.
 
This is awesome!!! Thank you SleepyZ, I am trying to edit to just display today but not able to update it. Could you help update the script just for today only? Appreciate your help, SleepZ.

I edited the original script which did the whole chart and replaced it above when I realized your request was for a day, not the whole chart.

So the above code in post #2 does just the last day.

Here is an image with the test bubbles activated so you can see the counts as they develop.

 

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

Thread starter Similar threads Forum Replies Date
T 8ema candlestick pattern Questions 3
T Long Candlestick Questions 3
Hannah Candlestick Pattern Alert Questions 1
TickTockTony Pin Bar candlestick code Questions 2
B candlestick upper indicator Questions 3

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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