Repaints Trend Reversal for ThinkorSwim

Repaints
Status
Not open for further replies.
Oil (CL) today is a great example - has been in consolidation all day in my view so I have not taken a trade. Take a look at FE - has shown consolidation for most of the day and supported by other indicators as well.



sj1PSLi.png
Hello MC01439, Can you share the link to the energy price filter that is in the picture? Thank you.
 

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

Thank you kindly. What is the blue line running down the center in the picture?
@Rojo Grande - That is a combination of several different indicators to form one indicator (my take of the Binary Wave). The window has the Binary Wave and the Laguerre in one window to make for a cleaner chart. This old guy needs the price window to dominate the screen.

https://tos.mx/819qdsG
 
This reversal label seems to work best on higher time frames. I've also noticed that if all TF have same signal premarket that the stock will usually go in that direction. Is it possible to build dynamic watchlist columns for this indicator? I use other signals too but it would be really nice on a watchlist for different TFs.
 
@MBF Simplest way for now is to save your scanner (for this indicator) as a watchlist and they should update regularly. Be sure to have them displayed on your sidebar.
 
  • Like
Reactions: MBF
@2sureshk Try this. Add it as a Strategy.

Code:
# Trend Reversal Scanner
# Scanner by https://usethinkscript.com/u/theelderwand
# Discuss https://usethinkscript.com/d/183-trend-reversal-indicator-with-signals-for-thinkorswim

# Modified into a Strategy for backtesting. Not recommended since this indicator reapaint.

def price = close;
def superfast_length = 9;
def fast_length = 14;
def slow_length = 21;
def displace = 0;

def mov_avg9 = ExpAverage(price[-displace], superfast_length);
def mov_avg14 = ExpAverage(price[-displace], fast_length);
def mov_avg21 = ExpAverage(price[-displace], slow_length);

#moving averages
def Superfast = mov_avg9;
def Fast = mov_avg14;
def Slow = mov_avg21;

def buy = mov_avg9 > mov_avg14 and mov_avg14 > mov_avg21 and low > mov_avg9;
def stopbuy = mov_avg9 <= mov_avg14;
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);

def Buy_Signal = buysignal[1] == 0 and buysignal == 1;
def Momentum_Down = buysignal[1] == 1 and buysignal == 0;

def sell = mov_avg9 < mov_avg14 and mov_avg14 < mov_avg21 and high < mov_avg9;
def stopsell = mov_avg9 >= mov_avg14;
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);
def Sell_Signal = sellsignal[1] == 0 and sellsignal;


input method = {default average, high_low};
def bubbleoffset = .0005;
def percentamount = .01;
def revAmount = .05;
def atrreversal = 2.0;
def atrlength = 5;
def pricehigh = high;
def pricelow = low;
def averagelength = 5;
def averagetype = AverageType.EXPONENTIAL;
def mah = MovingAverage(averagetype, pricehigh, averagelength);
def mal = MovingAverage(averagetype, pricelow, averagelength);
def priceh = if method == method.high_low then pricehigh else mah;
def pricel = if method == method.high_low then pricelow else mal;
def EI = ZigZagHighLow("price h" = priceh, "price l" = pricel, "percentage reversal" = percentamount, "absolute reversal" = revAmount, "atr length" = atrlength, "atr reversal" = atrreversal);
rec EISave = if !IsNaN(EI) then EI else GetValue(EISave, 1);
def chg = (if EISave == priceh then priceh else pricel) - GetValue(EISave, 1);
def isUp = chg >= 0;
def EIL = if !IsNaN(EI) and !isUp then pricel else GetValue(EIL, 1);
def EIH = if !IsNaN(EI) and isUp then priceh else GetValue(EIH, 1);
def dir = CompoundValue(1, if EIL != EIL[1] or pricel == EIL[1] and pricel == EISave then 1 else if EIH != EIH[1] or priceh == EIH[1] and priceh == EISave then -1 else dir[1], 0);
def signal = CompoundValue(1, if dir > 0 and pricel > EIL then if signal[1] <= 0 then 1 else signal[1] else if dir < 0 and priceh < EIH then if signal[1] >= 0 then -1 else signal[1] else signal[1], 0);

def bullish2 = signal > 0 and signal[1] <= 0;
plot upArrow = bullish2;
upArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
upArrow.SetDefaultColor(CreateColor(145, 210, 144));

def bearish2 = signal < 0 and signal[1] >= 0;
plot downArrow = bearish2;
downArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
downArrow.SetDefaultColor(CreateColor(255, 15, 10));

AddOrder(OrderType.BUY_TO_OPEN, condition = bullish2, price = close,100, tickcolor = Color. GREEN, arrowcolor = Color.GREEN, name = "BUY");

AddOrder(OrderType.SELL_TO_CLOSE, condition = bearish2, price = close,100, tickcolor = Color.RED, arrowcolor = Color.RED, name = "SELL");

Hi @BenTen Thanks for putting the work. I am relatively new to TOS and really excited to put this into work. I have set up both the study/indicator and the above as strategy.
I already performed back testing and seems it is good.
My next step is try few manual trades real time from the generated signal for a few days and see the results.
My question is how will I enable automatic trading in TOS based on the generated signal with S/L?
 
@pdxtrader Before you get all hyped up, I'd thought I should let you know that this indicator repaints. Which means all the false signals will disappear. What you see on your chart is just the right signals (and that's kind of misleading if you don't know what you're doing or not familiar with this type of indicator). I would recommend watching it live first and see how the signal react in real-time.
 
I tried to run the scan associated with this indicator and couldn't get it to return any results. I wanted to if there may be something obvious that I may be missing. All suggestions appreciated. Thanks!
 
@pdxtrader Before you get all hyped up, I'd thought I should let you know that this indicator repaints. Which means all the false signals will disappear. What you see on your chart is just the right signals (and that's kind of misleading if you don't know what you're doing or not familiar with this type of indicator). I would recommend watching it live first and see how the signal react in real-time.

I can try it in a paper money account, right and see the real results?
Also can u name a few strategy that are good but doesn't repaint?
Also what is the reason for not taking out the repaint thing?
 
@pdxtrader I'm not sure if you get real-time data with a paper trading account. The trend reversal indicator and this indicator both repaints. The reason being they're constantly looking for new highs and lows. As a result, we can't take out the repainting. Check out our Explore page and see if it can be helpful.
Well even if the paper trading account is 10mins or so behind, we still can do some trading with paper money with TR strategy to see how much it can pull.
Also I am thinking to put this TR indicator on those ETFs(JNUG, DGAZ, UGAZ, UWT etc) that are more volatile.
So back to the Q, how can I buy/sell automatically with this indicators.
 
Status
Not open for further replies.

BenTen's Watchlist + Setup + Trade Recaps

Get access to Ben's watchlist, swing trading strategy, ThinkorSwim setup, and trade examples.

Learn more

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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