Trend Reversal Indicator with Signals for ThinkorSwim

BenTen

BenTen

Administrative
Staff
VIP
@spencepuppy I'm currently using our Buy the Dip indicator to trade. Although it's designed for swing trading, some of our members have been using it to day trade. You can take a look at this thread to learn more.
 
I

imenmyself1234

New member
@BenTen Hi benten, can you pls tell me how can i replace that Reversal bubble with an arrow.
 
S

spencepuppy

New member
VIP
@spencepuppy I'm currently using our Buy the Dip indicator to trade. Although it's designed for swing trading, some of our members have been using it to day trade. You can take a look at this thread to learn more.
I've been considering purchasing it. I know it doesn't repaint, but is it delayed or lag by a certain amount of bars?
 
BenTen

BenTen

Administrative
Staff
VIP
@spencepuppy Our Buy the Dip indicator does not lag or delay.
 
F

farout60

New member
Recently joined and was happy to find some cool indicators so I wanted to share one of my own that I've been using to confirm bull or bear markets in a given time frame. I find that this has worked extremely well for me especially when you overlay Fisher Transform and use both together. Also, if you use JC SqueezePro, it does a good job of forecasting which way the squeeze will fire.

Let me know if you have any questions.

Code:
declare lower;


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;
def mah = MovingAverage(averagetype, pricehigh, averagelength);
def 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;

plot Bullish = isup;
Bullish.SetDefaultColor(Color.green);

plot Bearish = isDown;
Bearish.SetDefaultColor(Color.red);


# Alerts:
#
rec counter;
if (bullish) {
counter = 1;
} else {
if (counter[1] == 1 or counter[1] < 10) {
counter = counter[1] + 1;
} else {
counter = 1;
}
}

rec counterd;
if (bearish) {
counterd = 1;
} else {
if (counterd[1] == 1 or counterd[1] < 10) {
counterd = counterd[1] + 1;
} else {
counterd = 1;
}
}

def LongSignal = counterd == 3;
def ShortSignal = counter == 3;


# BLOCK CODE BELOW
input AlertSoundUP = {default “Bell”, “Chimes”, “Ding”, “NoSound”, “Ring”};
input AlertSoundDOWN = {“Bell”, “Chimes”, “Ding”, “NoSound”, default“Ring”};
alert(LongSignal , text = "UP UP UP", Alert.bar, AlertSoundUP);
alert(ShortSignal , text = "DOWN DOWN DOWN", Alert.bar, AlertSoundDOWN);
 
Last edited by a moderator:
allpozitiv

allpozitiv

New member
2019 Donor
VIP
@farout60 Thanks for sharing such simple and promising study. One thing I would like to ask if you can share mentioned JC SqueezePro study, as I did find it on forum, but willing to try.
 
rad14733

rad14733

Well-known member
VIP
Thanks for sharing such simple and promising study.
One thing I would like to ask if you can share mentioned JC SqueezePro study, as I did find it on forum, but willing to try.
You are asking for a member to share a paid indicator which is against forum rules... (n)
 
Last edited:
BenTen

BenTen

Administrative
Staff
VIP
@Bobbydigital83 No. If you compare it to the trend reversal posted on the first page of this thread, they're essentially the same.
 
rad14733

rad14733

Well-known member
VIP
Even don't know that this study is not free one. Sorry for that thing!
No problem... John Carter sells indicators, whether totally coded by him or "borrowed" free code from others that he tweaks (or not) and sells on his site... Some people share freely while others are just out to make a buck any way they can...
 
B

Bobbydigital83

Member
VIP
In the coding... what exactly do these 4 parameters do?
1. Percentage Reversal
2. Absolute Reversal
3. ATR Length
4. ATR Reversal

def EI = ZigZagHighLow("price h" = priceh2, "price l" = pricel2, "percentage reversal" = percentamount, "absolute reversal" = revAmount, "atr length" = atrlength, "atr reversal" = atrreversal);
 
rad14733

rad14733

Well-known member
VIP
In the coding... what exactly do these 4 parameters do?
1. Percentage Reversal
2. Absolute Reversal
3. ATR Length
4. ATR Reversal

def EI = ZigZagHighLow("price h" = priceh2, "price l" = pricel2, "percentage reversal" = percentamount, "absolute reversal" = revAmount, "atr length" = atrlength, "atr reversal" = atrreversal);
Check the ZigZagHighLow indicator that comes with TOS for the answer to that... You won't find the answer in the script posted above as it references ZigZagHighLow as an external Thinkscript study...
 
paperkutt247

paperkutt247

New member
@Joreha I tried to. But ThinkorSwim said it's too complex to work in real-time. I'll continue to look into it for now.
@BenTen Hi ben i know this is an old post but when adding this link into the scrip for scanner it states 'Exactly one plot to be expected' at bottom left coner and wont let me to click to ok it...is there another step I'm missing? https://tos.mx/vlVadom
 
S

Sir Sedgwicke

New member
Never mind, for some reason it is working now.

I have been using the following indicator (Trend Reversal) in the scanner and it's been working just fine. Now for some reason it doesn't want to co-operate and it is producing this error message. Error: Trying to self-assign a non-initialized rec: state.

Since I am not a coder, I don't know how to resolve this.
 
Last edited:
Shooters_Gotta_Shoot

Shooters_Gotta_Shoot

Member
@farout60 I really like this indicator from a directional standpoint. I've been looking for something like this. I've been trying to figure out if this "re-paints" due to the 'Zig-Zag' feature. Are you able to let me know if it re-paints or not?

[Update] I have been watching both settings today: the average and high-low. Doesn't seem like the average re-paints at all, but the high-low does. Probably because of the moving average in the script that smoothes the average setting out. Correct me if I'm wrong lol.
 
Last edited:

Similar threads

Top