FTFC indicator glitches on W timeframe

kyuts

New member
hi folks,

the following is a code for displaying Full Time Frame Continuity (FTFC) that I use for The Strat (Rob Smith, RIP).

1699408805889.png


i found a glitch in the code and i am not well versed in thinkscript to be able to fix it myself. hence, i am asking for some help here.

the following screenshot of Humana is from November 2nd 2023. on that day, Humana was down for the Month (of November) and the Week.

however, the FTFC indicator shows M in Green, and I suspect it is still considering the month of October because that week ending November 3rd started on October 30th.

i suppose this is peculiarity only for the W timeframe because it can span across Months, Quarters or Years.

is there a way to fix the code (found on YouTube) to accommodate for this issue, such that the FTFC indicator would show RED for M for Humana in this instance? essentially, on the 1st of a new month, it should start reflecting the color for that month, and not the prior month.

thank you in advance.

1699409813062.png


Code:
#from remYtKkiC30 video on YT
#https://tos.mx/pXoYaDy

Declare upper;
 
input Time_Frame = aggregationPeriod.DAY;

AddLabel(yes, if Time_Frame == aggregationPeriod.YEAR then "Y"
    else
    if Time_Frame == aggregationPeriod.QUARTER then "Q"
    else
    if Time_Frame == aggregationPeriod.MONTH then "M"
    else
    if Time_Frame == aggregationPeriod.WEEK then "W"
    else
    if Time_Frame == aggregationPeriod.FOUR_DAYS then "4D"
    else
    if Time_Frame == aggregationPeriod.THREE_DAYS then "3D"
    else
    if Time_Frame == aggregationPeriod.TWO_DAYS then "2D"
    else
    if Time_Frame == aggregationPeriod.DAY then "D"
    else
    if Time_Frame == aggregationPeriod.FOUR_HOURS then "4H"
    else
    if Time_Frame == aggregationPeriod.TWO_HOURS then "2H"
    else
    if Time_Frame == aggregationPeriod.HOUR then "60m"
    else
    if Time_Frame == aggregationPeriod.THIRTY_MIN then "30m"
    else
    if Time_Frame == aggregationPeriod.TWENTY_MIN then "20m"
    else
    if Time_Frame == aggregationPeriod.FIFTEEN_MIN then "15m"
    else
    if Time_Frame == aggregationPeriod.TEN_MIN then "10m"
    else
    if Time_Frame == aggregationPeriod.FIVE_MIN then "5m"
    else
    if Time_Frame == aggregationPeriod.FOUR_MIN then "4m"
    else
    if Time_Frame  == aggregationPeriod.THREE_MIN then "3m"
    else
    if Time_Frame == aggregationPeriod.TWO_MIN then "2m"
    else
    if Time_Frame  == aggregationPeriod.MIN then "1m"
    else "",
if close(period = Time_Frame) < open (period = Time_Frame)
then  Color.RED else  if close(period = Time_Frame) > open(period = Time_Frame) then Color.GREEN else Color.WHITE);
 
Last edited:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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