Need help with Strat Number Code and hiding some of the numbers

jr2146

New member
I wanted to know if someone can please help me with a TOS study/code, Below is the Strat Number Study/Code and all I want is to be able to hide all the numbers above and below the candles except for just like the past 3 or 4 numbers on the candles so the chart will look clean and not show all the numbers on the candles.

Here is the TOS chart link with the study/code.
http://tos.mx/yjlTdvu

Image in:
Any help would be appreciated. Thank you.
 
Last edited:
Solution
I wanted to know if someone can please help me with a TOS study/code, Below is the Strat Number Study/Code and all I want is to be able to hide all the numbers above and below the candles except for just like the past 3 or 4 numbers on the candles so the chart will look clean and not show all the numbers on the candles.

Here is the TOS chart link with the study/code.
http://tos.mx/yjlTdvu

Image in:
Any help would be appreciated. Thank you.

en will be true on the last 4 bars of the chart
add en to the plot formulas, with and,

input lastbars = 4;
def en = (!isnan(close) and isnan(close[-lastbars]));

halcyonguy

Well-known member
VIP
Lifetime
I wanted to know if someone can please help me with a TOS study/code, Below is the Strat Number Study/Code and all I want is to be able to hide all the numbers above and below the candles except for just like the past 3 or 4 numbers on the candles so the chart will look clean and not show all the numbers on the candles.

Here is the TOS chart link with the study/code.
http://tos.mx/yjlTdvu

Image in:
Any help would be appreciated. Thank you.

en will be true on the last 4 bars of the chart
add en to the plot formulas, with and,

input lastbars = 4;
def en = (!isnan(close) and isnan(close[-lastbars]));
 
Solution

jr2146

New member
@halcyonguy thanks for this, only question is where exactly do I put the def en = (!isnan(close) and isnan(close[-lastbars])); as I have tried multiple places in the plot and even added the and and was not able to figure it out to get it to work correctly as I don't know how to code but trying to learn a little bit.. here is what I have tried, i put the def at the end of the first Plot but still showing all numbers as I put the code in the plot.

#------------------------------------
# S T R A T N U M B E R S
#
# A study by Ramon DV. aka Pelonsax
#
# Version 1.0 8/01/20
#
# Version 2.0 8/4/20 Corrected errors in logic for scenarios
#
#------------------------------------
#------------------------------------
# DEFINE SCENARIOS
#------------------------------------
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];
def twoup = H > H[1] and L >= L[1];
def twodown = H <= H[1] and L < L[1];

#------------------------------------
# STRAT NUMBERS
#------------------------------------
input Show_Strat_Numbers = yes;
input Show_Twos = yes;
input lastbars = 4;


plot barType = if Show_Strat_Numbers and insidebar then 1 else if Show_Strat_Numbers and outsidebar then 3 else Double.NaN;
barType.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);
barType.AssignValueColor(color.WHITE);def en = (!isnan(close) and isnan(close[-lastbars]));

plot barTypeDN = if Show_Strat_Numbers and !insidebar and !outsidebar and Show_Twos and twodown then 2 else Double.NaN;
barTypeDN.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);
barTypeDN.AssignValueColor(color.DOWNTICK);

plot barTypeUP = if Show_Strat_Numbers and !insidebar and !outsidebar and Show_Twos and twoup then 2 else Double.NaN;
barTypeUP.SetPaintingStrategy(PaintingStrategy.VALUES_ABOVE);
barTypeUP.AssignValueColor(color.UPTICK);


any help would be great.. thank you
 

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.
Top