hi folks,
the following is a code for displaying Full Time Frame Continuity (FTFC) that I use for The Strat (Rob Smith, RIP).
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.
the following is a code for displaying Full Time Frame Continuity (FTFC) that I use for The Strat (Rob Smith, RIP).
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.
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: