Indicator for Think or Swim based on Rob Smith's The STRAT

Thanks, but I keep getting just a chart with a line at the bottom?


I changed "plot" to "def" above, which should solve your problem.

Two possible solutions when that occurs:

(1) Go AutoSettings (sideways "S" symbol inside two lines on your right) and unclick Fit Studies. The line will remain, but it may not distract you.
(2) Go to the Study settings for the study in question and unclick "Show plot, Show bubble, and Show title" for any plot that you don't want to display.
 
Last edited:
In order to keep the post clean, updates are now found at the very bottom of the thread
NEWEST: 04/25/22
I really appreciate the amazing work that has gone into this, thank you! One question, I cannot figure out how to expand the watchlist column script to expand to the right and view the MTF columns, 15m, 30m, etc. How does this work? I only see the first column of numbers.
QvNj4Eo.jpg


can you clarify what you mean by "I cannot figure out how to expand the watchlist column script to expand to the right and view the MTF columns, 15m, 30m, etc. How does this work? I only see the first column of numbers."

Yes, that @MerryDay is correct. You need to add it multiple times for each timeframe you want. Watch his video which shows the process.
Hopefully, the pic on the right shows multiple columns with progressive time frames. Mine only shows one column. I downloaded the correct watchlist column, but I can't figure out how to show the view the multiple time frames. Do you have to create each time frame separately. I so how?
Jlg8Ude.jpg
 
Last edited by a moderator:
I really appreciate the amazing work that has gone into this, thank you! One question, I cannot figure out how to expand the watchlist column script to expand to the right and view the MTF columns, 15m, 30m, etc. How does this work? I only see the first column of numbers.

QvNj4Eo.jpg


























F
can you clarify what you mean by "I cannot figure out how to expand the watchlist column script to expand to the right and view the MTF columns, 15m, 30m, etc. How does this work? I only see the first column of numbers."

Yes, that @MerryDay is correct. You need to add it multiple times for each timeframe you want. Watch his video which shows the process.

Did you watch the column video he also posted next to the code on page 1 of this thread?
 
Does this strat only look at the body of the candle or the wicks also? like is a 1 where the body of a candle stays within the body of the previous candle or is it if it wicks outside of the prev. candle does that make it a 2? If that is a part of it, then maybe defining the body of the candle would help. it looks like sometimes wicks will cause it to label a candle the wrong scenario. Maybe using the close and open of the candle? I'm curious to know the answer of the wick thing regardless. Great work with everything BTW, It looks great
 
Does this strat only look at the body of the candle or the wicks also? like is a 1 where the body of a candle stays within the body of the previous candle or is it if it wicks outside of the prev. candle does that make it a 2? If that is a part of it, then maybe defining the body of the candle would help. it looks like sometimes wicks will cause it to label a candle the wrong scenario. Maybe using the close and open of the candle? I'm curious to know the answer of the wick thing regardless. Great work with everything BTW, It looks great
Wicks always count in the Strat.
 
Sorry, I have been so busy with life in general, this is the first chance I've had to come on here in a while. No, the gray arrows only appear when there is FTFC up or down. They definitely are not buy/sell signals. That decision has to be based on more than just time frame continuity. Honestly I discontinued the background color on the main TFC script because it was really messing with my psyche. I like the overlay charts and the study that is included in them that draws the horizontal lines for the beginning of FTFC in each direction. In ranging markets, I find a lot of good confirmation for scalps when going from the bottom line to the top line. In trending markets, you want to see continuation above/below these lines
Hi Pelonsax: I appreciate your great work ethic and generosity. Several points of reference to share with U, inviting your comments and reply. This post is a stepping back and reflection on the excellent indicators that are a part of "the Strat"..
1. Yes, the algorithyms are "running the show" for a vast number of the some odd 8000 stocks and ETF's. Yes, this provides Strat users useful signals when they are fired up and running. (beats me how Cathy Woods at Ark Innovation funds has stayed in the business w/o any risk control- lost 75% of her investors $ this year!). So it's not strange that most retail investors are clueless when it comes to algorithmic runs that blow past previous candles.
2. A side comment about the difference between Indexes, ETF's, Mutual Funds, and stocks.
There is a lot of "slop fest" to describe much of the action in these Wall Street "manufactured products". They often function as "leaders or horses" for the derivative and option traders to piggy-back so as to ply their trade- which is scalping for profits: in addition to offsetting risk remediation strategies like long and short option combinations- which further complicates things.
We know many of the option players in Apple, Tesla, etc, never intend to or want to actually own stock or invest in the underlying issues. When the level of market making in these option's derivative products equals and sometime exceeds normalized ranges of volume & volatility of the underlying issues, there is great distortion and at the same time great opportunity for profits, both intraday and interday..
Keeping the above in Mind: I think we collectively have all the indicators and tools necessary to confirm price action and take appropriate action. Now it seems to me we need to consider an overview strategy to isolate and focus on the trading selection process:
I invite comments and replies:
Developing a Tools Watch List for Trading Candidates:
a. "TOS's Today's Options Statistics" b. TOS's "Trade Flash" c. Barchart.com has a few useful tools d. https://marketchameleon.com
Most experienced traders will know about these sources in addition to their own Option Scans.
I would hop a disciplined drilling down filtering process ( Volume and Volatility screens) along with the Time Frame Continuity and Strat studies applied to Options. (The news catalysts are a further element and factor that need to be examined and incorporated in the execution of any consistently profitable strategy)
To state the obvious: In essence what is needed is an alert system for the shifts before the algorithms get fully fired up.. A sort of Volatility Map.. I am experimenting a variety of things: with Cumulative Tick Indicator as well as the Price Channel indicator at TOS, and the TOS TheoTrade comparative quan ticks..
I invite posted suggestions.
Best to all . MagicQuotes
 
