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.
Here is the TOS chart link with the study/code.
http://tos.mx/yjlTdvu
Code:
#------------------------------------
# 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;
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);
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);
Image in:
Any help would be appreciated. Thank you.
Last edited by a moderator: