# Trend Reversal Indicator with Signals for ThinkorSwim

#### paperkutt247

##### New member
@BenTen still can't get it work for some reason can u create the scan and share it...Please

#### Shooters_Gotta_Shoot

##### Member
@Bobbydigital83 The best solution would probably be to use the moving averages ('mah' & 'mal') for selling. I made it so you can visualize the moving averages on the chart and helped a lot. Not good for buying for good for selling. Sell calls when 'close < mal' and sell puts when 'close > mah'. Seems like the best solution to me and works fairly well. All you need to do is figure out your buying criteria and use this to sell. The code below are the moving averages from @farout60 but now you can see them! Enjoy!

Code:
``````input method = {default average, high_low};

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;
plot mah = MovingAverage(averagetype, pricehigh, averagelength);
plot mal = MovingAverage(averagetype, pricelow, averagelength);
def priceh2 = if method == method.high_low then pricehigh else mah;
def pricel2 = if method == method.high_low then pricelow else mal;
def EI = ZigZagHighLow("price h" = priceh2, "price l" = pricel2, "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 == priceh2 then priceh2 else pricel2) - GetValue(EISave, 1);
def isUp = chg > 0;
def isDown = chg < 0;``````

M

#### Moose

##### Member
@farout60 the squeeze pro is it the same as TTM squeeze?

A

#### apex

##### New member
How is the stop loss calculated on this code, like which lines of code tell the program to set a stop loss.

Thanks

T

#### tem2005

##### Member
VIP
@scott69 any updates for results using it?

#### scott69

##### Member
@tem2005 Hi, thanks for the interest. I still have these running off to the side on smaller charts. One is a one minute chart, the other is a five minute chart. I've become a little addicted to this, because they are surprisingly accurate for generating entry signals. The one minute signal is a little earlier than I would use, and it repaints. The five minute is great for confirmation, as I would already be in a trade. I would be in because I think there is a few points to be gained based on my own system and price formations. Also, as has been discussed by better system traders than me on this board, the caveat is that they need to be combined with other indicators for confirmation. Just like many indicators used in isolation, they have difficulty in choppy markets. So, using an ADX, for example, or a momentum based indicator would tell you if you are in a period of sideways chop, and thus avoid the entries. I would be curious if someone actually uses this indicator faithfully to generate trades and what the results are. My observation is that the signals on the one minute are right much more than they are wrong. You can't back test it because it does repaint, although if you do take a trade based on the signal, and then it recalcs and repaints to turn off, the actual successful signal is usually soon after. So if you do try to take trades based on the signal , you may want to wait a candle or two before entering. As I said, I'm usually in a trade within a few candles of this signal. One final general point, lately, the NQ, for example, seems to just reverse and take off for 100, 200 points, which is 10s of thousands of profits trading multiple mini contracts. That is not typical. And the market being up 200-300 points overnight is also not typical. These huge moves and sharp reversals are evidence of the volatile nature of politics, the economy, the pandemic, and people chasing yield and rotating funds. And this volatility can last for a while. So any system needs to adapt. In my experience, the successful system(s) will deal with the four market states. Trending/Volatile, Trending/Non-volatile, Range-bound/ Volatile, and Range-bound/Non-volatile. Good luck

T

#### tem2005

##### Member
VIP
@tem2005 Hi, thanks for the interest. I still have these running off to the side on smaller charts. One is a one minute chart, the other is a five minute chart. I've become a little addicted to this, because they are surprisingly accurate for generating entry signals. The one minute signal is a little earlier than I would use, and it repaints. The five minute is great for confirmation, as I would already be in a trade. I would be in because I think there is a few points to be gained based on my own system and price formations. Also, as has been discussed by better system traders than me on this board, the caveat is that they need to be combined with other indicators for confirmation. Just like many indicators used in isolation, they have difficulty in choppy markets. So, using an ADX, for example, or a momentum based indicator would tell you if you are in a period of sideways chop, and thus avoid the entries. I would be curious if someone actually uses this indicator faithfully to generate trades and what the results are. My observation is that the signals on the one minute are right much more than they are wrong. You can't back test it because it does repaint, although if you do take a trade based on the signal, and then it recalcs and repaints to turn off, the actual successful signal is usually soon after. So if you do try to take trades based on the signal , you may want to wait a candle or two before entering. As I said, I'm usually in a trade within a few candles of this signal. One final general point, lately, the NQ, for example, seems to just reverse and take off for 100, 200 points, which is 10s of thousands of profits trading multiple mini contracts. That is not typical. And the market being up 200-300 points overnight is also not typical. These huge moves and sharp reversals are evidence of the volatile nature of politics, the economy, the pandemic, and people chasing yield and rotating funds. And this volatility can last for a while. So any system needs to adapt. In my experience, the successful system(s) will deal with the four market states. Trending/Volatile, Trending/Non-volatile, Range-bound/ Volatile, and Range-bound/Non-volatile. Good luck
Thank you very much for the much rich response. I appreciate it. Have you tried it on hourly daily ..etc?

#### scott69

##### Member
I only use it on the 1 & 5 minute charts for alerts to entry possibilities. There are longer term position traders and investors here that may use it on longer time frames for equities, but I think most are swing or day traders involved in options, futures and ETFs. Trading the NQs in today's environment, it would be financial suicide to hold multiple contracts for hours or days.

T

#### tem2005

##### Member
VIP
@scott69 I thought that signal would appear after 2 ahead more days closed for a daily signal to show

#### scott69

##### Member
@tem2005 You are probably right. I never even looked at it on a time frame longer than 5 minutes. I think that if I would trade with weeks / months / years as my timeframe, I would highly consider what is going on in the general economy for my overview, then try to find very oversold instruments for a placement. To be honest, I usually put 6-7 figures into a S&P 500 fund as soon as the SPX has a decline of 50%, and scale in more as it declines further. I also will put more money in as it rallies 30% or more (based on how big the retracements are during the decline). The last time I did this was in 2009-2010. Full disclosure, I just closed out all of my S&P holdings and went to cash. I also closed out all of my bond portfolio. I may miss more of a rally, but at my age I really don't feel like suffering 30-50% draw downs on the sums of money I put in my "core" holdings. I definitely would not be initiating long term core holdings at this point in the cycle. I'm not sure if I will do this strategy for myself anymore, but I will do it for my teenage child in her "core" holdings. My strategy only works if your time horizon is 5 - 10 years. I know, some will say that this strategy could really backfire, but I have done it in three bear markets now, and it gets painful at times, but the payoffs are spectacular.

T

#### tem2005

##### Member
VIP
@scott69 I reread your response and learned so much. Do you mange to get sound alerts once each arrow appears?

#### scott69

##### Member
@tem2005 The signals from the 1 and 5 minute charts with this indicator seem to be pretty good, but they need to be filtered out with other indicators (such as the ADX) to make sure you are not getting signals during a congestion period, which would cause many whipsaws. Try keeping this one running while you are looking at your other "base" charts to see if they are coming when you would otherwise be entering trades. If they do, and seem reliable, you've got a money maker. But do watch them for a while to see if they are early, late or of poor quality.

Last edited:
T

#### Thomas

##### Active member
VIP
@BenTen still can't get it work for some reason can u create the scan and share it...Please

S

#### sshaniga

##### New member
VIP
@farout60 Thanks for sharing Which time frame would this work best on if I am swing trading!

N

##### New member
This indicator looks great in back test, however in real time not so much, i suggest, you use it with another indicator for confirmation

#### MerryDay

##### Active member
VIP
@novadolla the indicator repaints. It can not be backtested.

N

##### New member
@novadolla the indicator repaints. It can not be backtested.
Maybe I used the wrong terminology. Just looking back at the signals, the results looks great, however back testing it via TOS Ondemand not so much

Last edited:

#### FreefallJM03

##### New member
VIP
I couldn't get the scanner to work, but this reversal indicator works great if you use it in conjunction with the "Buy the Dip" indicator you made. The BTD often will hit before this does, but it will be outside your criteria for BTD, but not for this indicator. Usually, I will see a BTD indicator 4-8 bars before the reversal indicator shows up on a daily chart. I also recommend before buying look at the stock behavior in previous "reversals" and see how well it has behaved in previous cycles. You can also do a replay of it and see if it repainted during any of the previous reversals. I had a 17.9% return on CZZ, a 23.9% return on IPI, 9.5% on IVC, and 21.3% on USX. Both of my current trades are also doing well with a 2.3% and 1.9% return since Friday. My target on one is at least 102 (I bought at 90.50) and the other is \$30 (I bought it at 25.74). It would be great to see how this scanner works.

#### BenTen

Staff
VIP
@FreefallJM03 Thanks for sharing your experience. How did you set up your scanner? Can you post a screenshot of it?

#### FreefallJM03

##### New member
VIP
@FreefallJM03 Thanks for sharing your experience. How did you set up your scanner? Can you post a screenshot of it?
When I pull up the scan, it asks for things like "offset, plot, etc, then to the right it shows a menu of options for 'crosses' 'crosses below' 'crosses above' I tried to paste a screen shot, but it wouldn't let me.