Hey. is there anyway for the original

STRAT BAR NUMBERS 2.0​

study to only show the Strat numbers from the past like 20 or so candles? Thanks in advance.
 
I am completely overwhelmed by this thread. Mr. Einstein said, “If you can't explain it to a six-year-old, you don't understand it yourself.” I am willing to play the role of a six-year-old if anyone is willing to validate their understanding of THE STRAT.
You said what I am thinking!
Did you finally get it? Is it helpful? I'm thinking that It's too difficult with so many other indicators available.
 
  • Like
Reactions: ASC
My understanding of the strat:
the typical theSTRAT trader leverages three basic scenarios, combos, time frame continuity, and broadening formations to seek high probability trading setups.

three scenarios =
#1: price does not exceed high or low (known as an inside bar)
#2: price exceeds either the high or the low (known as an UP or DOWN bar)
[NOTE: UP or DOWN refers to the direction in which a high or low was broken, NOT the color of the bar]
#3: price exceeds both the high and the low.

combos = combinations of the scenarios. (example: 2-1-2, 2-2-2, 1-2-2, etc.)

full time frame continuity = lower and higher time frames in agreement (example: 15-minute, hour, and day are green)

broadening formation = price can expand to the upside and downside along trendlines, creating a megaphone pattern

high probability trading setup = scenario triggers a reversal combo into full time frame continuity near the edge of a broadening formation

frequent question #1: isn't this rear-view mirror/historical/after-the-fact trading?
no. I interpret theSTRAT as reactive, not historical, and definitely not predictive.

frequent question #2: The Entry is where?
the entry is made on the break of the next-to-last candle of the combo. example, if you are trading a 2-1-2 setup, your entry is when price breaks the high or low of the 1. you do not enter after the final 2. you should enter at the moment/point the 2 was triggered.

frequent question #3: Where does the stop loss go?
the stop loss should be placed according to where you would be wrong on that chosen time frame. example: you wanted to go long on a 2-1-2 combo, the stop-loss would be on the opposite side of the 1 after you triggered in. some strat advocates use really tight stop losses, as their rationale is that it should work right away and if not, just exit the trade and find another trade.

if my explanation is not simple enough, the best explanations I have found for theSTRAT are, in order from easy to hard: #1a. AlexOptions #1b. DangSTRAT #3. Sara Strat Sniper and #4. Rob Smith
Great explanation.
 
Can anyone breakdown the meanings of the colors for the cells in the following? I looked at the code but some of the colors arent adding up for me. I just want to know what Im seeing with each respective cell color. Thank you

"NEW WATCHLIST COLUMN
# S T R A T R E V E R S A L 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
# Version 2.1 8/15/20 Added Reversals
# 9/15/20 added two previous bars and reversals for WL columns"
 
@Pelonsax what would I need to add in to show the current HOURLY label the exact color of the candle being either INSIDEBAR = YELLOW, OUTSIDEBAR = MAGENTA, 2UP = DARK GREEN, 2DOWN = RED while looking at any other timeframe lower then the hour?


I'm specifically asking within this code because I want to be able to look on any timeframe lower then the HOUR and know what the bottom of the hour is doing. I've been on this for the last 3 days and everything I've tried only shows me the color of the candle within the specific time chart I'm looking at and not the color on the HOUR that I'm trying to get. All of your time will be appreciated.




##FTFC (Full-Time-Frame-Continuity) Labels##
# By: Casey Brett
#IMPORTANT: In order for all labels to show up on your chart you MUST do the following 2 things:
#1 - Use a Time Frame less than OR equal to the lowest label (15minute)
#2 - Have at least 30 days of time frame. Ex. 30 days :1 min // 30 Days : 15 minutes // 45 Days : 30 minutes

input MonthLabel = yes;
input WeekLabel = yes;
input FourDayLabel = yes;
input TwoDayLabel = yes;
input DayLabel = yes;
input FourHourLabel = yes;
input TwoHourLabel = yes;
input HourLabel = yes;
input ThirtyMinLabel = yes;
input FifteenMinLabel = yes;
input FiveMinLabel = yes;
input OneMinLabel = yes;

DefineGlobalColor("UP", color.green);
DefineGlobalColor("DOWN", color.red);

## Month Aggregation Period Variables

def MonthOpen;
def MonthClose;
def MonthUp;
def MonthDown;
def MonthAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Month {
MonthOpen = open(period = "Month");
MonthClose = close(period = "Month");
MonthUp = if MonthClose > MonthOpen then 1 else 0;
MonthDown = if MonthClose < MonthOpen then 1 else 0;
MonthAggregationPeriod = 1;
}
else {
MonthOpen = 0;
MonthClose = 0;
MonthUp = 0;
MonthDown = 0;
MonthAggregationPeriod = 0;
}
AddLabel(MonthLabel and MonthAggregationPeriod, " M ", if MonthUp then GlobalColor("UP") else if MonthDown then GlobalColor("DOWN") else Color.White);

## Week Aggregation Period Variables

def WeekOpen;
def WeekClose;
def WeekUp;
def WeekDown;
def WeekAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Week {
WeekOpen = open(period = "Week");
WeekClose = close(period = "Week");
WeekUp = if WeekClose > WeekOpen then 1 else 0;
WeekDown = if WeekClose < WeekOpen then 1 else 0;
WeekAggregationPeriod = 1;
}
else {
WeekOpen = 0;
WeekClose = 0;
WeekUp = 0;
WeekDown = 0;
WeekAggregationPeriod = 0;
}
AddLabel(WeekLabel and WeekAggregationPeriod, " W ", if WeekUp then GlobalColor("UP") else if WeekDown then GlobalColor("DOWN") else Color.White);

## Four_Days Aggregation Period Variables

def Four_DaysOpen;
def Four_DaysClose;
def Four_DaysUp;
def Four_DaysDown;
def Four_DaysAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Four_Days {
Four_DaysOpen = open(period = "4 Days");
Four_DaysClose = close(period = "4 Days");
Four_DaysUp = if Four_DaysClose > Four_DaysOpen then 1 else 0;
Four_DaysDown = if Four_DaysClose < Four_DaysOpen then 1 else 0;
Four_DaysAggregationPeriod = 1;
}
else {
Four_DaysOpen = 0;
Four_DaysClose = 0;
Four_DaysUp = 0;
Four_DaysDown = 0;
Four_DaysAggregationPeriod = 0;
}
AddLabel(FourDayLabel and Four_DaysAggregationPeriod, " 4D ", if Four_DaysUp then GlobalColor("UP") else if Four_DaysDown then GlobalColor("DOWN") else Color.White);

## Two_Days Aggregation Period Variables

def Two_DaysOpen;
def Two_DaysClose;
def Two_DaysUp;
def Two_DaysDown;
def Two_DaysAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Two_Days {
Two_DaysOpen = open(period = "2 Days");
Two_DaysClose = close(period = "2 Days");
Two_DaysUp = if Two_DaysClose > Two_DaysOpen then 1 else 0;
Two_DaysDown = if Two_DaysClose < Two_DaysOpen then 1 else 0;
Two_DaysAggregationPeriod = 1;
}
else {
Two_DaysOpen = 0;
Two_DaysClose = 0;
Two_DaysUp = 0;
Two_DaysDown = 0;
Two_DaysAggregationPeriod = 0;
}
AddLabel(TwoDayLabel and Two_DaysAggregationPeriod, " 2D ", if Two_DaysUp then GlobalColor("UP") else if Two_DaysDown then GlobalColor("DOWN") else Color.White);


## Day Aggregation Period Variables

def DayOpen;
def DayClose;
def DayUp;
def DayDown;
def DayAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Day {
DayOpen = open(period = "Day");
DayClose = close(period = "Day");
DayUp = if DayClose > DayOpen then 1 else 0;
DayDown = if DayClose < DayOpen then 1 else 0;
DayAggregationPeriod = 1;
}
else {
DayOpen = 0;
DayClose = 0;
DayUp = 0;
DayDown = 0;
DayAggregationPeriod = 0;
}
AddLabel(DayLabel and DayAggregationPeriod, " D ", if DayUp then GlobalColor("UP") else if DayDown then GlobalColor("DOWN") else Color.White);

## four_hours Aggregation Period Variables

def four_hoursOpen;
def four_hoursClose;
def four_hoursUp;
def four_hoursDown;
def four_hoursAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.four_hours {
four_hoursOpen = open(period = "4 hours");
four_hoursClose = close(period = "4 hours");
four_hoursUp = if four_hoursClose > four_hoursOpen then 1 else 0;
four_hoursDown = if four_hoursClose < four_hoursOpen then 1 else 0;
four_hoursAggregationPeriod = 1;
}
else {
four_hoursOpen = 0;
four_hoursClose = 0;
four_hoursUp = 0;
four_hoursDown = 0;
four_hoursAggregationPeriod = 0;
}
AddLabel(FourHourLabel and four_hoursAggregationPeriod, " 4H ", if four_hoursUp then GlobalColor("UP") else if four_hoursDown then GlobalColor("DOWN") else Color.White);

## Two_Hours Aggregation Period Variables

def Two_HoursOpen;
def Two_HoursClose;
def Two_HoursUp;
def Two_HoursDown;
def Two_HoursAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Two_Hours {
Two_HoursOpen = open(period = "2 Hours");
Two_HoursClose = close(period = "2 Hours");
Two_HoursUp = if Two_HoursClose > Two_HoursOpen then 1 else 0;
Two_HoursDown = if Two_HoursClose < Two_HoursOpen then 1 else 0;
Two_HoursAggregationPeriod = 1;
}
else {
Two_HoursOpen = 0;
Two_HoursClose = 0;
Two_HoursUp = 0;
Two_HoursDown = 0;
Two_HoursAggregationPeriod = 0;
}
AddLabel(TwoHourLabel and Two_HoursAggregationPeriod, " 2H ", if Two_HoursUp then GlobalColor("UP") else if Two_HoursDown then GlobalColor("DOWN") else Color.White);


## Hour Aggregation Period Variables

def HourOpen;
def HourClose;
def HourUp;
def HourDown;
def HourAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Hour {
HourOpen = open(period = "1 Hour");
HourClose = close(period = "1 Hour");
HourUp = if HourClose > HourOpen then 1 else 0;
HourDown = if HourClose < HourOpen then 1 else 0;
HourAggregationPeriod = 1;
}
else {
HourOpen = 0;
HourClose = 0;
HourUp = 0;
HourDown = 0;
HourAggregationPeriod = 0;
}
AddLabel(HourLabel and HourAggregationPeriod, " H ", if HourUp then GlobalColor("UP") else if HourDown then GlobalColor("DOWN") else Color.White);








## Thirty_Min Aggregation Period Variables

def Thirty_MinOpen;
def Thirty_MinClose;
def Thirty_MinUp;
def Thirty_MinDown;
def Thirty_MinAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Thirty_Min {
Thirty_MinOpen = open(period = "30 Min");
Thirty_MinClose = close(period = "30 Min");
Thirty_MinUp = if Thirty_MinClose > Thirty_MinOpen then 1 else 0;
Thirty_MinDown = if Thirty_MinClose < Thirty_MinOpen then 1 else 0;
Thirty_MinAggregationPeriod = 1;
}
else {
Thirty_MinOpen = 0;
Thirty_MinClose = 0;
Thirty_MinUp = 0;
Thirty_MinDown = 0;
Thirty_MinAggregationPeriod = 0;
}
AddLabel(ThirtyMinLabel and Thirty_MinAggregationPeriod, " 30M ", if Thirty_MinUp then GlobalColor("UP") else if Thirty_MinDown then GlobalColor("DOWN") else Color.White);

## Fifteen_Min Aggregation Period Variables

def Fifteen_MinOpen;
def Fifteen_MinClose;
def Fifteen_MinUp;
def Fifteen_MinDown;
def Fifteen_MinAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Fifteen_Min {
Fifteen_MinOpen = open(period = "15 Min");
Fifteen_MinClose = close(period = "15 Min");
Fifteen_MinUp = if Fifteen_MinClose > Fifteen_MinOpen then 1 else 0;
Fifteen_MinDown = if Fifteen_MinClose < Fifteen_MinOpen then 1 else 0;
Fifteen_MinAggregationPeriod = 1;
}
else {
Fifteen_MinOpen = 0;
Fifteen_MinClose = 0;
Fifteen_MinUp = 0;
Fifteen_MinDown = 0;
Fifteen_MinAggregationPeriod = 0;
}
AddLabel(FifteenMinLabel and Fifteen_MinAggregationPeriod, " 15M ", if Fifteen_MinUp then GlobalColor("UP") else if Fifteen_MinDown then GlobalColor("DOWN") else Color.White);

## Five_Min Aggregation Period Variables

def Five_MinOpen;
def Five_MinClose;
def Five_MinUp;
def Five_MinDown;
def Five_MinAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Five_Min {
Five_MinOpen = open(period = "5 Min");
Five_MinClose = close(period = "5 Min");
Five_MinUp = if Five_MinClose > Five_MinOpen then 1 else 0;
Five_MinDown = if Five_MinClose < Five_MinOpen then 1 else 0;
Five_MinAggregationPeriod = 1;
}
else {
Five_MinOpen = 0;
Five_MinClose = 0;
Five_MinUp = 0;
Five_MinDown = 0;
Five_MinAggregationPeriod = 0;
}
AddLabel(FiveMinLabel and Five_MinAggregationPeriod, " 5M ", if Five_MinUp then GlobalColor("UP") else if Five_MinDown then GlobalColor("DOWN") else Color.White);

## One_Min Aggregation Period Variables

def One_MinOpen;
def One_MinClose;
def One_MinUp;
def One_MinDown;
def One_MinAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.MIN {
One_MinOpen = open(period = "1 Min");
One_MinClose = close(period = "1 Min");
One_MinUp = if One_MinClose > One_MinOpen then 1 else 0;
One_MinDown = if One_MinClose < One_MinOpen then 1 else 0;
One_MinAggregationPeriod = 1;
}
else {
One_MinOpen = 0;
One_MinClose = 0;
One_MinUp = 0;
One_MinDown = 0;
One_MinAggregationPeriod = 0;
}
AddLabel(OneMinLabel and One_MinAggregationPeriod, " 1M ", if One_MinUp then GlobalColor("UP") else if One_MinDown then GlobalColor("DOWN") else Color.White);
 
Needing an alert for Strat candles that are not up or down "2" candles at the close of that candle. Examples are posted below but basically it's when the current candle opens and it's price either goes above or below the high or low of the prior candle, then price goes the other direction past where it's price opened at and then it closes at that price above or below the open price. It creates a candle that has either a green or red base color with the opposite "2" (high/low) color number at the close.
Any help or ideas would really be appreciated

TN1Hmi.png
 
Last edited:
Please assist, I'm downloading the script and not seeing the display shown:

##FTFC (Full-Time-Frame-Continuity) Labels##
# By: Casey Brett
#IMPORTANT: In order for all labels to show up on your chart you MUST do the following 2 things:
#1 - Use a Time Frame less than OR equal to the lowest label (15minute)
#2 - Have at least 30 days of time frame. Ex. 30 days :1 min // 30 Days : 15 minutes // 45 Days : 30 minutes

input MonthLabel = yes;
input WeekLabel = yes;
input FourDayLabel = yes;
input TwoDayLabel = yes;
input DayLabel = yes;
input FourHourLabel = yes;
input TwoHourLabel = yes;
input HourLabel = yes;
input ThirtyMinLabel = yes;
input FifteenMinLabel = yes;
input FiveMinLabel = yes;
input OneMinLabel = yes;

DefineGlobalColor("UP", color.green);
DefineGlobalColor("DOWN", color.red);

## Month Aggregation Period Variables

def MonthOpen;
def MonthClose;
def MonthUp;
def MonthDown;
def MonthAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Month {
MonthOpen = open(period = "Month");
MonthClose = close(period = "Month");
MonthUp = if MonthClose > MonthOpen then 1 else 0;
MonthDown = if MonthClose < MonthOpen then 1 else 0;
MonthAggregationPeriod = 1;
}
else {
MonthOpen = 0;
MonthClose = 0;
MonthUp = 0;
MonthDown = 0;
MonthAggregationPeriod = 0;
}
AddLabel(MonthLabel and MonthAggregationPeriod, " M ", if MonthUp then GlobalColor("UP") else if MonthDown then GlobalColor("DOWN") else Color.White);

## Week Aggregation Period Variables

def WeekOpen;
def WeekClose;
def WeekUp;
def WeekDown;
def WeekAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Week {
WeekOpen = open(period = "Week");
WeekClose = close(period = "Week");
WeekUp = if WeekClose > WeekOpen then 1 else 0;
WeekDown = if WeekClose < WeekOpen then 1 else 0;
WeekAggregationPeriod = 1;
}
else {
WeekOpen = 0;
WeekClose = 0;
WeekUp = 0;
WeekDown = 0;
WeekAggregationPeriod = 0;
}
AddLabel(WeekLabel and WeekAggregationPeriod, " W ", if WeekUp then GlobalColor("UP") else if WeekDown then GlobalColor("DOWN") else Color.White);

## Four_Days Aggregation Period Variables

def Four_DaysOpen;
def Four_DaysClose;
def Four_DaysUp;
def Four_DaysDown;
def Four_DaysAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Four_Days {
Four_DaysOpen = open(period = "4 Days");
Four_DaysClose = close(period = "4 Days");
Four_DaysUp = if Four_DaysClose > Four_DaysOpen then 1 else 0;
Four_DaysDown = if Four_DaysClose < Four_DaysOpen then 1 else 0;
Four_DaysAggregationPeriod = 1;
}
else {
Four_DaysOpen = 0;
Four_DaysClose = 0;
Four_DaysUp = 0;
Four_DaysDown = 0;
Four_DaysAggregationPeriod = 0;
}
AddLabel(FourDayLabel and Four_DaysAggregationPeriod, " 4D ", if Four_DaysUp then GlobalColor("UP") else if Four_DaysDown then GlobalColor("DOWN") else Color.White);

## Two_Days Aggregation Period Variables

def Two_DaysOpen;
def Two_DaysClose;
def Two_DaysUp;
def Two_DaysDown;
def Two_DaysAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Two_Days {
Two_DaysOpen = open(period = "2 Days");
Two_DaysClose = close(period = "2 Days");
Two_DaysUp = if Two_DaysClose > Two_DaysOpen then 1 else 0;
Two_DaysDown = if Two_DaysClose < Two_DaysOpen then 1 else 0;
Two_DaysAggregationPeriod = 1;
}
else {
Two_DaysOpen = 0;
Two_DaysClose = 0;
Two_DaysUp = 0;
Two_DaysDown = 0;
Two_DaysAggregationPeriod = 0;
}
AddLabel(TwoDayLabel and Two_DaysAggregationPeriod, " 2D ", if Two_DaysUp then GlobalColor("UP") else if Two_DaysDown then GlobalColor("DOWN") else Color.White);


## Day Aggregation Period Variables

def DayOpen;
def DayClose;
def DayUp;
def DayDown;
def DayAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Day {
DayOpen = open(period = "Day");
DayClose = close(period = "Day");
DayUp = if DayClose > DayOpen then 1 else 0;
DayDown = if DayClose < DayOpen then 1 else 0;
DayAggregationPeriod = 1;
}
else {
DayOpen = 0;
DayClose = 0;
DayUp = 0;
DayDown = 0;
DayAggregationPeriod = 0;
}
AddLabel(DayLabel and DayAggregationPeriod, " D ", if DayUp then GlobalColor("UP") else if DayDown then GlobalColor("DOWN") else Color.White);

## four_hours Aggregation Period Variables

def four_hoursOpen;
def four_hoursClose;
def four_hoursUp;
def four_hoursDown;
def four_hoursAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.four_hours {
four_hoursOpen = open(period = "4 hours");
four_hoursClose = close(period = "4 hours");
four_hoursUp = if four_hoursClose > four_hoursOpen then 1 else 0;
four_hoursDown = if four_hoursClose < four_hoursOpen then 1 else 0;
four_hoursAggregationPeriod = 1;
}
else {
four_hoursOpen = 0;
four_hoursClose = 0;
four_hoursUp = 0;
four_hoursDown = 0;
four_hoursAggregationPeriod = 0;
}
AddLabel(FourHourLabel and four_hoursAggregationPeriod, " 4H ", if four_hoursUp then GlobalColor("UP") else if four_hoursDown then GlobalColor("DOWN") else Color.White);

## Two_Hours Aggregation Period Variables

def Two_HoursOpen;
def Two_HoursClose;
def Two_HoursUp;
def Two_HoursDown;
def Two_HoursAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Two_Hours {
Two_HoursOpen = open(period = "2 Hours");
Two_HoursClose = close(period = "2 Hours");
Two_HoursUp = if Two_HoursClose > Two_HoursOpen then 1 else 0;
Two_HoursDown = if Two_HoursClose < Two_HoursOpen then 1 else 0;
Two_HoursAggregationPeriod = 1;
}
else {
Two_HoursOpen = 0;
Two_HoursClose = 0;
Two_HoursUp = 0;
Two_HoursDown = 0;
Two_HoursAggregationPeriod = 0;
}
AddLabel(TwoHourLabel and Two_HoursAggregationPeriod, " 2H ", if Two_HoursUp then GlobalColor("UP") else if Two_HoursDown then GlobalColor("DOWN") else Color.White);


## Hour Aggregation Period Variables

def HourOpen;
def HourClose;
def HourUp;
def HourDown;
def HourAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Hour {
HourOpen = open(period = "1 Hour");
HourClose = close(period = "1 Hour");
HourUp = if HourClose > HourOpen then 1 else 0;
HourDown = if HourClose < HourOpen then 1 else 0;
HourAggregationPeriod = 1;
}
else {
HourOpen = 0;
HourClose = 0;
HourUp = 0;
HourDown = 0;
HourAggregationPeriod = 0;
}
AddLabel(HourLabel and HourAggregationPeriod, " H ", if HourUp then GlobalColor("UP") else if HourDown then GlobalColor("DOWN") else Color.White);








## Thirty_Min Aggregation Period Variables

def Thirty_MinOpen;
def Thirty_MinClose;
def Thirty_MinUp;
def Thirty_MinDown;
def Thirty_MinAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Thirty_Min {
Thirty_MinOpen = open(period = "30 Min");
Thirty_MinClose = close(period = "30 Min");
Thirty_MinUp = if Thirty_MinClose > Thirty_MinOpen then 1 else 0;
Thirty_MinDown = if Thirty_MinClose < Thirty_MinOpen then 1 else 0;
Thirty_MinAggregationPeriod = 1;
}
else {
Thirty_MinOpen = 0;
Thirty_MinClose = 0;
Thirty_MinUp = 0;
Thirty_MinDown = 0;
Thirty_MinAggregationPeriod = 0;
}
AddLabel(ThirtyMinLabel and Thirty_MinAggregationPeriod, " 30M ", if Thirty_MinUp then GlobalColor("UP") else if Thirty_MinDown then GlobalColor("DOWN") else Color.White);

## Fifteen_Min Aggregation Period Variables

def Fifteen_MinOpen;
def Fifteen_MinClose;
def Fifteen_MinUp;
def Fifteen_MinDown;
def Fifteen_MinAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Fifteen_Min {
Fifteen_MinOpen = open(period = "15 Min");
Fifteen_MinClose = close(period = "15 Min");
Fifteen_MinUp = if Fifteen_MinClose > Fifteen_MinOpen then 1 else 0;
Fifteen_MinDown = if Fifteen_MinClose < Fifteen_MinOpen then 1 else 0;
Fifteen_MinAggregationPeriod = 1;
}
else {
Fifteen_MinOpen = 0;
Fifteen_MinClose = 0;
Fifteen_MinUp = 0;
Fifteen_MinDown = 0;
Fifteen_MinAggregationPeriod = 0;
}
AddLabel(FifteenMinLabel and Fifteen_MinAggregationPeriod, " 15M ", if Fifteen_MinUp then GlobalColor("UP") else if Fifteen_MinDown then GlobalColor("DOWN") else Color.White);

## Five_Min Aggregation Period Variables

def Five_MinOpen;
def Five_MinClose;
def Five_MinUp;
def Five_MinDown;
def Five_MinAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Five_Min {
Five_MinOpen = open(period = "5 Min");
Five_MinClose = close(period = "5 Min");
Five_MinUp = if Five_MinClose > Five_MinOpen then 1 else 0;
Five_MinDown = if Five_MinClose < Five_MinOpen then 1 else 0;
Five_MinAggregationPeriod = 1;
}
else {
Five_MinOpen = 0;
Five_MinClose = 0;
Five_MinUp = 0;
Five_MinDown = 0;
Five_MinAggregationPeriod = 0;
}
AddLabel(FiveMinLabel and Five_MinAggregationPeriod, " 5M ", if Five_MinUp then GlobalColor("UP") else if Five_MinDown then GlobalColor("DOWN") else Color.White);

## One_Min Aggregation Period Variables

def One_MinOpen;
def One_MinClose;
def One_MinUp;
def One_MinDown;
def One_MinAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.MIN {
One_MinOpen = open(period = "1 Min");
One_MinClose = close(period = "1 Min");
One_MinUp = if One_MinClose > One_MinOpen then 1 else 0;
One_MinDown = if One_MinClose < One_MinOpen then 1 else 0;
One_MinAggregationPeriod = 1;
}
else {
One_MinOpen = 0;
One_MinClose = 0;
One_MinUp = 0;
One_MinDown = 0;
One_MinAggregationPeriod = 0;
}
AddLabel(OneMinLabel and One_MinAggregationPeriod, " 1M ", if One_MinUp then GlobalColor("UP") else if One_MinDown then GlobalColor("DOWN") else Color.White);
 
Please assist, I'm downloading the script and not seeing the display shown:

##FTFC (Full-Time-Frame-Continuity) Labels##
# By: Casey Brett
#IMPORTANT: In order for all labels to show up on your chart you MUST do the following 2 things:
#1 - Use a Time Frame less than OR equal to the lowest label (15minute)
#2 - Have at least 30 days of time frame. Ex. 30 days :1 min // 30 Days : 15 minutes // 45 Days : 30 minutes

input MonthLabel = yes;
input WeekLabel = yes;
input FourDayLabel = yes;
input TwoDayLabel = yes;
input DayLabel = yes;
input FourHourLabel = yes;
input TwoHourLabel = yes;
input HourLabel = yes;
input ThirtyMinLabel = yes;
input FifteenMinLabel = yes;
input FiveMinLabel = yes;
input OneMinLabel = yes;

DefineGlobalColor("UP", color.green);
DefineGlobalColor("DOWN", color.red);

## Month Aggregation Period Variables

def MonthOpen;
def MonthClose;
def MonthUp;
def MonthDown;
def MonthAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Month {
MonthOpen = open(period = "Month");
MonthClose = close(period = "Month");
MonthUp = if MonthClose > MonthOpen then 1 else 0;
MonthDown = if MonthClose < MonthOpen then 1 else 0;
MonthAggregationPeriod = 1;
}
else {
MonthOpen = 0;
MonthClose = 0;
MonthUp = 0;
MonthDown = 0;
MonthAggregationPeriod = 0;
}
AddLabel(MonthLabel and MonthAggregationPeriod, " M ", if MonthUp then GlobalColor("UP") else if MonthDown then GlobalColor("DOWN") else Color.White);

## Week Aggregation Period Variables

def WeekOpen;
def WeekClose;
def WeekUp;
def WeekDown;
def WeekAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Week {
WeekOpen = open(period = "Week");
WeekClose = close(period = "Week");
WeekUp = if WeekClose > WeekOpen then 1 else 0;
WeekDown = if WeekClose < WeekOpen then 1 else 0;
WeekAggregationPeriod = 1;
}
else {
WeekOpen = 0;
WeekClose = 0;
WeekUp = 0;
WeekDown = 0;
WeekAggregationPeriod = 0;
}
AddLabel(WeekLabel and WeekAggregationPeriod, " W ", if WeekUp then GlobalColor("UP") else if WeekDown then GlobalColor("DOWN") else Color.White);

## Four_Days Aggregation Period Variables

def Four_DaysOpen;
def Four_DaysClose;
def Four_DaysUp;
def Four_DaysDown;
def Four_DaysAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Four_Days {
Four_DaysOpen = open(period = "4 Days");
Four_DaysClose = close(period = "4 Days");
Four_DaysUp = if Four_DaysClose > Four_DaysOpen then 1 else 0;
Four_DaysDown = if Four_DaysClose < Four_DaysOpen then 1 else 0;
Four_DaysAggregationPeriod = 1;
}
else {
Four_DaysOpen = 0;
Four_DaysClose = 0;
Four_DaysUp = 0;
Four_DaysDown = 0;
Four_DaysAggregationPeriod = 0;
}
AddLabel(FourDayLabel and Four_DaysAggregationPeriod, " 4D ", if Four_DaysUp then GlobalColor("UP") else if Four_DaysDown then GlobalColor("DOWN") else Color.White);

## Two_Days Aggregation Period Variables

def Two_DaysOpen;
def Two_DaysClose;
def Two_DaysUp;
def Two_DaysDown;
def Two_DaysAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Two_Days {
Two_DaysOpen = open(period = "2 Days");
Two_DaysClose = close(period = "2 Days");
Two_DaysUp = if Two_DaysClose > Two_DaysOpen then 1 else 0;
Two_DaysDown = if Two_DaysClose < Two_DaysOpen then 1 else 0;
Two_DaysAggregationPeriod = 1;
}
else {
Two_DaysOpen = 0;
Two_DaysClose = 0;
Two_DaysUp = 0;
Two_DaysDown = 0;
Two_DaysAggregationPeriod = 0;
}
AddLabel(TwoDayLabel and Two_DaysAggregationPeriod, " 2D ", if Two_DaysUp then GlobalColor("UP") else if Two_DaysDown then GlobalColor("DOWN") else Color.White);


## Day Aggregation Period Variables

def DayOpen;
def DayClose;
def DayUp;
def DayDown;
def DayAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Day {
DayOpen = open(period = "Day");
DayClose = close(period = "Day");
DayUp = if DayClose > DayOpen then 1 else 0;
DayDown = if DayClose < DayOpen then 1 else 0;
DayAggregationPeriod = 1;
}
else {
DayOpen = 0;
DayClose = 0;
DayUp = 0;
DayDown = 0;
DayAggregationPeriod = 0;
}
AddLabel(DayLabel and DayAggregationPeriod, " D ", if DayUp then GlobalColor("UP") else if DayDown then GlobalColor("DOWN") else Color.White);

## four_hours Aggregation Period Variables

def four_hoursOpen;
def four_hoursClose;
def four_hoursUp;
def four_hoursDown;
def four_hoursAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.four_hours {
four_hoursOpen = open(period = "4 hours");
four_hoursClose = close(period = "4 hours");
four_hoursUp = if four_hoursClose > four_hoursOpen then 1 else 0;
four_hoursDown = if four_hoursClose < four_hoursOpen then 1 else 0;
four_hoursAggregationPeriod = 1;
}
else {
four_hoursOpen = 0;
four_hoursClose = 0;
four_hoursUp = 0;
four_hoursDown = 0;
four_hoursAggregationPeriod = 0;
}
AddLabel(FourHourLabel and four_hoursAggregationPeriod, " 4H ", if four_hoursUp then GlobalColor("UP") else if four_hoursDown then GlobalColor("DOWN") else Color.White);

## Two_Hours Aggregation Period Variables

def Two_HoursOpen;
def Two_HoursClose;
def Two_HoursUp;
def Two_HoursDown;
def Two_HoursAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Two_Hours {
Two_HoursOpen = open(period = "2 Hours");
Two_HoursClose = close(period = "2 Hours");
Two_HoursUp = if Two_HoursClose > Two_HoursOpen then 1 else 0;
Two_HoursDown = if Two_HoursClose < Two_HoursOpen then 1 else 0;
Two_HoursAggregationPeriod = 1;
}
else {
Two_HoursOpen = 0;
Two_HoursClose = 0;
Two_HoursUp = 0;
Two_HoursDown = 0;
Two_HoursAggregationPeriod = 0;
}
AddLabel(TwoHourLabel and Two_HoursAggregationPeriod, " 2H ", if Two_HoursUp then GlobalColor("UP") else if Two_HoursDown then GlobalColor("DOWN") else Color.White);


