Repaints B4 Balanced BB Breakout For ThinkOrSwim

Repaints
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

Uninstalled TOS, tried all versions. And then I finally took the indicator off my chart and reinstalled it and BAM, it showed up. Just documenting incase someone else has similar problems.

@Chuck It sounds like you may have had a corrupt chart panel... Wiping it clean sometimes works but when I have problems with a detached panel I just delete and rebuild the entire window... I've had to do this on at least several occasions...
 
@Chuck It sounds like you may have had a corrupt chart panel... Wiping it clean sometimes works but when I have problems with a detached panel I just delete and rebuild the entire window... I've had to do this on at least several occasions...
I will rebuild the panel as well. Thank you for your input.
 
# MACD Strategy
# Mobius
# V.01.07.2012

#hint: The MACD Strategy uses a MACD to generate Buy and Sell signals.
# \n In the dafault mode it is always in the #market either Long or Short.
# \n A Fractal Choppiness Indicator is used to #disable the Buy signal when
# the equity is in a Choppy Zone.
# \n Hints are at each variable click on the ? #icon.
#wizard input: n_f
#wizard text: n_f:
#hint n_f: Periods for the Fast EMA.
#wizard input: n_s
#wizard text: n_s:
#hint n_s: Periods for the Slow EMA.
#wizard input: n_n
#wizard text: n_n:
#hint n_n: Period for the Slow EMA Smoothing Function.
#wizard input: SellEndOfDay
#wizard text: SellEndOfDay:
#hint SellEndOfDay: Yes = Postion closed at the end of the day.
# \n The signal is sent on the opening of the #next bar so make
# sure to leave enough time for the close to #be carried out.
#wizard input: CloseTime
#wizard text: CloseTime:
#hint CloseTime: Time is Eastern Standard Time.
#wizard input: MinBeforeClose
#wizard text: MinBeforeClose:
#hint MinBeforeClose: Minutes before 1600 when the signal #is assigned.
# \n The close will actually happen at the open #of the following bar.
#wizard input: nC
#wizard text: nC:
#hint nC: Periods for the calculation of the Fractal Choppiness Indicator.
#wizard input: nCA
#wizard text: nCA:
#hint nCA: Periods to calculate the Average value for the Fractal Choppiness Indicator.
#wizard input: Choppy
#wizard text: Choppy:
#hint Choppy: Value indicating the beginning of the Choppy #Zone.
# \n (Usually a value between 50 and 61.8)
# \n Buy Signals will not be generated in #the Choppy Zone.
# \n To disable this feature set the Value #at 100.
#wizard input: CIx
#wizard text: CIx:
#hint CIx: CIB uses the Choppiness Indicators (B)ase line #as the signal line.
# \n CIA uses the (A)verage of the #Choppiness Indicator.

input n_f = 13;
input n_s = 21;
input n_n = 8;
input SellEndOfDay = yes;
input CloseTime = 1600;
input MinBeforeClose = 10;
input nC = 34;
input nCA = 8;
input Choppy = 61.8;
input CIx = {default CIB, CIA};

def o = open;
def h = high;
def l = low;
def c = close;
def Seconds = MinBeforeClose * 60;
def secondsRemained = SecondsTillTime(CloseTime);
def F = (c * .15) + (.85 * ExpAverage(c, n_f)[1]);
def SS = (c * .075) + (.925 * ExpAverage(c, n_s)[1]);
def MACD = F - SS;
def MACDSL = ExpAverage(MACD, n_n);
def zero = 0;

# Fractal Choppiness Indicator

def CIA = 100 * Log( Sum( TrueRange(h, c, l), nC))
/ ( Highest(c[1], nC) - Lowest(c[1], nC))
/ Log(nC);

def CIB = ((Log(Sum(TrueRange(h, c, l), nC) /
(Highest(if h >= c[1]
then h
else c[1], nC) - Lowest( if l <= c[1]
then l
else c[1], nC))) / Log(10)) / (Log(nC) / Log(10))) * 100;
def CI = if CIx == CIx.CIB
then CIB
else CIA;
def CIavg = Average(CI, nCA);
def ex = if CIavg > Choppy
then 1
else 0;

