Repaints B4 Balanced BB Breakout For ThinkOrSwim

Repaints
Status
Not open for further replies.
@barbaros,

Before I show screenshots on how to use this .....Check This out. Notice the support and resistance lines and how they line up exactly at 0 and 100. ... this is ....:
"# Fractal Pivots with Trend Lines
# Mobius
# V01.08.2012....."

Added to the script. It shows exactly where you are coming from and where you are going. I have it only overlaid for now.....But might make a nice addition. What are your thoughts.

 

New Indicator: Buy the Dip

Check out our Buy the Dip indicator and see how it can help you find profitable swing trading ideas. Scanner, watchlist columns, and add-ons are included.

Download the indicator

Great way to show zero and one hundred on the graph ....But make it the real support and resistance areas. Just thought it was supper cool and has plotted that way several times.
 
@barbaros,

Before I show screenshots on how to use this .....Check This out. Notice the support and resistance lines and how they line up exactly at 0 and 100. ... this is ....:
"# Fractal Pivots with Trend Lines
# Mobius
# V01.08.2012....."

Added to the script. It shows exactly where you are coming from and where you are going. I have it only overlaid for now.....But might make a nice addition. What are your thoughts.

Unfortunately, I don't have that indicator. Can you share the code? I can see if we can add it and it can be scaled with with the rest of the indicators. Since we don't have a percentage y-axis, it might be difficult.
 
Posted with Mobius code inserted. wanted to make myself seem useful. I feel useless here ...with you guys doing so much work. One day I will be able to code...LOL....I will delete that post once you take a look at it.
 
The MACDBB cones right up to the pivot. ....The dots turn gray and then reversal time. All very visual. Might just have to overlay the lower study.
 
@Chuck @barbaros
Guys why not use first green dot as an entry and first red dot as an exit instead of other techniques. I mean just scan for green dots then get in? I'm trying to understand how to use this indicator best.
That is the first thing I notice is the dot color change. But I like the other confirming signals. I trade /ES and just getting in on the dot reverses sometimes. I like to be in a stronger confirmed position before entry. I don't care for the head or tail of the fish ....the middle taste the best.
 
Posted with Mobius code inserted. wanted to make myself seem useful. I feel useless here ...with you guys doing so much work. One day I will be able to code...LOL....I will delete that post once you take a look at it.
Sorry bro. This is an upper study but we can change it to show the dots as arrows in the lower chart. However, this study is actually plotting at price axis, meaning the values are in dollars. If you are trading an equity that is around the same price as the BB plot values, then it may show, if not, like trading something like AMZN, will make the lower chart squished.
 
# Fractal Pivots with Trend Lines
# Mobius
# V01.08.2012

input n = 4;
input showLines = yes;
input showValues = no;
input showBarNumbers = no;

# Internal Script Reference
script LinePlot {
input BarID = 0;
input Value = 0;
input BarOrigin = 0;
def ThisBar = HighestAll(BarOrigin);
def ValueLine = if BarOrigin == ThisBar
then Value
else Double.NaN;
plot P = if ThisBar - BarID <= BarOrigin
then HighestAll(ValueLine)
else Double.NaN;
}
def h = high;
def l = low;
def bar = barNumber();
def PH;
def PL;
def hh = fold i = 1 to n + 1
with p = 1
while p
do h > getValue(h, -i);
PH = if (bar > n and
h == highest(h, n) and
hh)
then h
else double.NaN;
def ll = fold j = 1 to n + 1
with q = 1
while q
do l < getValue(low, -j);
PL = if (bar > n and
l == lowest(l, n) and
ll)
then l
else double.NaN;
def PHBar = if !isNaN(PH)
then bar
else PHBar[1];
def PLBar = if !isNaN(PL)
then bar
else PLBar[1];
def PHL = if !isNaN(PH)
then PH
else PHL[1];
def priorPHBar = if PHL != PHL[1]
then PHBar[1]
else priorPHBar[1];
def PriorPH = if PHL != PHL[1]
then PHL[1]
else PriorPH[1];
def PLL = if !isNaN(PL)
then PL
else PLL[1];
def PriorPLBar = if PLL != PLL[1]
then PLBar[1]
else priorPLBar[1];
def PriorPL = if PLL != PLL[1]
then PLL[1]
else PriorPL[1];
def HighPivots = bar >= highestAll(priorPHBar);
def LowPivots = bar >= highestAll(priorPLBar);
def FirstRpoint = if HighPivots
then bar - PHBar
else 0;
def PriorRpoint = if HighPivots
then bar - PriorPHBar
else 0;
def RSlope = (getvalue(PH, FirstRpoint) - getvalue(PH, PriorRpoint))
/ (PHBar - PriorPHBar);
def FirstSpoint = if LowPivots
then bar - PLBar
else 0;
def PriorSpoint = if LowPivots
then bar - PriorPLBar
else 0;
def SSlope = (getvalue(PL, FirstSpoint) - getvalue(PL, PriorSpoint))
/ (PLBar - PriorPLBar);
def RExtend = if bar == highestall(PHBar)
then 1
else RExtend[1];
def SExtend = if bar == highestall(PLBar)
then 1
else SExtend[1];
plot PriorPHLine = LinePlot(PriorRPoint, PriorPH, PriorPHBar);
PriorPHLine.SetStyle(Curve.Firm);
PriorPHLine.SetDefaultColor(Color.Red);
plot PivotHighLine = LinePlot(FirstRPoint, PH, PHBar);
PivotHighLine.SetStyle(Curve.Firm);
PivotHighLine.SetDefaultColor(Color.Red);
plot pivotHigh = if HighPivots
then PH
else double.NaN;
pivotHigh.SetDefaultColor(GetColor(1));
pivotHigh.setPaintingStrategy(PaintingStrategy.VALUES_ABOVE);
pivotHigh.setHiding(!showValues);
plot RLine = pivotHigh;
RLine.enableApproximation();
RLine.SetDefaultColor(GetColor(7));
RLine.SetStyle(Curve.Short_DASH);
plot RExtension = if RExtend
then (bar - PHBar) * RSlope + PHL
else double.NaN;
RExtension.SetStyle(Curve.Short_DASH);
RExtension.SetDefaultColor(GetColor(7));
plot PriorPLLine = LinePlot(PriorSPoint, PriorPL, PriorPLBar);
PriorPLLine.SetStyle(Curve.Firm);
PriorPLLine.SetDefaultColor(Color.Green);
plot PivotLowLine = LinePlot(FirstSPoint, PL, PLBar);
PivotLowLine.SetStyle(Curve.Firm);
PivotLowLine.SetDefaultColor(Color.Green);
plot pivotLow = if LowPivots
then PL
else double.NaN;
pivotLow.SetDefaultColor(GetColor(1));
pivotLow.setPaintingStrategy(PaintingStrategy.VALUES_ABOVE);
pivotLow.setHiding(!showValues);
plot SupportLine = pivotLow;
SupportLine.enableApproximation();
SupportLine.SetDefaultColor(GetColor(7));
SUpportLine.SetStyle(Curve.Short_DASH);
plot SupportExtension = if SExtend
then (bar - PLBar) * SSlope + PLL
else double.NaN;
SupportExtension.SetDefaultColor(GetColor(7));
SupportExtension.SetStyle(Curve.Short_DASH);
plot BN = bar;
BN.SetDefaultColor(GetColor(0));
BN.setHiding(!showBarNumbers);
BN.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);
plot PivotDot = if !isNaN(pivotHigh)
then pivotHigh
else if !isNaN(pivotLow)
then pivotLow
else double.NaN;
pivotDot.SetDefaultColor(GetColor(7));
pivotDot.SetPaintingStrategy(PaintingStrategy.POINTS);
pivotDot.SetLineWeight(3);

# End Code Pivots with Projections
This would be interesting to use as the upper study with the Balanced BB Breakout study. I'm not familiar with it. How is it supposed to be used?
 
This piece of code.

Code:
   def hh = fold i = 1 to n + 1
            with p = 1
            while p
            do h > getValue(h, -i);

Notice the negative value in the second parameter to getValue(). It is looking ahead. So, when it plots, it is probably 2 bars late.

I'll watch it tomorrow to see if it can provide value to the lower study.
 
This piece of code.

Code:
   def hh = fold i = 1 to n + 1
            with p = 1
            while p
            do h > getValue(h, -i);

Notice the negative value in the second parameter to getValue(). It is looking ahead. So, when it plots, it is probably 2 bars late.

I'll watch it tomorrow to see if it can provide value to the lower study.
If Mobius coded it ...it was for a reason
 
BB Breakout
For those having trouble with the indicator showing correctly, where the lines and plots are all compressed along the bottom, try the suggestion @barbaros suggested. Uncheck the show plot for the teal data line and it fixes the issues. Not sure why, but it works! Thanks!!!
 
@Chuck or @barbaros, quick (stupid) question, any rhyme or reason for the differences in P/L with 15M T/F but diff Daily inputs? Is that just projected possible P/L?

Thanks


So the profit calculator uses the chart settings for 1st bar (first bar on chart example 1 day chart)to start the strategy and calculates P/L for the amount of trades for 1 day. If you select a two day chart it will go back 2 days and start at first bar etc.
 
Last edited:
Status
Not open for further replies.

Volatility Trading Range

VTR is a momentum indicator that shows if a stock is overbought or oversold based on its Weekly and Monthly average volatility trading range.

Download the indicator

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
273 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top