## Hour Aggregation Period Variables

def HourOpen;
def HourClose;
def HourUp;
def HourDown;
def HourAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Hour {
HourOpen = open(period = "1 Hour");
HourClose = close(period = "1 Hour");
HourUp = if HourClose > HourOpen then 1 else 0;
HourDown = if HourClose < HourOpen then 1 else 0;
HourAggregationPeriod = 1;
}
else {
HourOpen = 0;
HourClose = 0;
HourUp = 0;
HourDown = 0;
HourAggregationPeriod = 0;
}
AddLabel(HourLabel and HourAggregationPeriod, " H ", if HourUp then GlobalColor("UP") else if HourDown then GlobalColor("DOWN") else Color.White);








## Thirty_Min Aggregation Period Variables

def Thirty_MinOpen;
def Thirty_MinClose;
def Thirty_MinUp;
def Thirty_MinDown;
def Thirty_MinAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Thirty_Min {
Thirty_MinOpen = open(period = "30 Min");
Thirty_MinClose = close(period = "30 Min");
Thirty_MinUp = if Thirty_MinClose > Thirty_MinOpen then 1 else 0;
Thirty_MinDown = if Thirty_MinClose < Thirty_MinOpen then 1 else 0;
Thirty_MinAggregationPeriod = 1;
}
else {
Thirty_MinOpen = 0;
Thirty_MinClose = 0;
Thirty_MinUp = 0;
Thirty_MinDown = 0;
Thirty_MinAggregationPeriod = 0;
}
AddLabel(ThirtyMinLabel and Thirty_MinAggregationPeriod, " 30M ", if Thirty_MinUp then GlobalColor("UP") else if Thirty_MinDown then GlobalColor("DOWN") else Color.White);

## Fifteen_Min Aggregation Period Variables

def Fifteen_MinOpen;
def Fifteen_MinClose;
def Fifteen_MinUp;
def Fifteen_MinDown;
def Fifteen_MinAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Fifteen_Min {
Fifteen_MinOpen = open(period = "15 Min");
Fifteen_MinClose = close(period = "15 Min");
Fifteen_MinUp = if Fifteen_MinClose > Fifteen_MinOpen then 1 else 0;
Fifteen_MinDown = if Fifteen_MinClose < Fifteen_MinOpen then 1 else 0;
Fifteen_MinAggregationPeriod = 1;
}
else {
Fifteen_MinOpen = 0;
Fifteen_MinClose = 0;
Fifteen_MinUp = 0;
Fifteen_MinDown = 0;
Fifteen_MinAggregationPeriod = 0;
}
AddLabel(FifteenMinLabel and Fifteen_MinAggregationPeriod, " 15M ", if Fifteen_MinUp then GlobalColor("UP") else if Fifteen_MinDown then GlobalColor("DOWN") else Color.White);

## Five_Min Aggregation Period Variables

def Five_MinOpen;
def Five_MinClose;
def Five_MinUp;
def Five_MinDown;
def Five_MinAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.Five_Min {
Five_MinOpen = open(period = "5 Min");
Five_MinClose = close(period = "5 Min");
Five_MinUp = if Five_MinClose > Five_MinOpen then 1 else 0;
Five_MinDown = if Five_MinClose < Five_MinOpen then 1 else 0;
Five_MinAggregationPeriod = 1;
}
else {
Five_MinOpen = 0;
Five_MinClose = 0;
Five_MinUp = 0;
Five_MinDown = 0;
Five_MinAggregationPeriod = 0;
}
AddLabel(FiveMinLabel and Five_MinAggregationPeriod, " 5M ", if Five_MinUp then GlobalColor("UP") else if Five_MinDown then GlobalColor("DOWN") else Color.White);

## One_Min Aggregation Period Variables

def One_MinOpen;
def One_MinClose;
def One_MinUp;
def One_MinDown;
def One_MinAggregationPeriod;
if getAggregationPeriod() <= AggregationPeriod.MIN {
One_MinOpen = open(period = "1 Min");
One_MinClose = close(period = "1 Min");
One_MinUp = if One_MinClose > One_MinOpen then 1 else 0;
One_MinDown = if One_MinClose < One_MinOpen then 1 else 0;
One_MinAggregationPeriod = 1;
}
else {
One_MinOpen = 0;
One_MinClose = 0;
One_MinUp = 0;
One_MinDown = 0;
One_MinAggregationPeriod = 0;
}
AddLabel(OneMinLabel and One_MinAggregationPeriod, " 1M ", if One_MinUp then GlobalColor("UP") else if One_MinDown then GlobalColor("DOWN") else Color.Whi);
Not sure what your asking here but if your not seeing the time frame labels try a different time setting for your chart. Example would be if you had a Daily, Week, and Month labels listed viewing a chart with a weekly time frame setting would not show the Daily label and so on.
 
Not sure what your asking here but if your not seeing the time frame labels try a different time setting for your chart. Example would be if you had a Daily, Week, and Month labels listed viewing a chart with a weekly time frame setting would not show the Daily label and so on.
I think I'm looking for the STRAT (1,2,3) sequence numbers that are displayed under the candle sticks as a chart view indicator you have. Is there another script for that? When I download the current script I get a different output in display
 

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
147 Online
Create Post

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