# Chart Management
AssignPriceColor(if ex == 1
then Color.YELLOW
else if MACD > 0 and
MACD > MACD[1] and
MACD[1] > MACD[2]
then Color.GREEN
else if MACD < 0 and
MACD > MACDSL
then Color.GRAY
else if MACD crosses above 0
then Color.WHITE
else if MACD crosses below 0
then Color.BLUE
else Color.RED);

# Order Management

def buy = ex != 1 and
( MACD > MACDSL and
MACD > 0 or
MACD crosses Lowest(MACD, n_s));
def sell = if SellEndOfDay == yes
then
( secondsRemained >= 0 and
secondsRemained <= Seconds
) or
( MACD < MACDSL and
MACDSL < MACDSL[1] and
MACDSL[1] > MACDSL[2]
) or
MACD crosses below 0
or
MACD crosses Highest(MACD, n_s)
else
( MACD < MACDSL and
MACDSL < MACDSL[1] and
MACDSL[1] > MACDSL[2]) or
MACD crosses below 0 or
MACD crosses Highest(MACD, n_s)
;

AddOrder(OrderType.BUY_AUTO, condition = buy,
price = open,
tickcolor = Color. GREEN,
arrowcolor = Color.GREEN,
name = "BUY");

AddOrder(OrderType.SELL_AUTO, condition = sell,
price = open,
tickcolor = Color.RED,
arrowcolor = Color.RED,
name = "SELL");

# End Code
@Chuck I see a big problem with this strategy, besides that it is not complete. The buy and sell orders are entered with "open" instead of "open[-1]". Meaning, the price accounted for entry is the open of the bar that generates the signal. Unless I am reading this incorrectly, this is not feasible strategy.
 
Their is a MACD strat from mobius that does better than any stratify I ever tested. It owls probably take you 10 min to try.
I tried it today me had errors.

I feel like if we had anything else he needs to be able to outperform.
My impression is that you would not get as good entry and exit alerts. HA is better at predicting trends. The issue will always be finding one exit trigger. In most cases it will require a few indicators. The ultimate trigger is a trade plan with targets and exits already defined either manually or mechanically.
 
My impression is that you would not get as good entry and exit alerts. HA is better at predicting trends. The issue will always be finding one exit trigger. In most cases it will require a few indicators. The ultimate trigger is a trade plan with targets and exits already defined either manually or mechanically.
I agree. RSM has targets and stoploss. I wonder if we can incorporate that. If all conditions match => entry, and exit is either other indicators (may be) exit or we reach RSM targets or stoploss.
 
I agree. RSM has targets and stoploss. I wonder if we can incorporate that. If all conditions match => entry, and exit is either other indicators (may be) exit or we reach RSM targets or stoploss.
Yes. It would be very easy to reuse the code in RSM that does the ADR/ATR calculations, stop loss and target plots. Only thing that needs to change are the main conditions on which to start plots.
 
Maybe thats why I had 20 enties and exits all over the place... LOL. When I run it through a PL it always shows up high. No problem. Thanks for schooling me on this. I dont know much about all this stuff. I appreciate the straight forward approach your reply.
 
The one thing I do know is I am enjoying using this indicator. And I appreciate all the feedback and input.
 
I have a problem using a similar one. How do I disable being able to take a short position, so instead of a SELL_AUTO it would basically be "close order"
 
Noob here... Any ideas of why the cloud and plots are not showing correctly? They all seem to be dragging along the bottom and not rising if that makes sense. I've tried wiping my graph window, resetting defaults, reading and reading some more. But can't seem to figure out why it's not displaying correctly. Not sure how to share a screenshot, even though I have one. BTW, really blown away from what I've learned from you all here. I'm a little over 6 weeks into this new found passion and feel like a kid in a candy store. Thank you all for the great knowledge and insight. Good luck all!
 
Status
Not open for further replies.

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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