"Candle State" Bar Type Identification :: TheStrat For ThinkOrSwim

I am running Heikin Ashi candles. Should I be using candle trend?
Okay, that's your problem. I changed my chart to Heikin Ashi and the candle at 12:50 changed its shape. Not sure why but it did. If you use regular candles your chart should appear as mine does. Interesting.
 
Okay, that's your problem. I changed my chart to Heikin Ashi and the candle at 12:50 changed its shape. Not sure why but it did. If you use regular candles your chart should appear as mine does. Interesting.
I really appreciate your help. I am used to using Heikin Ashi so didn't think about that when I switched to using TheStrat. When I change to regular candles I get what you have. Seems the HA candles tend to drag out the reds and greens a little longer. Doesn't help much with TheStrat. Thanks much...
 
@Mandalorianknight63 @Pelonsax When I run this script I am getting 2's that should be 1's and 3's that should be 2's. Tried a few different versions of scripts to label the candles 1, 2, or3 for TheStrat and getting this same false reporting. This occurred several times in todays AAPL charting (9/8/2020) for 1 minute and 5 minute charts. Any ideas on what is causing this anomaly. Thanks, Walk.
This isn't my thread bro. This is: https://usethinkscript.com/threads/rob-smiths-the-strat-indicator-for-thinkorswim.3312/
 
I am running Heikin Ashi candles. Should I be using candle trend?
Heiken-Ashi candles.... I can see where the label wouldn't match up. Heiken-Ashi will show averages and general trends. The numbers here are based on high/low for that traditional candle, not the average of 2 days candles like Heiken-Ashi will show you. Heiken-Ashi values are all calculated. Heiken-Ashi could look like a 2 down but the traditional candle might be a 1 or a 3, easily.
 
@OBW Thank you for this Scrip, This is great! Is it possible to custom color the numbers that appear below candles? IE; 1 yellow, 2 blue, 3 white or something like that... Thanks again!
 
@Mandalorianknight63
Code:
# +------------------------------------------------------------+
# |         Example code to print values below candles         |
# |                        Robert Payne                        |
# |               https://funwiththinkscript.com               |
# +------------------------------------------------------------+
def insideBar = high < high[1] and low > low[1];
def outsideBar = high > high[1] and low < low[1];
plot barType = if insideBar then 1 else if outsideBar then 3 else double.NaN;
barType.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);
Hello, jeez and here I took all the time learning these so that I could recognize them. Ha! @MerryDay can you confirm this script is the latest one. Thank you!
 
Hello, jeez and here I took all the time learning these so that I could recognize them. Ha! @MerryDay can you confirm this script is the latest one. Thank you!
If you are asking has the definition of inside bar and outside bar changed since the early 1900's, the answer would be no :)
If you are asking how members identify inside and out bars on charts, this is just one of many many scripts. There is not just one "updated" version. These four threads contain most of the flavors available on the forum:
https://usethinkscript.com/tags/inside/
 
Hello everyone, love this community and scroll through the website countless times throughout the day. Thanks to everyone who makes this possible. I was wondering if its possible to have an indicator plot only during regular trading hours. I use the strat but find the numbers kind of distracting in the premarket so if someone could help me where the indicator will plot the numbers ONLY during regular trading hours that would be so fantastic. Thank you.
Code:
# +------------------------------------------------------------+
# |         Example code to print values below candles         |
# |                        Robert Payne                        |
# |               https://funwiththinkscript.com               |
# +------------------------------------------------------------+
def H = high;
def L = low;
def C = close;
def O = open;


def insideBar =  (H < H[1] and L > L[1]) or (H == H[1] and L > L[1]) or (H < H[1] and L == L[1]) or (H == H[1] and L == L[1]);
def outsideBar = H  > H[1] and L <  L[1];
plot barType1 = if insideBar then 1 else double.nan;
barType1.SetPaintingStrategy(PaintingStrategy.VALUES_ABOVE);

plot barType2 = if outsideBar then 3 else double.nan;

barType2.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);
 
Hello everyone, love this community and scroll through the website countless times throughout the day. Thanks to everyone who makes this possible. I was wondering if its possible to have an indicator plot only during regular trading hours. I use the strat but find the numbers kind of distracting in the premarket so if someone could help me where the indicator will plot the numbers ONLY during regular trading hours that would be so fantastic. Thank you.
Code:
# +------------------------------------------------------------+
# |         Example code to print values below candles         |
# |                        Robert Payne                        |
# |               https://funwiththinkscript.com               |
# +------------------------------------------------------------+
def H = high;
def L = low;
def C = close;
def O = open;


def insideBar =  (H < H[1] and L > L[1]) or (H == H[1] and L > L[1]) or (H < H[1] and L == L[1]) or (H == H[1] and L == L[1]);
def outsideBar = H  > H[1] and L <  L[1];
plot barType1 = if insideBar then 1 else double.nan;
barType1.SetPaintingStrategy(PaintingStrategy.VALUES_ABOVE);

plot barType2 = if outsideBar then 3 else double.nan;

barType2.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);

This should help

Ruby:
# +------------------------------------------------------------+
# |         Example code to print values below candles         |
# |                        Robert Payne                        |
# |               https://funwiththinkscript.com               |
# +------------------------------------------------------------+
def H = high;
def L = low;
def C = close;
def O = open;
input start = 0930;
input end   = 1600;

def rth = secondsfromTime(start) >= 0 and secondstillTime(end)>0;

def insideBar =  (H < H[1] and L > L[1]) or (H == H[1] and L > L[1]) or (H < H[1] and L == L[1]) or (H == H[1] and L == L[1]);
def outsideBar = H  > H[1] and L <  L[1];
plot barType1 = if rth and insideBar then 1 else double.nan;
barType1.SetPaintingStrategy(PaintingStrategy.VALUES_ABOVE);

plot barType2 = if rth and outsideBar then 3 else double.nan;

barType2.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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