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

@tjlizwelicha It's tough to debug without having the actual code that you are working with... Have you looked at the bottom where the errors are listed...??? From what little of the code I'm seeing, there doesn't appear to be closing quotes around your color names... Every line from line 92, which as the first line we can see, only has opening quotes but no closing quotes... Beyond that it's hard to say without posting your actual code here... Use the </> icon to encapsulate your script code...
 
@tjlizwelicha It's tough to debug without having the actual code that you are working with... Have you looked at the bottom where the errors are listed...??? From what little of the code I'm seeing, there doesn't appear to be closing quotes around your color names... Every line from line 92, which as the first line we can see, only has opening quotes but no closing quotes... Beyond that it's hard to say without posting your actual code here... Use the </> icon to encapsulate your script code...


I hope this helps. If not just tell me what I need to do. LOL

On page 1 of Rob Smith's The Strat Indicators


This is the code for the Strat Intraday Label Reverse


Code:
# -----------------------------------
# S T R A T L A B E L S w/REVERSALS
# A STUDY BY RAMON DV AKA PELONSAX
# -----------------------------------
declare upper;
#------------------------------------
# ASSIGN COLORS
#------------------------------------
DefineGlobalColor("3U”, CreateColor(002, 092, 000));
DefineGlobalColor("2U”, CreateColor(002, 255, 000));
DefineGlobalColor("1U”, CreateColor(000, 255, 121));
DefineGlobalColor("3D”, CreateColor(138, 000, 020));
DefineGlobalColor("2D”, CreateColor(255, 000, 030));
DefineGlobalColor("1D”, CreateColor(255, 166, 161));

# -----------------------------------
# Minute Label
# -----------------------------------
def min = AggregationPeriod.MIN;
def Vminute = GetAggregationPeriod() <= AggregationPeriod.MIN;
def minuteO;
def minuteC;
def minuteH;


Also on Page 1 of Rob Smith's The Strat Indicator under Actionable Signals

#-------------------------------------------------------------
#
# S T R A T R E V E R S A L S
#
# A N D
#
# A C T I O N A B L E S I G N A L S
#
# R E M I X
#
# A study by Ramon DV. aka Pelonsax
#
# Version 1.0 8/01/20
#
# Lost track of what version this is. 4-1-21
# Fixed Kickage issue, and measured move componenent
#
#-------------------------------------------------------------

declare upper;

#------------------------------------
# INPUTS
#------------------------------------

input Show_Strat_Numbers = yes;
input Show_Twos = yes;
input Show_Legend = yes;
input Alert_Actionable_Signals = yes;
input Alert_Reversals = yes;
input Paint_Candles = yes;

#------------------------------------
# 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 insidebarup = insidebar and O < C;
def twoup = H > H[1] and L >= L[1];
def outsidebarup = outsidebar and O < C;
def insidebardown = insidebar and O > C;
def twodown = H <= H[1] and L < L[1];
def outsidebardown = outsidebar and O > C;

#------------------------------------
# DEFINE REVERSALS (Basic four plus RevStrat)
#------------------------------------

# Bullish
def TwoOneTwoBull = twoup and insidebar[1] and twodown[2];

def TwoTwoBull = twoup and twodown[1];

def ThreeBull = outsidebarup and (twodown[1] or insidebar[1] or outsidebardown[1]);

def ThreeOneTwoBull = twoup and insidebar[1] and outsidebardown[2];

def RevStratBull = (twoup and twodown[1] and insidebar[2]) or (outsidebarup and insidebar[1]);

def BullRev = TwoOneTwoBull or TwoTwoBull or ThreeBull or ThreeOneTwoBull or RevStratBull;

# Bearish
def TwoOneTwoBear = twodown and insidebar[1] and twoup[2];

def TwoTwoBear = twodown and twoup[1];

def ThreeBear = outsidebardown and (twoup[1] or insidebar[1] or outsidebarup[1]);

def ThreeOneTwoBear = twodown and insidebar[1] and outsidebarup[2];

def RevStratBear = (twodown and twoup[1] and insidebar[2]) or (outsidebardown and insidebar[1]);

def BearRev = TwoOneTwoBear or TwoTwoBear or ThreeBear or ThreeOneTwoBear or RevStratBear;

#------------------------------------
# STRAT NUMBERS
#------------------------------------

plot barType = if Show_Strat_Numbers and insidebar then 1 else if Show_Strat_Numbers and outsidebar then 3 else if !insidebar and !outsidebar and Show_Twos then 2 else Double.NaN;
barType.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);

#------------------------------------
# CANDLE COLORS
#------------------------------------
DefineGlobalColor("3U”, CreateColor(002, 092, 000));
DefineGlobalColor("2U”, CreateColor(002, 255, 000));
DefineGlobalColor("1U”, CreateColor(000, 255, 121));
DefineGlobalColor("3D”, CreateColor(138, 000, 020));
DefineGlobalColor("2D”, CreateColor(255, 000, 030));
DefineGlobalColor("1D”, CreateColor(255, 166, 161));

AssignPriceColor(if Paint_Candles and BullRev then Color.CYAN else if Paint_Candles and BearRev then Color.MAGENTA else if

Paint_Candles and
!BullRev and
!BearRev and
twoup then GlobalColor("2U”) else if

Paint_Candles and
!BullRev and
!BearRev and
twodown then GlobalColor("2D”) else if

Paint_Candles and
!BullRev and
!BearRev and
outsidebarup then GlobalColor("3U”) else if

Paint_Candles and
!BullRev and
!BearRev and
insidebarup then GlobalColor("1U”) else if

Paint_Candles and
!BullRev and
!BearRev and
outsidebardown then GlobalColor("3D”) else if

Paint_Candles and
!BullRev and
!BearRev and
insidebardown then GlobalColor("1D”) else if

Paint_Candles and
!BullRev and
!BearRev and
!insidebarup and
!insidebardown and
insidebar then Color.WHITE else if

Paint_Candles and
!BullRev and
!BearRev and
!outsidebardown and
!outsidebarup and
outsidebar then Color.WHITE else Color.CURRENT);

#------------------------------------
# COLOR LEGEND
#------------------------------------

# Red Green
AddLabel(if Show_Legend then yes else no, "Color Coding: ", Color.LIGHT_GRAY);
AddLabel(if Show_Legend then yes else no, “Two Up”, GlobalColor("2U”));
AddLabel(if Show_Legend then yes else no, “Inside Bar Up”, GlobalColor("1U”));
AddLabel(if Show_Legend then yes else no, “Outside Bar Up”, GlobalColor("3U”));
AddLabel(if Show_Legend then yes else no, “Two Down”, GlobalColor("2D”));
AddLabel(if Show_Legend then yes else no, “Inside Bar down”, GlobalColor("1D”));
AddLabel(if Show_Legend then yes else no, “Outside Bar Down”, GlobalColor("3D”));
AddLabel(if Show_Legend then yes else no, “Reversal Up”, Color.CYAN);
AddLabel(if Show_Legend then yes else no, “Reversal Down”, Color.MAGENTA);

# HAMMER

input Hammer_length = 30;
input Hammer_trendSetup = 3;
input Hammer_bodyFactor = 0.3;
input Hammer_shadowFactor = 2.0;

Assert(Hammer_bodyFactor >= 0, "'body factor' must not be negative: " + Hammer_bodyFactor);
Assert(Hammer_shadowFactor >= 0, "'shadow factor' must not be negative: " + Hammer_shadowFactor);

def Hammer_BodyHeight = BodyHeight();
def Hammer_AverageBodyHeight = Average(Hammer_BodyHeight, Hammer_length);
def Hammer_ErrMargin = 0.25 * Hammer_AverageBodyHeight;
def Hammer_IsShort = Hammer_BodyHeight <= Hammer_bodyFactor * Hammer_AverageBodyHeight;

def Hammer = IsDescending(C, Hammer_trendSetup)[1] and

Hammer_IsShort and
H - Max(O, C) <= Hammer_ErrMargin and
Min(O, C) - L > Hammer_shadowFactor * Hammer_BodyHeight;

# SHOOTER

input Star_length = 30;
input Star_trendSetup = 3;
input Star_bodyFactor = 0.3;
input Star_shadowFactor = 2.0;

Assert(Star_bodyFactor >= 0, "'body factor' must not be negative: " + Star_bodyFactor);
Assert(Star_shadowFactor >= 0, "'shadow factor' must not be negative: " + Star_shadowFactor);

def Star_BodyHeight = BodyHeight();
def Star_AverageBodyHeight = Average(Star_BodyHeight, Star_length);
def Star_ErrMargin = 0.25 * Star_AverageBodyHeight;
def Star_IsShort = Star_BodyHeight <= Star_bodyFactor * Star_AverageBodyHeight;

def ShootingStar = IsAscending(C, Star_trendSetup)[1] and

Star_IsShort and
Min(O, C) - L <= Star_ErrMargin and
H - Max(O, C) > Star_shadowFactor * Star_BodyHeight;

# -------------------------
# ACTIONABLE SIGNALS
# -------------------------

def InsideUp = insidebar[1] and C crosses above H[1] and C > H[1];
def InsideDown = insidebar[1] and C crosses below L[1] and C < L[1];
def KickingBull = O >= H[1] and C > O and C[1] < O[1];
def KickingBear = O <= L[1] and C < O and C[1] > O[1];
def HammerRev = Hammer[1] and C crosses above H[1] and C > H[1];
def ShooterRev = ShootingStar[1] and C crosses below L[1] and C < L[1];


def MomoStar = IsDescending(C, Star_trendSetup)[2] and

Star_IsShort[1] and
Min(O[1], C[1]) - L[1] <= Star_ErrMargin and
H[1] - Max(O[1], C[1]) > Star_shadowFactor * Star_BodyHeight and

C crosses below L[1] and C < L[1];

def MomoHammer = IsAscending(C, Hammer_trendSetup)[2] and

Hammer_IsShort[1] and
H[1] - Max(O[1], C[1]) <= Hammer_ErrMargin and
Min(O[1], C[1]) - L[1] > Hammer_shadowFactor * Hammer_BodyHeight and

C crosses above H[1] and C > H[1];

input RangeAVG = AverageType.SIMPLE;
input RangeLength = 13;
input MeasuredMove_Sensitivity = 50;
def MMS = MeasuredMove_Sensitivity / 100;
def ATR = MovingAverage(RangeAVG, TrueRange(H, C, L), RangeLength);
def topH = (ATR[1] / 2) + L[1];
def Now = L >= topH;

def MeasuredUp = (TrueRange(H[2], C[2], L[2]) > (MMS * ATR)) and topH and Now and insidebar[1] and C crosses above H[1];

def MeasuredDown = (TrueRange(H[2], C[2], L[2]) > (MMS * ATR)) and topH and Now and insidebar[1] and C crosses below L[1];

def ActionableUp = InsideUp or KickingBull or RevStratBull or HammerRev or MomoHammer or MeasuredUp;

def ActionableDown = InsideDown or KickingBear or RevStratBear or ShooterRev or MomoStar or MeasuredDown;

# -------------------------
# SIGNAL ALERTS
# -------------------------

AddLabel(ActionableUp or ActionableDown, ("ACTIONABLE: " + if InsideUp then ”Inside Up” else if KickingBull then ”Kicking Bull” else if RevStratBull then “Rev Strat Bull” else if HammerRev then ”Hammer Rev” else if MomoHammer then ”Momentum Hammer” else if MeasuredUp then “Measured Move Up” else if InsideDown then “Inside Down” else if KickingBear then “Kicking Bear” else if RevStratBear then “Rev Strat Bear” else if ShooterRev then "Shooter Rev" else if MomoStar then "Momentum Star" else if MeasuredDown then " Measured Move Down" else ""), if ActionableUp then Color.CYAN else if ActionableDown then Color.MAGENTA else Color.BLACK);

Alert(Alert_Actionable_Signals and (ActionableUp or Actionabledown), ("ACTIONABLE: " + if InsideUp then ”Inside Up” else if KickingBull then ”Kicking Bull” else if RevStratBull then “Rev Strat Bull” else if HammerRev then ”Hammer Rev” else if MomoHammer then ”Momentum Hammer” else if MeasuredUp then “Measured Move Up” else if InsideDown then “Inside Down” else if KickingBear then “Kicking Bear” else if RevStratBear then “Rev Strat Bear” else if ShooterRev then "Shooter Rev" else if MomoStar then "Momentum Star" else if MeasuredDown then " Measured Move Down" else ""), Alert.BAR, Sound.ring);

Alert(Alert_Reversals and BullRev, ("Bull Reversal: " + if TwoOneTwoBull then "2D-1-2U" else if TwoTwoBull then "2D-2U" else if ThreeBull then "3U" else if ThreeOneTwoBull then "3-1-2U" else if RevStratBull then "Rev Strat Up" else ""), Alert.BAR, Sound.Bell);

Alert(Alert_Reversals and BearRev, ("Bear Reversal: " + if TwoOneTwoBear then "2U-1-2D" else if TwoTwoBear then "2U-2D" else if ThreeBear then "3D" else if ThreeOneTwoBear then "3-1-2D" else if RevStratBear then "Rev Strat Down" else ""), Alert.BAR, Sound.Bell);
 
Hey Pelonsax,

Thanks so much for all your shared work! On your MTF Open Price study, I have a line always plotting at 0. I'm not great at coding. Is there a way to remove this? It makes this study unusable as I have so much adjusting of the chart to do to see prices.
 
I'm a little confused at what is the optimal setup that people look for in terms of the numbered bars? Can someone please share their favs? @skychemist5 and if there is an easier way to simply setup buy/sell arrows on the chart instead of manually having to figure out the numbered candles? Thanks
 
Tried the strat but not for me, hope someone is able to make some real money with this. Like someone said too much hindsight. All the stuff I see and read out there is “after the fact”. I did learn a lot like using MTF analysis which I am able to take away and broadening formations happen everywhere.
 
Hi Pelonsax ,I enjoy your passion with your projects and thought process ,how you guys figure all code out amazes me ,,I need a little help if you have time ,I have been backtesting john carters TTM squeeze and get the whole firing process ,,I would like to add another column to my TOS watchlist ,,column would be green whenever close price closes above ATR 3 on keltner channel on daily chart and turn red when price closes below minus ATR 3 , my backrest results after price on daily chart exceeds ATR 3 then next day its starts to revert towards the 21 day ema ,,put would be bought for 2 to 7 day move,,conversely bottom up move would be a call play. Any help would be appreciated
 
Last edited:
Excellent work and thank you for all of this! I was playing with watch list columns and saw the 1st titled Strat FTC didn't match up so I basically combined the 2 to show color codes with price. This plots more to my thinking as I want FTFC across the board as the individual frames will take care of themselves. Anyway it works for my brain. It loaded 50-70 symbols pretty quick (weekend), S&P 100 it started bogging down.

WATCH-LIST-FTC.jpg


Code:
#------------------------------------
#
#        M T F      S T R A T
#         W A T C H L I S T
# a Study by Ramon DV. aka Pelonsax
#
#------------------------------------
#------------------------------------
# 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
#
#------------------------------------
plot O = open;
def H = high;
def L = low;

def C = close;
#------------------------------------
# DEFINE SCENARIOS
#------------------------------------
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 insidebarup  = insidebar and O < C;
def twoup  = H > H[1] and L >= L[1];
def outsidebarup  = outsidebar and O < C;
def insidebardown  = insidebar and O > C;
def twodown  = H <= H[1] and L < L[1];
def outsidebardown  = outsidebar and O > C;
#------------------------------------
# LABEL SECTION
#------------------------------------

AssignBackgroundColor(
if
twoup then Color.GREEN else if
twodown then Color.RED else if
outsidebarup then Color.DARK_GREEN else if
insidebarup then Color.LIGHT_GREEN else if
outsidebardown then Color.DARK_RED else if
insidebardown then Color.ORANGE else if
!insidebarup and
!insidebardown and
insidebar then Color.WHITE else if
!outsidebardown and
!outsidebarup and
outsidebar then Color.YELLOW else Color.CURRENT);
addlabel(yes, O, color.black);
I put this in the top post with the latest update. Thanks again Bob! Sorry it took so long!
 
@Pelonsax - what a dedication work you put into this. So many hours, days of work you put into this. Appreciate so much of all you do.
Apologize if I am asking redundant questions and answers may have been posted before.
Please let me know my comments below are correct?
Candle with label of 1 below looks to be inside bar.
Candle with label of 2 means it take out only 1 side of previous bar (this can be either take out the high or the low but not both).
Candle with label of 3 means it is outside bar (which take out the high and the low of previous bar.

My last question is regarding to the watchlist that shows different time frame with output as example below.
I think you are looking at the last 3bars the one with the bracket is current bar.
2D-2D-[2D] 2D means take out the low of previous bar, in this case you have 3 consecutive down bar taking out the low?
2U-2U-[2U] 2U means take out the high of previuous bar, in this case you have 3 consecutive up bar taking out the high?
3U-2U-[1D] 3U means outside bar take out high and low on previous bar, then 2U means it take out the high of 1st bar 3U, and 1D means it's inside bar that take out the low of bar that has 2U?

Thank you in advance and look forward for your responses? If there's any additional reading that you have, please let me know! Appreciate all the work you put in and sharing all to us!!!
Best regards,
mdtn


Here's what how they appear:
JXfTMz6.png
 
In order to keep the post clean, updates are now found at the very bottom of the thread
NEWEST: 05/21/21

A SUITE OF PRODUCTS BY PELONSAX AKA RAMON DV FOR USE WITH: ROB SMITH’S THE STRAT

I am writing these to help myself learn The STRAT because I am a visual learner. And I am sharing them because many generous people have shared their time and expertise with me along my journey and we can do more when we work together.

But before we get to all of that, here is a link to a really great video that Rob just recorded for Benzinga where he gives a GREAT introduction to The STRAT. It is NOT recommended that you use any of my indicators for trading with live money until you've had the chance to gain a real understanding of how The STRAT works and given yourself ample opportunity to practice on paper.

Here's the video: https://benzinga.wistia.com/medias/zoi6e794v3?fbclid=IwAR06RBtG0bimZcgyDuryjd12K7BdbDPCdkrE-O0k3hcT7JvMsk889v8qv3c

Keep in mind that I am not the creator of The STRAT. I am a disciple who has been creating these TOS studies along the way in my journey to learn this system and be able to visualize how it works. For more information on the STRAT, and to really learn how to use it to trade effectively with or without any of my studies, please visit Rob on Ticker Tocker!!

https://www.tickertocker.com/?fbclid=IwAR1ZDPKpTX2WzOrnOFqFuMOw5Wx_u4eTZoxco8-yZeBIObQJHQsYmZAakQU

!!!VERY IMPORTANT!!!! THERE ARE NO BUY AND SELL SIGNALS.!!!
The decision to buy or sell MUST BE predicated upon a deeper understanding of this system and any other tools at your disposal. As a matter of fact this study only considers the four basic reversals. You can turn both the arrows and the bubbles off in the settings so they don't clutter your chart.

Lastly, I would like to point out that this is an active thread that is constantly evolving as I continue to improve and add to these studies. If you have questions or comments about them I just ask, as I noted above, that you first make sure you are referring to the most recent version of a particular study and that you be very specific using screenshots in any such comments.

For those of you from Twitter who are just here for the bare essentials, here are two very basic studies:

STRAT BAR NUMBERS 2.0

https://tos.mx/Kac4tLf
3PfcCmA.jpg


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);

STRAT BAR CANDLES PAINT ON ONES AND THREES WITH NUMBERS BELOW

https://tos.mx/jdHvqj4

Add the following line to the code above, down at the very bottom:

assignPriceColor(if insidebar then color.yellow else if outsidebar then color.magenta else color.current);

MAIN STUDIES:

TIME_FRAME_CONTINUITY

https://tos.mx/JZROQzW

STRAT_REMIX_2.0

https://tos.mx/dpLsYg3

STRAT_REMIX_LITE_2.0

https://tos.mx/4osFry3
Same as the REMIX but with candle paint only on Inside Bars, Outside Bars, and Reversals. Allows user to turn toggle each.

STRAT_REMIX_SUPER_LITE

https://tos.mx/l7NLHn2
Same as the REMIX but completely stripped down to the bare essentials for machines with performance issues. This is the study I use.

CONTINUITY FLEX GRID

https://tos.mx/bWIOYRv
Custom Flex Grid I made for a friend. Here's a video for how to load the symbols on it:

Here's what it looks like:
G18g2H1.png


RADAR FLEX GRID

https://tos.mx/ekXrkrB
Custom Flex Grid that was Alex Option's idea. Here's a video for it:
https://youtu.be/v5LD-t_PH8A

Here's what it looks like:
a0A49ZA.png


VIDEO TUTORIAL FOR MAIN STUDIES:


HAMMERS AND SHOOTERS

This study is ONLY meant to allow the user to find the best settings for the hammer and shooting star component of the Remix study and Actionable Signals studies. All it does is find Hammers and Shooters using the same code in those other studies and paints them green or red while all other candles are painted gray. With this study you can tweak the settings in a way that best serves your purposes and then transfer those settings to the Strat studies.

Hammers_N_Shooters
https://tos.mx/zGPo4F4

Nv6NGSJ.png



NEW FULL COLOR VERSION OF OVERLAYS

These work great on a white chart
Darkest shade of green/red Version 1: https://tos.mx/tjloQ7e (the lowest time frame)
Medium shade of green/red Version 2:https://tos.mx/TCdGJMZ
Medium shade of green/red Version 3: https://tos.mx/tRTlDa1
Lightest shade of green/red Version 4: https://tos.mx/ZRF4K8Z(the highest time frame)

Pre-Loaded intraday chart: https://tos.mx/q7Bfm3J (Now complete with TFC study!)
Pre-Loaded full chart: https://tos.mx/jSJp52F (Now complete with TFC study!)


xqjCBIb.png


I find these are the best settings to the overall appearance the chart if you're using the green/red overlays:

BROUOrv.png



SIMPLE WATCHLIST COLUMNS

Here's what they look like:

ZeLjZmE.png


Here is a code for STRAT Candle watchlist column:


Code:
#------------------------------------
#
#        M T F      S T R A T
#         W A T C H L I S T
# a Study by Ramon DV. aka Pelonsax
#
#------------------------------------
#------------------------------------
# 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
#
#------------------------------------
def H = high;
def L = low;
def O = open;
def C = close;
#------------------------------------
# DEFINE SCENARIOS
#------------------------------------
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 insidebarup  = insidebar and O < C;
def twoup  = H > H[1] and L >= L[1];
def outsidebarup  = outsidebar and O < C;
def insidebardown  = insidebar and O > C;
def twodown  = H <= H[1] and L < L[1];
def outsidebardown  = outsidebar and O > C;
#------------------------------------
# LABEL SECTION
#------------------------------------
AddLabel(yes,

if twoup then “2U” else if twodown then “2D” else if insidebarup then “1U" else if insidebardown then “1D” else if outsidebarup then “3U” else if outsidebardown then “3D” else if insidebar and !insidebarup and !insidebardown then "1" else if outsidebar and !outsidebarup and !outsidebardown then "3" else "", color.black);

assignbackgroundColor(
if
twoup then color.green else if
twodown then color.red else if
outsidebarup then color.dark_green else if
insidebarup then color.light_green else if
outsidebardown then color.dark_red else if
insidebardown then color.orange else if
!insidebarup and
!insidebardown and
insidebar then color.white else if
!outsidebardown and
!outsidebarup and
outsidebar then color.white else color.current);

Here is a code for FTC Watchlist columns:

Code:
#S T R A T      F T C
#WATCHLIST
#Ramon DV aka Pelonsax
plot O = open;
def C = close;
assignBackgroundColor(if C > O then color.GREEN else if O > C then color.RED else if O == C then color.white else color.current);
addlabel(yes, O, color.black);
# END
·

NEW WATCHLIST COLUMN.

Here's a video tutorial for how to set it up:

Code:
#------------------------------------
#
#        M T F      S T R A T
#         W A T C H L I S T
# a Study by Ramon DV. aka Pelonsax
#
#------------------------------------
#------------------------------------
# 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
#
#------------------------------------
def H = high;
def L = low;
def O = open;
def C = close;
#------------------------------------
# DEFINE SCENARIOS
#------------------------------------
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 insidebarup  = insidebar and O < C;
def twoup  = H > H[1] and L >= L[1];
def outsidebarup  = outsidebar and O < C;
def insidebardown  = insidebar and O > C;
def twodown  = H <= H[1] and L < L[1];
def outsidebardown  = outsidebar and O > C;


def insidebar1 =  (H[1] < H[2] and L[1] > L[2]) or (H[1] == H[2] and L[1] > L[2]) or (H[1] < H[2] and L[1] == L[2]) or (H[1] == H[2] and L[1] == L[2]);
def outsidebar1 =  H[1]  > H[2] and L[1] <  L[2];

def insidebarup1  = insidebar1 and O[1] < C[1];
def twoup1 = H[1] > H[2] and L[1] >= L[2];
def outsidebarup1  = outsidebar1 and O[1] < C[1];
def insidebardown1  = insidebar1 and O[1] > C[1];
def twodown1  = H[1] <= H[2] and L[1] < L[2];
def outsidebardown1  = outsidebar1 and O[1] > C[1];


def insidebar2 =  (H[2] < H[3] and L[2] > L[3]) or (H[2] == H[3] and L[2] > L[3]) or (H[2] < H[3] and L[2] == L[3]) or (H[2] == H[3] and L[2] == L[3]);
def outsidebar2 =  H[2]  > H[3] and L[2] <  L[3];

def insidebarup2  = insidebar2 and O[2] < C[2];
def twoup2  = H[2] > H[3] and L[2] >= L[3];
def outsidebarup2  = outsidebar2 and O[2] < C[2];
def insidebardown2  = insidebar2 and O[2] > C[2];
def twodown2  = H[2] <= H[3] and L[2] < L[3];
def outsidebardown2  = outsidebar2 and O[2] > C[2];

#------------------------------------
# DEFINE REVERSALS (Basic four)
#------------------------------------

# Bullish
def TwoOneTwoBull = twoup and insidebar1 and twodown2;
def TwoTwoBull = twoup and twodown1;
def ThreeBull = outsidebarup and (twodown1 or insidebar1 or outsidebardown1);
def ThreeOneTwoBull = twoup and insidebar1 and outsidebardown2;

# Bearish
def TwoOneTwoBear = twodown and insidebar1 and twoup2;
def TwoTwoBear = twodown and twoup2;
def ThreeBear = outsidebardown and (twoup1 or insidebar1 or outsidebarup1);
def ThreeOneTwoBear = twodown and insidebar1 and outsidebarup2;

#------------------------------------
# LABEL SECTION
#------------------------------------
AddLabel(yes,

(if twoup2 then “2U” else if twodown2 then “2D” else if insidebarup2 then “1U" else if insidebardown2 then “1D” else if outsidebarup2 then “3U” else if outsidebardown2 then “3D” else if insidebar2 and !insidebarup2 and !insidebardown2 then "1" else if outsidebar2 and !outsidebarup2 and !outsidebardown2 then "3" else “”) + “-“ +

(if twoup1 then “2U” else if twodown1 then “2D” else if insidebarup1 then “1U" else if insidebardown1 then “1D” else if outsidebarup1 then “3U” else if outsidebardown1 then “3D” else if insidebar1 and !insidebarup1 and !insidebardown1 then "1" else if outsidebar1 and !outsidebarup1 and !outsidebardown1 then "3" else “”)+ ”-“ +

(if twoup then “[2U]” else if twodown then “[2D]” else if insidebarup then “[1U]” else if insidebardown then “[1D]” else if outsidebarup then “[3U]” else if outsidebardown then “[3D]” else if insidebar and !insidebarup and !insidebardown then “[1]” else if outsidebar and !outsidebarup and !outsidebardown then “[3]” else “”), color.black);

assignbackgroundColor(if TwoOneTwoBull or TwoTwoBull or ThreeBull or ThreeOneTwoBull then color.cyan else if TwoOneTwoBear or TwoTwoBear or ThreeBear or ThreeOneTwoBear then color.magenta else if

!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
twoup then color.green else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
twodown then color.red else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
outsidebarup then color.dark_green else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
insidebarup then color.light_green else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
outsidebardown then color.dark_red else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
insidebardown then color.orange else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
!insidebarup and
!insidebardown and
insidebar then color.white else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
!outsidebardown and
!outsidebarup and
outsidebar then color.white

else color.current);

Here's what how they appear:
JXfTMz6.png


USER MOD BY BOB'S A STRATTER (THANK'S BOB!)

gmLABfX.png

Code:
#------------------------------------
#
#        M T F      S T R A T
#         W A T C H L I S T
# a Study by Ramon DV. aka Pelonsax
# Modified by Bob's a Stratter
#
#------------------------------------
#------------------------------------
# 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
#
#------------------------------------
plot O = open;
def H = high;
def L = low;

def C = close;
#------------------------------------
# DEFINE SCENARIOS
#------------------------------------
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 insidebarup  = insidebar and O < C;
def twoup  = H > H[1] and L >= L[1];
def outsidebarup  = outsidebar and O < C;
def insidebardown  = insidebar and O > C;
def twodown  = H <= H[1] and L < L[1];
def outsidebardown  = outsidebar and O > C;
#------------------------------------
# LABEL SECTION
#------------------------------------

AssignBackgroundColor(
if
twoup then Color.GREEN else if
twodown then Color.RED else if
outsidebarup then Color.DARK_GREEN else if
insidebarup then Color.LIGHT_GREEN else if
outsidebardown then Color.DARK_RED else if
insidebardown then Color.ORANGE else if
!insidebarup and
!insidebardown and
insidebar then Color.WHITE else if
!outsidebardown and
!outsidebarup and
outsidebar then Color.YELLOW else Color.CURRENT);
addlabel(yes, O, color.black);

COMPLETE TIME FRAME CONTINUITY STUDY WITH BACKGROUND COLOR AND ALERTS

THIS STUDY HAS BEEN INCORPORATED INTO THE TIME FRAME CONTINUITY STUDY AT THE TOP

DO NOT LOAD THIS ON THE WHITE PRELOADED CHARTS. THEY ALREADY HAVE A VERSION THAT DOESN'T CHANGE THE BACKGROUND COLOR


This study incorporates the same elements of the previous TFC studies in one complete script. You can place this script on any chart in any time frame and it will work, but there is a catch and there is nothing anyone can do to change it: like ANY multi time frame study in tThink or Swim, this WILL NOT use the aggregations for time frames that are lower than the chart. This means that it will not draw or consider the open for a lower time frame (for example any intraday TF on a daily chart. I recommend that you use a grid with multiple time frames in order to make the best use of this study. When you place this on a chart, you must check to see how much data you are providing. For example, if you are on a 1min 1D chart, you have only two days worth of data, so you cannot use any time frame higher than a day. In order to use the week or month or year, you would need the chart to include a week, month, year's worth of time. Once you have the time frame the chart is set to and the amount of time that is on the chart, you should go into the settings and select "No" for any time frames that are not included. For example: If you use a 5 min 10 D chart, you should select "no" on Use Minute, Use Three, Use Month, Use Year. If you are only looking for intraday time frame continuity, you should select Use Minute through Use Hour. The study changes the background color of the chart when there is FTFC to the upside (green) or to the downside (red). If the background is black, there is no FTFC. It also has the highest and lowest open levels painted as cyan and magenta lines (like the previous studies) as well as arrows wherever there is FTFC. You can choose to not display only of the elements listed above with the exception of the background color. I recommend you allow the use of the lines and labels when you first place the study on the chart so that you can be sure that you are displaying time frame continuity correctly or as desired. There is also an audible alert. Here's what it looks like:

vPDRqbR.png


LOQAqlt.png




Here's the study link:
https://tos.mx/JZROQzW

Here's the code:
Code:
#-------------------------------
#
# S T R A T    O P E N S
#
# a study that indicates the opens
# on mutliple time frames
# for full time frame continuity INTRADAY
# and FULL. All in one.
# Author: Ramon DV aka Pelonsax
#
#--------------------------------
declare upper;
# -----------------------------------
# INPUTS
# -----------------------------------
input Use_Minute = yes;
input Use_Three = yes;
input Use_Five = yes;
input Use_Fifteen = yes;
input Use_Thirty = yes;
input Use_Sixty = yes;
input Use_Day = yes;
input Use_Week = yes;
input Use_Month = yes;
input Use_Year = yes;
input Show_Lines = yes;
input Show_Arrows = yes;
input Show_Label = yes;
# -----------------------------------
# 1 Minute
# -----------------------------------
def "1mAGG" = AggregationPeriod.MIN;
def Vminute = GetAggregationPeriod() <= AggregationPeriod.MIN;
def minute;
if Use_Minute and Vminute {
    minute = open(period = "1mAGG");
} else {
    minute = open;
}
# -----------------------------------
# 3 Minute
# -----------------------------------
def "3mAGG" = AggregationPeriod.THREE_MIN;
def Vthree = GetAggregationPeriod() <= AggregationPeriod.THREE_MIN;
def three;
if Use_Three and Vthree {
    three = open(period = "3mAGG");
} else {
    three = open;
}
# -----------------------------------
# 5 Minute
# -----------------------------------
def "5mAGG" = AggregationPeriod.FIVE_MIN;
def Vfive = GetAggregationPeriod() <= AggregationPeriod.FIVE_MIN;
def five;
if Use_Five and Vfive {
    five = open(period = "5mAGG");
} else {
    five = open;
}
# -----------------------------------
# 15 Minute Line
# -----------------------------------
def "15mAGG" = AggregationPeriod.FIFTEEN_MIN;
def Vfifteen = GetAggregationPeriod() <= AggregationPeriod.FIFTEEN_MIN;
def fifteen;
if Use_Fifteen and  Vfifteen {
    fifteen = open(period = "15mAGG");
} else {
    fifteen = open;
}
# -----------------------------------
# 30 Minute Line
# -----------------------------------
def "30mAGG" = AggregationPeriod.THIRTY_MIN;
def Vthirty = GetAggregationPeriod() <= AggregationPeriod.THIRTY_MIN;
def thirty;
if Use_Thirty and Vthirty {
    thirty = open(period = "30mAGG");
} else {
    thirty = open;
}
# -----------------------------------
# 60 Minute Line
# -----------------------------------
def "60mAGG" = AggregationPeriod.HOUR;
def Vhour = GetAggregationPeriod() <= AggregationPeriod.HOUR;
def hour;
if Use_Sixty and Vhour {
    hour = open(period = "60mAGG");
} else {
    hour = open;
}
# -----------------------------------
# Day
# -----------------------------------
def "1DAGG" = AggregationPeriod.DAY;
def Vday = GetAggregationPeriod() <= AggregationPeriod.DAY;
def day;
if Use_Day and Vday {
    day = open(period = "1DAGG");
} else {
    day = open;
}
# -----------------------------------
# Week
# -----------------------------------
def "1wAGG" = AggregationPeriod.WEEK;
def Vweek = GetAggregationPeriod() <= AggregationPeriod.WEEK;
def week;
if Use_Week and Vweek {
    week = open(period = "1wAGG");
} else {
    week = open;
}
# -----------------------------------
# Month
# -----------------------------------
def "1MOAGG" = AggregationPeriod.MONTH;
def Vmonth = GetAggregationPeriod() <= AggregationPeriod.MONTH;
def month;
if Use_Month and Vmonth {
    month = open(period = "1MOAGG");
} else {
    month = open;
}
# -----------------------------------
# Year
# -----------------------------------
def "1YAGG" = AggregationPeriod.YEAR;
def Vyear = GetAggregationPeriod() <= AggregationPeriod.YEAR;
def year;
if Use_Year and Vyear {
    year = open(period = "1YAGG");
} else {
    year = open;
}

# -----------------------------------
# FTC COMPONENT
# -----------------------------------

# TOP

plot top = if minute >=
three and minute >=
five and minute >=
fifteen and minute >=
thirty and minute >=
hour and minute >=
day and minute >=
week and minute >=
month and minute >=
year then minute else

if three >=
minute and three >=
five and three >=
fifteen and three >=
thirty and three >=
hour and three >=
day and three >=
week and three >=
month and three >=
year then three else

if five >=
minute and five >=
three and five >=
fifteen and five >=
thirty and five >=
hour and five >=
day and five >=
week and five >=
month and five >=
year then five else

if fifteen >=
minute and fifteen >=
three and fifteen >=
five and fifteen >=
thirty and fifteen >=
hour and fifteen >=
day and fifteen >=
week and fifteen >=
month and fifteen >=
year then fifteen else

if thirty >=
minute and thirty >=
three and thirty >=
five and thirty >=
fifteen and thirty >=
hour and thirty >=
day and thirty >=
week and thirty >=
month and thirty >=
year then thirty  else

if hour >=
minute and hour >=
three and hour >=
five and hour >=
fifteen and hour >=
thirty and hour >=
day and hour >=
week and hour >=
month and hour >=
year then hour else

if day >=
minute and day >=
three and day >=
five and day >=
fifteen and day >=
thirty and day >=
hour and day >=
week and day >=
month and day >=
year then day else

if week >=
minute and week >=
three and week >=
five and week >=
fifteen and week >=
thirty and week >=
hour and week >=
day and week >=
month and week >=
year then week else

if month >=
minute and month >=
three and month >=
five and month >=
fifteen and month >=
thirty and month >=
hour and month >=
day and month >=
week and month >=
year then month else

if year >=
minute and year >=
three and year >=
five and year >=
fifteen and year >=
thirty and year >=
hour and year >=
day and year >=
week and year >=
month then year else

Double.NaN;

# BOTTOM

plot bottom = if minute <=
three and minute <=
five and minute <=
fifteen and minute <=
thirty and minute <=
hour and minute <=
day and minute <=
week and minute <=
month and minute <=
year then minute else

if three <=
minute and three <=
five and three <=
fifteen and three <=
thirty and three <=
hour and three <=
day and three <=
week and three <=
month and three <=
year then three else

if five <=
minute and five <=
three and five <=
fifteen and five <=
thirty and five <=
hour and five <=
day and five <=
week and five <=
month and five <=
year then five else

if fifteen <=
minute and fifteen <=
three and fifteen <=
five and fifteen <=
thirty and fifteen <=
hour and fifteen <=
day and fifteen <=
week and fifteen <=
month and fifteen <=
year then fifteen else

if thirty <=
minute and thirty <=
three and thirty <=
five and thirty <=
fifteen and thirty <=
hour and thirty <=
day and thirty <=
week and thirty <=
month and thirty <=
year then thirty  else

if hour <=
minute and hour <=
three and hour <=
five and hour <=
fifteen and hour <=
thirty and hour <=
day and hour <=
week and hour <=
month and hour <=
year then hour else

if day <=
minute and day <=
three and day <=
five and day <=
fifteen and day <=
thirty and day <=
hour and day <=
week and day <=
month and day <=
year then day else

if week <=
minute and week <=
three and week <=
five and week <=
fifteen and week <=
thirty and week <=
hour and week <=
day and week <=
month and week <=
year then week else

if month <=
minute and month <=
three and month <=
five and month <=
fifteen and month <=
thirty and month <=
hour and month <=
day and month <=
week and month <=
year then month else

if year <=
minute and year <=
three and year <=
five and year <=
fifteen and year <=
thirty and year <=
hour and year <=
day and year <=
week and year <=
month then year else
Double.NaN;

top.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
top.SetLineWeight(3);
top.SetDefaultColor(Color.CYAN);
top.SetHiding(!Show_lines);

bottom.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
bottom.SetLineWeight(3);
bottom.SetDefaultColor(Color.MAGENTA);
bottom.SetHiding(!Show_lines);

plot FTCUp = close crosses above top;
FTCUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
FTCUp.SetDefaultColor(Color.gray);
FTCUp.SetLineWeight(1);
FTCUp.SetHiding(!Show_Arrows);

plot FTCDN = close crosses below bottom;
FTCDN.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
FTCDN.SetDefaultColor(Color.gray);
FTCDN.SetLineWeight(1);
FTCDN.SetHiding(!Show_Arrows);

addlabel(Show_Label, "CONTINUITY UP " + asdollars(top) + " DOWN " + asdollars(bottom) + " ", color.light_gray);
addlabel(Show_Label, " USING: ", color.light_gray);
addlabel(Show_Label and Use_Minute, "1min ", color.light_gray);
addlabel(Show_Label and Use_Three, "3min ", color.light_gray);
addlabel(Show_Label and Use_Five, "5min ", color.light_gray);
addlabel(Show_Label and Use_Fifteen, "15min ", color.light_gray);
addlabel(Show_Label and Use_Thirty, "30min ", color.light_gray);
addlabel(Show_Label and Use_Sixty, "60min ", color.light_gray);
addlabel(Show_Label and Use_Day, "Day ", color.light_gray);
addlabel(Show_Label and Use_Week, "Week ", color.light_gray);
addlabel(Show_Label and Use_Month, "Month ", color.light_gray);
addlabel(Show_Label and Use_Year, "Year ", color.light_gray);
# -----------------------------------
# BACKGROUND COLOR
# -----------------------------------

DefineGlobalColor("UP”, CreateColor(000, 065, 000));
DefineGlobalColor("DOWN”, CreateColor(125, 000, 000));

assignBackgroundColor(if FTCUP then GlobalColor("UP") else if FTCDN then GlobalColor("DOWN") else color.black);
input Use_Alerts = yes;
Alert(Use_Alerts and FTCUP, "FTC Upside", Alert.BAR, Sound.Bell);
Alert(Use_Alerts and FTCDN, "FTC Downside", Alert.BAR, Sound.Bell);



BROADENING FORMATIONS (1ST DRAFT)

This study will only find 1-3 combos and extend diagonal lines outward. I wasn't going to release it yet because I'm waiting to really make it work with multi bar pivots, but someone asked for exactly this in the comments and since this one is ready now, here you go. Keep in mind that this is not exactly the same as a broadening formation as Rob describes it. (It is and it isn't. This is only one example of a broadening formation). It could come in handy if you want to run it on a higher time frame like the daily or weekly and then draw over the lines so that it shows up on the lower time frames. I have to credit Halcyon Guy (Don L.) who wrote the backbone and has given me permission to publish. I moded his version of a similar study that looks for wedges. This is basically the 2 bar inverse of his study.

7www253.png


3_1_Broadening_Formation
https://tos.mx/U6xvWgx

Code:
## ----------------------------------------
# BROADENING FORMATION
# A STRAT STUDY BY PELONSAX AKA RAMON DV
#
# ADAPTED FROM
# quadinsidebar_01
# 2020-06-27
# halcyonguy
# ----------------------------------------

input extend_lines = 100;

def na = double.nan;
def hi = high;
def lo = low;
def bn = barnumber();


# ----- 2 bar outside pattern ---------------------------------
def insidebar0 = hi < hi[-1] and lo > lo[-1];

def insidebar = insidebar0 or insidebar0[1];
def next = insidebar0[-1];

def pattern = fold i = 0 to extend_lines
                 with p
                 do if i > bn then p + 0 else p + GetValue(insidebar,i);

def extend = if (!next and pattern > 0) then 1 else 0;
def en_slopelines = extend;

# ===================================================================

def bargaps = 1;
def slopehi2 = (hi[-bargaps] - hi[0])/bargaps;
def slopelo2 = (lo[-bargaps] - lo[0])/bargaps;
def slopehi = if insidebar0 then slopehi2 else if en_slopelines then slopehi[1] else na;
def slopelo = if insidebar0 then slopelo2 else if en_slopelines then slopelo[1] else na;
def bar0number = if insidebar0 then barnumber() else if en_slopelines then bar0number[1] else na;
def bar0high = if insidebar0 then hi else if en_slopelines then bar0high[1] else na;
def bar0low = if insidebar0 then lo else if en_slopelines then bar0low[1] else na;

plot diaghi = if en_slopelines then ( bar0high + (slopehi * (barnumber() - bar0number))) else na;
diaghi.AssignValueColor(Color.dark_Green);
diaghi.SetStyle(Curve.MEDIUM_DASH);

plot diaglo = if en_slopelines then ( bar0low + (slopelo * (barnumber() - bar0number))) else na;
diaglo.AssignValueColor(Color.dark_green);
diaglo.SetStyle(Curve.MEDIUM_DASH);

#

# ------------------------------------------------------------------

#

!!ACTIONABLE SIGNAL SCANS!!

Rather than go into another lengthy description, I just decided to make a video and post the links.


1 Bar Rev Strat Daily
https://tos.mx/sml8vKo

2 Bar Rev Strat Daily
https://tos.mx/fUIotqN

Hammer Rev
https://tos.mx/A2w2Jkt

Inside Break Bull
https://tos.mx/JKIrGGZ

Kicking Bull
https://tos.mx/JLI4AXC

Link to James Fox’s STRAT Scan video:

UPDATE: 03/23/21 Tried to re-upload complete overlay charts with a new link because I noticed that they were set to use log scale. I noticed it messes with my drawings so I turn it off on all my charts. I think it's the best setting. Ill try to give y'all fresh links later (probably just a problem with TOS right now), but for now, to change it manually, it looks like this:

mAJ243X.png


UPDATE: 05/21/21 Updated strat numbers so that the 1's and 3's appear as white numbers below, the 2U is a green number above and the 2D is a red number below. Added that component to all REMIX studies. Added REMIX SUPER LITE for machines with performance issues. And lastly, I have added two flex grids, one that is only continuity labels, and another that is a full radar screen based on Alex Option's idea. There are video tutorials for each. I also removed the studies that have been incorporated into the REMIX or TFC master studies as well as older studies that were glitchy and I don't have time or desire to support.

UPDATE: 04/01/21 Updated Kicker Actionable signal to include opposite continuity for kick age and fixed bug with measured move. Streamlined thread removing studies that are now obsolete.

UPDATE: 02/28/21 Added TFC study to Pre-Loaded Color Overlay Charts. This is because the Complete TFC study at the top changes the color of the background which defeats the purpose of the color overlay chart on a white background. This is simply a condensed, simplified version of the TFC study. It will only work if the intraday chart is set to 1 minute and the full chart is set to 1 hour.

UPDATE: 02/28/21 Added additional new version of color script. Re-worked the colors to let each TF stand out.

UPDATE: 02/26/21 Added new color version of the overlay study. There are three separate versions, each a different shade.

UPDATE: 01/02/21 Corrected bug in watchlist columns. Then you very much for catching that @fishstick1229 !!!!!!

UPDATE: 10/19/20 Placed link for the two main studies at the top. Added set up tutorial video for two main (most recent studies). Removed older studies (Basic Four). Added Hammers_and_Shooters study. Added Actionable Signal Scans and video

UPDATE: 10/15/20 Made Background Color script all inclusive and MTF capable. Added specific type of actionable signal onto the alerts written into the Remix version

UPDATE: 10/14/20 Per request, added alerts for reversals to the Reversal Remix and Actionable Signal study. Added alert to Background Color FTC Study. Added 1st draft Broadening Formation study.
Hi @Pelonsax. First of all, great job on the #TheStrat code for TOS, thank you for that. I have seen the color coded labels, based on the color of the candle at various time frames on the top left side of the charts. I have this color coded triple EMA, where if the 8 is higher than both the 13 and 21 EMAs, then it's green. If it is below, it's red and in between yellow. Is it possible to code these labels at the top, where it can show me the color of the candles/bars at various timeframes, based on this code? Thank you in advance for your help.

Code:
#Mr Slim Miller at askSLIM dot com
#SlimRibbonCustom_markos9-7-18
input price = close;

input superfast_length = 8;

input fast_length = 13;

input slow_length = 21;

input displace = 0;



def mov_avg8 = ExpAverage(price[-displace], superfast_length);

def mov_avg13 = ExpAverage(price[-displace], fast_length);

def mov_avg21 = ExpAverage(price[-displace], slow_length);



#moving averages

Plot Superfast = mov_avg8;

plot Fast = mov_avg13;

plot Slow = mov_avg21;



def buy = mov_avg8 > mov_avg13 and mov_avg13 > mov_avg21 and low > mov_avg8;

def stopbuy = mov_avg8 <= mov_avg13;

def buynow = !buy[1] and buy;

def buysignal = CompoundValue(1, if buynow and !stopbuy then 1 else if buysignal[1]==1 and stopbuy then 0 else buysignal[1], 0);



plot Buy_Signal = buysignal[1] == 0 and buysignal==1;

Buy_signal.setpaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Buy_signal.setdefaultColor(color.dark_GREEN);

Buy_signal.hidetitle();

Alert(condition = buysignal[1] == 0 and buysignal == 1, text = "Buy Signal", sound = Sound.Bell, "alert type" = Alert.BAR);



plot Momentum_Down = buysignal[1] ==1 and buysignal==0;

Momentum_down.setpaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Momentum_Down.setdefaultColor(color.yellow);

Momentum_down.hidetitle();

Alert(condition = buysignal[1] == 1 and buysignal == 0, text = "Momentum_Down", sound = Sound.Bell, "alert type" = Alert.BAR);



def sell = mov_avg8 < mov_avg13 and mov_avg13 < mov_avg21 and high < mov_avg8;

def stopsell = mov_avg8 >= mov_avg13;

def sellnow = !sell[1] and sell;

def sellsignal = CompoundValue(1, if sellnow and !stopsell then 1 else if sellsignal[1]==1 and stopsell then 0 else sellsignal[1], 0);



Plot Sell_Signal = sellsignal[1] ==0 and sellsignal;

Sell_signal.setpaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_down);

sell_signal.setDefaultColor(color.red);

Sell_signal.hidetitle();

Alert(condition = sellsignal[1] == 0 and sellsignal == 1, text = "Sell Signal", sound = Sound.Bell, "alert type" = Alert.BAR);



Plot Momentum_Up = sellsignal[1]==1 and sellSignal==0;

Momentum_up.setpaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_up);

Momentum_up.setDefaultColor(color.yellow);

Momentum_up.hidetitle();

Alert(condition = sellsignal[1] == 1 and sellSignal == 0, text = "Momentum_Up", sound = Sound.Bell, "alert type" = Alert.BAR);



plot Colorbars = if buysignal ==1 then 1 else if sellsignal ==1 then 2 else if buysignal ==0 or sellsignal==0 then 3 else 0;

colorbars.hide();

Colorbars.definecolor("Buy_Signal_Bars", color.dark_green);

Colorbars.definecolor("Sell_Signal_Bars", color.red);

Colorbars.definecolor("Neutral", color.yellow);



AssignPriceColor(if Colorbars ==1 then colorbars.color("buy_signal_bars") else if colorbars ==2 then colorbars.color("Sell_Signal_bars") else  colorbars.color("neutral"));



#end

How could I have the 1min. chart show the Bubbles with the respective colors of the EMAs described above, for the 5min. 15min., 30min, 60min, 4hr, daily, weekly and monthly?

So, if the 5min. is green based on the fact that the 8>13>21 EMAs, then show the small Bubble on the top left corner with a 5min label and the background color being green, etc.

Thank you in advance for your help!
 
@Pelonsax - what a dedication work you put into this. So many hours, days of work you put into this. Appreciate so much of all you do.
Apologize if I am asking redundant questions and answers may have been posted before.
Please let me know my comments below are correct?
Candle with label of 1 below looks to be inside bar.
Candle with label of 2 means it take out only 1 side of previous bar (this can be either take out the high or the low but not both).
Candle with label of 3 means it is outside bar (which take out the high and the low of previous bar.

My last question is regarding to the watchlist that shows different time frame with output as example below.
I think you are looking at the last 3bars the one with the bracket is current bar.
2D-2D-[2D] 2D means take out the low of previous bar, in this case you have 3 consecutive down bar taking out the low?
2U-2U-[2U] 2U means take out the high of previuous bar, in this case you have 3 consecutive up bar taking out the high?
3U-2U-[1D] 3U means outside bar take out high and low on previous bar, then 2U means it take out the high of 1st bar 3U, and 1D means it's inside bar that take out the low of bar that has 2U?

Thank you in advance and look forward for your responses? If there's any additional reading that you have, please let me know! Appreciate all the work you put in and sharing all to us!!!
Best regards,
mdtn
Yes, everything you sid appears to be correct.
 
Been using the 1 and 2 bar rev strat scans, fantastic!. I'm not a programmer so can anyone help me understand how to turn the bullish scans into bearish scans? I appreciate any guidance. Thanks
 
Been using the 1 and 2 bar rev strat scans, fantastic!. I'm not a programmer so can anyone help me understand how to turn the bullish scans into bearish scans? I appreciate any guidance. Thanks
I'm pretty sure that all you need to do is go in the code and switch around any and all <> signs. (where you see <, replace it with <, etc)
 
Thank you. I was able to do the 1 Bar Rev Strat and the Inside Bull Break. The 2 Bar Rev Strat scan is looking for a 1-2dn-2up and the Thinkscript Editor says "no such function:TwoDown at 1:1". I'm not quite sure what that means, but it won't let me change it to "TwoUp", since I'd be looking for a 1-2up-2dn.
 
In order to keep the post clean, updates are now found at the very bottom of the thread
NEWEST: 05/21/21

A SUITE OF PRODUCTS BY PELONSAX AKA RAMON DV FOR USE WITH: ROB SMITH’S THE STRAT

I am writing these to help myself learn The STRAT because I am a visual learner. And I am sharing them because many generous people have shared their time and expertise with me along my journey and we can do more when we work together.

But before we get to all of that, here is a link to a really great video that Rob just recorded for Benzinga where he gives a GREAT introduction to The STRAT. It is NOT recommended that you use any of my indicators for trading with live money until you've had the chance to gain a real understanding of how The STRAT works and given yourself ample opportunity to practice on paper.

Here's the video: https://benzinga.wistia.com/medias/zoi6e794v3?fbclid=IwAR06RBtG0bimZcgyDuryjd12K7BdbDPCdkrE-O0k3hcT7JvMsk889v8qv3c

Keep in mind that I am not the creator of The STRAT. I am a disciple who has been creating these TOS studies along the way in my journey to learn this system and be able to visualize how it works. For more information on the STRAT, and to really learn how to use it to trade effectively with or without any of my studies, please visit Rob on Ticker Tocker!!

https://www.tickertocker.com/?fbclid=IwAR1ZDPKpTX2WzOrnOFqFuMOw5Wx_u4eTZoxco8-yZeBIObQJHQsYmZAakQU

!!!VERY IMPORTANT!!!! THERE ARE NO BUY AND SELL SIGNALS.!!!
The decision to buy or sell MUST BE predicated upon a deeper understanding of this system and any other tools at your disposal. As a matter of fact this study only considers the four basic reversals. You can turn both the arrows and the bubbles off in the settings so they don't clutter your chart.

Lastly, I would like to point out that this is an active thread that is constantly evolving as I continue to improve and add to these studies. If you have questions or comments about them I just ask, as I noted above, that you first make sure you are referring to the most recent version of a particular study and that you be very specific using screenshots in any such comments.

For those of you from Twitter who are just here for the bare essentials, here are two very basic studies:

STRAT BAR NUMBERS 2.0

https://tos.mx/Kac4tLf
3PfcCmA.jpg


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);

STRAT BAR CANDLES PAINT ON ONES AND THREES WITH NUMBERS BELOW

https://tos.mx/jdHvqj4

Add the following line to the code above, down at the very bottom:

assignPriceColor(if insidebar then color.yellow else if outsidebar then color.magenta else color.current);

MAIN STUDIES:

TIME_FRAME_CONTINUITY

https://tos.mx/JZROQzW

STRAT_REMIX_2.0

https://tos.mx/dpLsYg3

STRAT_REMIX_LITE_2.0

https://tos.mx/4osFry3
Same as the REMIX but with candle paint only on Inside Bars, Outside Bars, and Reversals. Allows user to turn toggle each.

STRAT_REMIX_SUPER_LITE

https://tos.mx/l7NLHn2
Same as the REMIX but completely stripped down to the bare essentials for machines with performance issues. This is the study I use.

CONTINUITY FLEX GRID

https://tos.mx/bWIOYRv
Custom Flex Grid I made for a friend. Here's a video for how to load the symbols on it:

Here's what it looks like:
G18g2H1.png


RADAR FLEX GRID

https://tos.mx/ekXrkrB
Custom Flex Grid that was Alex Option's idea. Here's a video for it:
https://youtu.be/v5LD-t_PH8A

Here's what it looks like:
a0A49ZA.png


VIDEO TUTORIAL FOR MAIN STUDIES:


HAMMERS AND SHOOTERS

This study is ONLY meant to allow the user to find the best settings for the hammer and shooting star component of the Remix study and Actionable Signals studies. All it does is find Hammers and Shooters using the same code in those other studies and paints them green or red while all other candles are painted gray. With this study you can tweak the settings in a way that best serves your purposes and then transfer those settings to the Strat studies.

Hammers_N_Shooters
https://tos.mx/zGPo4F4

Nv6NGSJ.png



NEW FULL COLOR VERSION OF OVERLAYS

These work great on a white chart
Darkest shade of green/red Version 1: https://tos.mx/tjloQ7e (the lowest time frame)
Medium shade of green/red Version 2:https://tos.mx/TCdGJMZ
Medium shade of green/red Version 3: https://tos.mx/tRTlDa1
Lightest shade of green/red Version 4: https://tos.mx/ZRF4K8Z(the highest time frame)

Pre-Loaded intraday chart: https://tos.mx/q7Bfm3J (Now complete with TFC study!)
Pre-Loaded full chart: https://tos.mx/jSJp52F (Now complete with TFC study!)


xqjCBIb.png


I find these are the best settings to the overall appearance the chart if you're using the green/red overlays:

BROUOrv.png



SIMPLE WATCHLIST COLUMNS

Here's what they look like:

ZeLjZmE.png


Here is a code for STRAT Candle watchlist column:


Code:
#------------------------------------
#
#        M T F      S T R A T
#         W A T C H L I S T
# a Study by Ramon DV. aka Pelonsax
#
#------------------------------------
#------------------------------------
# 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
#
#------------------------------------
def H = high;
def L = low;
def O = open;
def C = close;
#------------------------------------
# DEFINE SCENARIOS
#------------------------------------
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 insidebarup  = insidebar and O < C;
def twoup  = H > H[1] and L >= L[1];
def outsidebarup  = outsidebar and O < C;
def insidebardown  = insidebar and O > C;
def twodown  = H <= H[1] and L < L[1];
def outsidebardown  = outsidebar and O > C;
#------------------------------------
# LABEL SECTION
#------------------------------------
AddLabel(yes,

if twoup then “2U” else if twodown then “2D” else if insidebarup then “1U" else if insidebardown then “1D” else if outsidebarup then “3U” else if outsidebardown then “3D” else if insidebar and !insidebarup and !insidebardown then "1" else if outsidebar and !outsidebarup and !outsidebardown then "3" else "", color.black);

assignbackgroundColor(
if
twoup then color.green else if
twodown then color.red else if
outsidebarup then color.dark_green else if
insidebarup then color.light_green else if
outsidebardown then color.dark_red else if
insidebardown then color.orange else if
!insidebarup and
!insidebardown and
insidebar then color.white else if
!outsidebardown and
!outsidebarup and
outsidebar then color.white else color.current);

Here is a code for FTC Watchlist columns:

Code:
#S T R A T      F T C
#WATCHLIST
#Ramon DV aka Pelonsax
plot O = open;
def C = close;
assignBackgroundColor(if C > O then color.GREEN else if O > C then color.RED else if O == C then color.white else color.current);
addlabel(yes, O, color.black);
# END
·

NEW WATCHLIST COLUMN.

Here's a video tutorial for how to set it up:

Code:
#------------------------------------
#
#        M T F      S T R A T
#         W A T C H L I S T
# a Study by Ramon DV. aka Pelonsax
#
#------------------------------------
#------------------------------------
# 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
#
#------------------------------------
def H = high;
def L = low;
def O = open;
def C = close;
#------------------------------------
# DEFINE SCENARIOS
#------------------------------------
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 insidebarup  = insidebar and O < C;
def twoup  = H > H[1] and L >= L[1];
def outsidebarup  = outsidebar and O < C;
def insidebardown  = insidebar and O > C;
def twodown  = H <= H[1] and L < L[1];
def outsidebardown  = outsidebar and O > C;


def insidebar1 =  (H[1] < H[2] and L[1] > L[2]) or (H[1] == H[2] and L[1] > L[2]) or (H[1] < H[2] and L[1] == L[2]) or (H[1] == H[2] and L[1] == L[2]);
def outsidebar1 =  H[1]  > H[2] and L[1] <  L[2];

def insidebarup1  = insidebar1 and O[1] < C[1];
def twoup1 = H[1] > H[2] and L[1] >= L[2];
def outsidebarup1  = outsidebar1 and O[1] < C[1];
def insidebardown1  = insidebar1 and O[1] > C[1];
def twodown1  = H[1] <= H[2] and L[1] < L[2];
def outsidebardown1  = outsidebar1 and O[1] > C[1];


def insidebar2 =  (H[2] < H[3] and L[2] > L[3]) or (H[2] == H[3] and L[2] > L[3]) or (H[2] < H[3] and L[2] == L[3]) or (H[2] == H[3] and L[2] == L[3]);
def outsidebar2 =  H[2]  > H[3] and L[2] <  L[3];

def insidebarup2  = insidebar2 and O[2] < C[2];
def twoup2  = H[2] > H[3] and L[2] >= L[3];
def outsidebarup2  = outsidebar2 and O[2] < C[2];
def insidebardown2  = insidebar2 and O[2] > C[2];
def twodown2  = H[2] <= H[3] and L[2] < L[3];
def outsidebardown2  = outsidebar2 and O[2] > C[2];

#------------------------------------
# DEFINE REVERSALS (Basic four)
#------------------------------------

# Bullish
def TwoOneTwoBull = twoup and insidebar1 and twodown2;
def TwoTwoBull = twoup and twodown1;
def ThreeBull = outsidebarup and (twodown1 or insidebar1 or outsidebardown1);
def ThreeOneTwoBull = twoup and insidebar1 and outsidebardown2;

# Bearish
def TwoOneTwoBear = twodown and insidebar1 and twoup2;
def TwoTwoBear = twodown and twoup2;
def ThreeBear = outsidebardown and (twoup1 or insidebar1 or outsidebarup1);
def ThreeOneTwoBear = twodown and insidebar1 and outsidebarup2;

#------------------------------------
# LABEL SECTION
#------------------------------------
AddLabel(yes,

(if twoup2 then “2U” else if twodown2 then “2D” else if insidebarup2 then “1U" else if insidebardown2 then “1D” else if outsidebarup2 then “3U” else if outsidebardown2 then “3D” else if insidebar2 and !insidebarup2 and !insidebardown2 then "1" else if outsidebar2 and !outsidebarup2 and !outsidebardown2 then "3" else “”) + “-“ +

(if twoup1 then “2U” else if twodown1 then “2D” else if insidebarup1 then “1U" else if insidebardown1 then “1D” else if outsidebarup1 then “3U” else if outsidebardown1 then “3D” else if insidebar1 and !insidebarup1 and !insidebardown1 then "1" else if outsidebar1 and !outsidebarup1 and !outsidebardown1 then "3" else “”)+ ”-“ +

(if twoup then “[2U]” else if twodown then “[2D]” else if insidebarup then “[1U]” else if insidebardown then “[1D]” else if outsidebarup then “[3U]” else if outsidebardown then “[3D]” else if insidebar and !insidebarup and !insidebardown then “[1]” else if outsidebar and !outsidebarup and !outsidebardown then “[3]” else “”), color.black);

assignbackgroundColor(if TwoOneTwoBull or TwoTwoBull or ThreeBull or ThreeOneTwoBull then color.cyan else if TwoOneTwoBear or TwoTwoBear or ThreeBear or ThreeOneTwoBear then color.magenta else if

!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
twoup then color.green else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
twodown then color.red else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
outsidebarup then color.dark_green else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
insidebarup then color.light_green else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
outsidebardown then color.dark_red else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
insidebardown then color.orange else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
!insidebarup and
!insidebardown and
insidebar then color.white else if

!TwoOneTwoBull and
!TwoTwoBull and
!ThreeBull and
!ThreeOneTwoBull and
!TwoOneTwoBear and
!TwoTwoBear and
!ThreeBear and
!ThreeOneTwoBear and
!outsidebardown and
!outsidebarup and
outsidebar then color.white

else color.current);

Here's what how they appear:
JXfTMz6.png


USER MOD BY BOB'S A STRATTER (THANK'S BOB!)

gmLABfX.png

Code:
#------------------------------------
#
#        M T F      S T R A T
#         W A T C H L I S T
# a Study by Ramon DV. aka Pelonsax
# Modified by Bob's a Stratter
#
#------------------------------------
#------------------------------------
# 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
#
#------------------------------------
plot O = open;
def H = high;
def L = low;

def C = close;
#------------------------------------
# DEFINE SCENARIOS
#------------------------------------
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 insidebarup  = insidebar and O < C;
def twoup  = H > H[1] and L >= L[1];
def outsidebarup  = outsidebar and O < C;
def insidebardown  = insidebar and O > C;
def twodown  = H <= H[1] and L < L[1];
def outsidebardown  = outsidebar and O > C;
#------------------------------------
# LABEL SECTION
#------------------------------------

AssignBackgroundColor(
if
twoup then Color.GREEN else if
twodown then Color.RED else if
outsidebarup then Color.DARK_GREEN else if
insidebarup then Color.LIGHT_GREEN else if
outsidebardown then Color.DARK_RED else if
insidebardown then Color.ORANGE else if
!insidebarup and
!insidebardown and
insidebar then Color.WHITE else if
!outsidebardown and
!outsidebarup and
outsidebar then Color.YELLOW else Color.CURRENT);
addlabel(yes, O, color.black);

COMPLETE TIME FRAME CONTINUITY STUDY WITH BACKGROUND COLOR AND ALERTS

THIS STUDY HAS BEEN INCORPORATED INTO THE TIME FRAME CONTINUITY STUDY AT THE TOP

DO NOT LOAD THIS ON THE WHITE PRELOADED CHARTS. THEY ALREADY HAVE A VERSION THAT DOESN'T CHANGE THE BACKGROUND COLOR


This study incorporates the same elements of the previous TFC studies in one complete script. You can place this script on any chart in any time frame and it will work, but there is a catch and there is nothing anyone can do to change it: like ANY multi time frame study in tThink or Swim, this WILL NOT use the aggregations for time frames that are lower than the chart. This means that it will not draw or consider the open for a lower time frame (for example any intraday TF on a daily chart. I recommend that you use a grid with multiple time frames in order to make the best use of this study. When you place this on a chart, you must check to see how much data you are providing. For example, if you are on a 1min 1D chart, you have only two days worth of data, so you cannot use any time frame higher than a day. In order to use the week or month or year, you would need the chart to include a week, month, year's worth of time. Once you have the time frame the chart is set to and the amount of time that is on the chart, you should go into the settings and select "No" for any time frames that are not included. For example: If you use a 5 min 10 D chart, you should select "no" on Use Minute, Use Three, Use Month, Use Year. If you are only looking for intraday time frame continuity, you should select Use Minute through Use Hour. The study changes the background color of the chart when there is FTFC to the upside (green) or to the downside (red). If the background is black, there is no FTFC. It also has the highest and lowest open levels painted as cyan and magenta lines (like the previous studies) as well as arrows wherever there is FTFC. You can choose to not display only of the elements listed above with the exception of the background color. I recommend you allow the use of the lines and labels when you first place the study on the chart so that you can be sure that you are displaying time frame continuity correctly or as desired. There is also an audible alert. Here's what it looks like:

vPDRqbR.png


LOQAqlt.png




Here's the study link:
https://tos.mx/JZROQzW

Here's the code:
Code:
#-------------------------------
#
# S T R A T    O P E N S
#
# a study that indicates the opens
# on mutliple time frames
# for full time frame continuity INTRADAY
# and FULL. All in one.
# Author: Ramon DV aka Pelonsax
#
#--------------------------------
declare upper;
# -----------------------------------
# INPUTS
# -----------------------------------
input Use_Minute = yes;
input Use_Three = yes;
input Use_Five = yes;
input Use_Fifteen = yes;
input Use_Thirty = yes;
input Use_Sixty = yes;
input Use_Day = yes;
input Use_Week = yes;
input Use_Month = yes;
input Use_Year = yes;
input Show_Lines = yes;
input Show_Arrows = yes;
input Show_Label = yes;
# -----------------------------------
# 1 Minute
# -----------------------------------
def "1mAGG" = AggregationPeriod.MIN;
def Vminute = GetAggregationPeriod() <= AggregationPeriod.MIN;
def minute;
if Use_Minute and Vminute {
    minute = open(period = "1mAGG");
} else {
    minute = open;
}
# -----------------------------------
# 3 Minute
# -----------------------------------
def "3mAGG" = AggregationPeriod.THREE_MIN;
def Vthree = GetAggregationPeriod() <= AggregationPeriod.THREE_MIN;
def three;
if Use_Three and Vthree {
    three = open(period = "3mAGG");
} else {
    three = open;
}
# -----------------------------------
# 5 Minute
# -----------------------------------
def "5mAGG" = AggregationPeriod.FIVE_MIN;
def Vfive = GetAggregationPeriod() <= AggregationPeriod.FIVE_MIN;
def five;
if Use_Five and Vfive {
    five = open(period = "5mAGG");
} else {
    five = open;
}
# -----------------------------------
# 15 Minute Line
# -----------------------------------
def "15mAGG" = AggregationPeriod.FIFTEEN_MIN;
def Vfifteen = GetAggregationPeriod() <= AggregationPeriod.FIFTEEN_MIN;
def fifteen;
if Use_Fifteen and  Vfifteen {
    fifteen = open(period = "15mAGG");
} else {
    fifteen = open;
}
# -----------------------------------
# 30 Minute Line
# -----------------------------------
def "30mAGG" = AggregationPeriod.THIRTY_MIN;
def Vthirty = GetAggregationPeriod() <= AggregationPeriod.THIRTY_MIN;
def thirty;
if Use_Thirty and Vthirty {
    thirty = open(period = "30mAGG");
} else {
    thirty = open;
}
# -----------------------------------
# 60 Minute Line
# -----------------------------------
def "60mAGG" = AggregationPeriod.HOUR;
def Vhour = GetAggregationPeriod() <= AggregationPeriod.HOUR;
def hour;
if Use_Sixty and Vhour {
    hour = open(period = "60mAGG");
} else {
    hour = open;
}
# -----------------------------------
# Day
# -----------------------------------
def "1DAGG" = AggregationPeriod.DAY;
def Vday = GetAggregationPeriod() <= AggregationPeriod.DAY;
def day;
if Use_Day and Vday {
    day = open(period = "1DAGG");
} else {
    day = open;
}
# -----------------------------------
# Week
# -----------------------------------
def "1wAGG" = AggregationPeriod.WEEK;
def Vweek = GetAggregationPeriod() <= AggregationPeriod.WEEK;
def week;
if Use_Week and Vweek {
    week = open(period = "1wAGG");
} else {
    week = open;
}
# -----------------------------------
# Month
# -----------------------------------
def "1MOAGG" = AggregationPeriod.MONTH;
def Vmonth = GetAggregationPeriod() <= AggregationPeriod.MONTH;
def month;
if Use_Month and Vmonth {
    month = open(period = "1MOAGG");
} else {
    month = open;
}
# -----------------------------------
# Year
# -----------------------------------
def "1YAGG" = AggregationPeriod.YEAR;
def Vyear = GetAggregationPeriod() <= AggregationPeriod.YEAR;
def year;
if Use_Year and Vyear {
    year = open(period = "1YAGG");
} else {
    year = open;
}

# -----------------------------------
# FTC COMPONENT
# -----------------------------------

# TOP

plot top = if minute >=
three and minute >=
five and minute >=
fifteen and minute >=
thirty and minute >=
hour and minute >=
day and minute >=
week and minute >=
month and minute >=
year then minute else

if three >=
minute and three >=
five and three >=
fifteen and three >=
thirty and three >=
hour and three >=
day and three >=
week and three >=
month and three >=
year then three else

if five >=
minute and five >=
three and five >=
fifteen and five >=
thirty and five >=
hour and five >=
day and five >=
week and five >=
month and five >=
year then five else

if fifteen >=
minute and fifteen >=
three and fifteen >=
five and fifteen >=
thirty and fifteen >=
hour and fifteen >=
day and fifteen >=
week and fifteen >=
month and fifteen >=
year then fifteen else

if thirty >=
minute and thirty >=
three and thirty >=
five and thirty >=
fifteen and thirty >=
hour and thirty >=
day and thirty >=
week and thirty >=
month and thirty >=
year then thirty  else

if hour >=
minute and hour >=
three and hour >=
five and hour >=
fifteen and hour >=
thirty and hour >=
day and hour >=
week and hour >=
month and hour >=
year then hour else

if day >=
minute and day >=
three and day >=
five and day >=
fifteen and day >=
thirty and day >=
hour and day >=
week and day >=
month and day >=
year then day else

if week >=
minute and week >=
three and week >=
five and week >=
fifteen and week >=
thirty and week >=
hour and week >=
day and week >=
month and week >=
year then week else

if month >=
minute and month >=
three and month >=
five and month >=
fifteen and month >=
thirty and month >=
hour and month >=
day and month >=
week and month >=
year then month else

if year >=
minute and year >=
three and year >=
five and year >=
fifteen and year >=
thirty and year >=
hour and year >=
day and year >=
week and year >=
month then year else

Double.NaN;

# BOTTOM

plot bottom = if minute <=
three and minute <=
five and minute <=
fifteen and minute <=
thirty and minute <=
hour and minute <=
day and minute <=
week and minute <=
month and minute <=
year then minute else

if three <=
minute and three <=
five and three <=
fifteen and three <=
thirty and three <=
hour and three <=
day and three <=
week and three <=
month and three <=
year then three else

if five <=
minute and five <=
three and five <=
fifteen and five <=
thirty and five <=
hour and five <=
day and five <=
week and five <=
month and five <=
year then five else

if fifteen <=
minute and fifteen <=
three and fifteen <=
five and fifteen <=
thirty and fifteen <=
hour and fifteen <=
day and fifteen <=
week and fifteen <=
month and fifteen <=
year then fifteen else

if thirty <=
minute and thirty <=
three and thirty <=
five and thirty <=
fifteen and thirty <=
hour and thirty <=
day and thirty <=
week and thirty <=
month and thirty <=
year then thirty  else

if hour <=
minute and hour <=
three and hour <=
five and hour <=
fifteen and hour <=
thirty and hour <=
day and hour <=
week and hour <=
month and hour <=
year then hour else

if day <=
minute and day <=
three and day <=
five and day <=
fifteen and day <=
thirty and day <=
hour and day <=
week and day <=
month and day <=
year then day else

if week <=
minute and week <=
three and week <=
five and week <=
fifteen and week <=
thirty and week <=
hour and week <=
day and week <=
month and week <=
year then week else

if month <=
minute and month <=
three and month <=
five and month <=
fifteen and month <=
thirty and month <=
hour and month <=
day and month <=
week and month <=
year then month else

if year <=
minute and year <=
three and year <=
five and year <=
fifteen and year <=
thirty and year <=
hour and year <=
day and year <=
week and year <=
month then year else
Double.NaN;

top.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
top.SetLineWeight(3);
top.SetDefaultColor(Color.CYAN);
top.SetHiding(!Show_lines);

bottom.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
bottom.SetLineWeight(3);
bottom.SetDefaultColor(Color.MAGENTA);
bottom.SetHiding(!Show_lines);

plot FTCUp = close crosses above top;
FTCUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
FTCUp.SetDefaultColor(Color.gray);
FTCUp.SetLineWeight(1);
FTCUp.SetHiding(!Show_Arrows);

plot FTCDN = close crosses below bottom;
FTCDN.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
FTCDN.SetDefaultColor(Color.gray);
FTCDN.SetLineWeight(1);
FTCDN.SetHiding(!Show_Arrows);

addlabel(Show_Label, "CONTINUITY UP " + asdollars(top) + " DOWN " + asdollars(bottom) + " ", color.light_gray);
addlabel(Show_Label, " USING: ", color.light_gray);
addlabel(Show_Label and Use_Minute, "1min ", color.light_gray);
addlabel(Show_Label and Use_Three, "3min ", color.light_gray);
addlabel(Show_Label and Use_Five, "5min ", color.light_gray);
addlabel(Show_Label and Use_Fifteen, "15min ", color.light_gray);
addlabel(Show_Label and Use_Thirty, "30min ", color.light_gray);
addlabel(Show_Label and Use_Sixty, "60min ", color.light_gray);
addlabel(Show_Label and Use_Day, "Day ", color.light_gray);
addlabel(Show_Label and Use_Week, "Week ", color.light_gray);
addlabel(Show_Label and Use_Month, "Month ", color.light_gray);
addlabel(Show_Label and Use_Year, "Year ", color.light_gray);
# -----------------------------------
# BACKGROUND COLOR
# -----------------------------------

DefineGlobalColor("UP”, CreateColor(000, 065, 000));
DefineGlobalColor("DOWN”, CreateColor(125, 000, 000));

assignBackgroundColor(if FTCUP then GlobalColor("UP") else if FTCDN then GlobalColor("DOWN") else color.black);
input Use_Alerts = yes;
Alert(Use_Alerts and FTCUP, "FTC Upside", Alert.BAR, Sound.Bell);
Alert(Use_Alerts and FTCDN, "FTC Downside", Alert.BAR, Sound.Bell);



BROADENING FORMATIONS (1ST DRAFT)

This study will only find 1-3 combos and extend diagonal lines outward. I wasn't going to release it yet because I'm waiting to really make it work with multi bar pivots, but someone asked for exactly this in the comments and since this one is ready now, here you go. Keep in mind that this is not exactly the same as a broadening formation as Rob describes it. (It is and it isn't. This is only one example of a broadening formation). It could come in handy if you want to run it on a higher time frame like the daily or weekly and then draw over the lines so that it shows up on the lower time frames. I have to credit Halcyon Guy (Don L.) who wrote the backbone and has given me permission to publish. I moded his version of a similar study that looks for wedges. This is basically the 2 bar inverse of his study.

7www253.png


3_1_Broadening_Formation
https://tos.mx/U6xvWgx

Code:
## ----------------------------------------
# BROADENING FORMATION
# A STRAT STUDY BY PELONSAX AKA RAMON DV
#
# ADAPTED FROM
# quadinsidebar_01
# 2020-06-27
# halcyonguy
# ----------------------------------------

input extend_lines = 100;

def na = double.nan;
def hi = high;
def lo = low;
def bn = barnumber();


# ----- 2 bar outside pattern ---------------------------------
def insidebar0 = hi < hi[-1] and lo > lo[-1];

def insidebar = insidebar0 or insidebar0[1];
def next = insidebar0[-1];

def pattern = fold i = 0 to extend_lines
                 with p
                 do if i > bn then p + 0 else p + GetValue(insidebar,i);

def extend = if (!next and pattern > 0) then 1 else 0;
def en_slopelines = extend;

# ===================================================================

def bargaps = 1;
def slopehi2 = (hi[-bargaps] - hi[0])/bargaps;
def slopelo2 = (lo[-bargaps] - lo[0])/bargaps;
def slopehi = if insidebar0 then slopehi2 else if en_slopelines then slopehi[1] else na;
def slopelo = if insidebar0 then slopelo2 else if en_slopelines then slopelo[1] else na;
def bar0number = if insidebar0 then barnumber() else if en_slopelines then bar0number[1] else na;
def bar0high = if insidebar0 then hi else if en_slopelines then bar0high[1] else na;
def bar0low = if insidebar0 then lo else if en_slopelines then bar0low[1] else na;

plot diaghi = if en_slopelines then ( bar0high + (slopehi * (barnumber() - bar0number))) else na;
diaghi.AssignValueColor(Color.dark_Green);
diaghi.SetStyle(Curve.MEDIUM_DASH);

plot diaglo = if en_slopelines then ( bar0low + (slopelo * (barnumber() - bar0number))) else na;
diaglo.AssignValueColor(Color.dark_green);
diaglo.SetStyle(Curve.MEDIUM_DASH);

#

# ------------------------------------------------------------------

#

!!ACTIONABLE SIGNAL SCANS!!

Rather than go into another lengthy description, I just decided to make a video and post the links.


1 Bar Rev Strat Daily
https://tos.mx/sml8vKo

2 Bar Rev Strat Daily
https://tos.mx/fUIotqN

Hammer Rev
https://tos.mx/A2w2Jkt

Inside Break Bull
https://tos.mx/JKIrGGZ

Kicking Bull
https://tos.mx/JLI4AXC

Link to James Fox’s STRAT Scan video:

UPDATE: 03/23/21 Tried to re-upload complete overlay charts with a new link because I noticed that they were set to use log scale. I noticed it messes with my drawings so I turn it off on all my charts. I think it's the best setting. Ill try to give y'all fresh links later (probably just a problem with TOS right now), but for now, to change it manually, it looks like this:

mAJ243X.png


UPDATE: 05/21/21 Updated strat numbers so that the 1's and 3's appear as white numbers below, the 2U is a green number above and the 2D is a red number below. Added that component to all REMIX studies. Added REMIX SUPER LITE for machines with performance issues. And lastly, I have added two flex grids, one that is only continuity labels, and another that is a full radar screen based on Alex Option's idea. There are video tutorials for each. I also removed the studies that have been incorporated into the REMIX or TFC master studies as well as older studies that were glitchy and I don't have time or desire to support.

UPDATE: 04/01/21 Updated Kicker Actionable signal to include opposite continuity for kick age and fixed bug with measured move. Streamlined thread removing studies that are now obsolete.

UPDATE: 02/28/21 Added TFC study to Pre-Loaded Color Overlay Charts. This is because the Complete TFC study at the top changes the color of the background which defeats the purpose of the color overlay chart on a white background. This is simply a condensed, simplified version of the TFC study. It will only work if the intraday chart is set to 1 minute and the full chart is set to 1 hour.

UPDATE: 02/28/21 Added additional new version of color script. Re-worked the colors to let each TF stand out.

UPDATE: 02/26/21 Added new color version of the overlay study. There are three separate versions, each a different shade.

UPDATE: 01/02/21 Corrected bug in watchlist columns. Then you very much for catching that @fishstick1229 !!!!!!

UPDATE: 10/19/20 Placed link for the two main studies at the top. Added set up tutorial video for two main (most recent studies). Removed older studies (Basic Four). Added Hammers_and_Shooters study. Added Actionable Signal Scans and video

UPDATE: 10/15/20 Made Background Color script all inclusive and MTF capable. Added specific type of actionable signal onto the alerts written into the Remix version

UPDATE: 10/14/20 Per request, added alerts for reversals to the Reversal Remix and Actionable Signal study. Added alert to Background Color FTC Study. Added 1st draft Broadening Formation study.
For the

HAMMERS AND SHOOTERS

is there a way i can keep my candle colors and change the colors of the hammer and shooter candles?
 

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
235 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