Xtreme Vortex Bundle Indicator for ThinkorSwim

chewie76

Well-known member
VIP
VIP Enthusiast
This is TOS's standard Vortex Indicator with a new XTREME twist.

What's new? I added a yellow midline. I added upper and lower gray target lines that you can change in the input settings based on your trading style. Default settings are 0.80 for the lower target and 1.15 for the upper target. When the Vortex lines have extended past the target lines, you will see these dots on the midline. There are 4 colored dots. Pink = caution sell, red = sell, light green = caution buy, and green = buy. The "caution" dots can be turned on/off in the input settings. In the upper indictor, instead of dots, they are arrows. The "caution" arrows can be turned on/off in the input settings of the upper chart.

There are also colored candles included with this indicator that can be turned on/off in the input settings. There are 4 colors. Green is strong buying, light green is weak buying, red is strong selling and yellow is weak selling.

NOTE: No indicator is perfect. You will notice when there is MAJOR buying or MAJOR selling, you will see reversal signals, yet the stock will continue going in the direction of the trend. In this case, placing a sell order below the previous candle's low on an uptrend and a buy order above the previous candle's high on a downtrend may be a good entry strategy.

Here is an example of /ES. The first picture includes the caution signals, the second picture removes the caution signals.

MVDtq6E.png


G3CtVnJ.png


Upper Indicator Code:
http://tos.mx/J2R9JjS

UPPER CODE:

#XTREME VORTEX Indicator Upper
#assembled by Chewie
#available on UseThinkScript.com
#https://usethinkscript.com/threads/xtreme-vortex-bundle-indicator-for-thinkorswim.4218/

declare UPPER;

input length = 14;
input Lower = 0.80;
input Upper = 1.15;
input Caution = yes;
input Price_Color = no;

def trSum = sum(TrueRange(high, close, low), length);
def "VI+" = if trSum == 0 then 0 else sum(AbsValue(high - low[1]), length) / trSum;
def "VI-" = if trSum == 0 then 0 else sum(AbsValue(low - high[1]), length) / trSum;

def MIDDLE = 1;

#Candle Colors
assignpriceColor(if Price_Color AND "VI+" > "VI-" then color.dark_green else color.current);
assignpriceColor(if Price_Color AND "VI+" < "VI-" then color.red else color.current);
assignpriceColor(if Price_Color AND "VI+" > "VI-" AND "VI+" < "VI+"[1] then color.light_green else color.current);
assignpriceColor(if Price_Color AND "VI+" < "VI-" AND "VI-" < "VI-"[1] then color.yellow else color.current);

# Plot Arrows

plot BUY = "VI+" <= lower and "VI-" >= upper and "VI+" > "VI+"[1] and "VI-" < "VI-"[1];
BUY.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_up);
BUY.SetDefaultColor(Color.DARK_GREEN);
BUY.setLineWeight(2);

plot SELL = "VI-" <= lower and "VI+" >= upper and "VI-" > "VI-"[1] and "VI+" < "VI+"[1];
SELL.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
SELL.SetDefaultColor(Color.red);
SELL.setLineWeight(2);

plot CAUTIONBUY = caution and "VI+" <= lower and "VI-" >= upper;
CAUTIONBUY.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_up);
CAUTIONBUY.SetDefaultColor(Color.LIGHT_GREEN);
CAUTIONBUY.setLineWeight(1);

plot CAUTIONSELL = caution and "VI-" <= lower and "VI+" >= upper;
CAUTIONSELL.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
CAUTIONSELL.SetDefaultColor(Color.PINK);
CAUTIONSELL.setLineWeight(1);




Lower Indicator Code:
http://tos.mx/SDDSUTc

LOWER CODE:

#XTREME VORTEX Indicator
#assembled by Chewie
#available on UseThinkScript.com
#https://usethinkscript.com/threads/xtreme-vortex-bundle-indicator-for-thinkorswim.4218/

declare lower;

input length = 14;
input Lower = 0.80;
input Upper = 1.15;
input Caution = yes;
input Price_Color = yes;

def trSum = sum(TrueRange(high, close, low), length);
plot "VI+" = if trSum == 0 then 0 else sum(AbsValue(high - low[1]), length) / trSum;
plot "VI-" = if trSum == 0 then 0 else sum(AbsValue(low - high[1]), length) / trSum;

"VI+".SetDefaultColor(Color.GREEN);
"VI-".SetDefaultColor(Color.RED);
plot MIDDLE = 1;
MIDDLE.SetDefaultColor(Color.YELLOW);
plot LOW = LOWER;
LOW.SetDefaultColor(Color.GRAY);
plot HIGH = UPPER;
HIGH.SetDefaultColor(Color.GRAY);

#Candle Colors
assignpriceColor(if Price_Color AND "VI+" > "VI-" then color.dark_green else color.current);
assignpriceColor(if Price_Color AND "VI+" < "VI-" then color.red else color.current);
assignpriceColor(if Price_Color AND "VI+" > "VI-" AND "VI+" < "VI+"[1] then color.light_green else color.current);
assignpriceColor(if Price_Color AND "VI+" < "VI-" AND "VI-" < "VI-"[1] then color.yellow else color.current);

def condition1 = "VI+" <= lower and "VI-" >= upper and "VI+" > "VI+"[1] and "VI-" < "VI-"[1];
def condition2 = "VI-" <= lower and "VI+" >= upper and "VI-" > "VI-"[1] and "VI+" < "VI+"[1];
def condition3 = "VI+" <= lower and "VI-" >= upper;
def condition4 = "VI-" <= lower and "VI+" >= upper;

# Plot DOTS
plot BUY = if condition1 then condition1 else Double.NaN;
BUY.SetPaintingStrategy(PaintingStrategy.POINTS);
BUY.SetDefaultColor(Color.DARK_GREEN);
BUY.setLineWeight(4);

plot SELL = if condition2 then condition2 else Double.NaN;
SELL.SetPaintingStrategy(PaintingStrategy.POINTS);
SELL.SetDefaultColor(Color.red);
SELL.setLineWeight(4);

plot CAUTIONBUY = if caution and condition3 then condition3 else Double.NaN;
CAUTIONBUY.SetPaintingStrategy(PaintingStrategy.POINTS);
CAUTIONBUY.SetDefaultColor(Color.LIGHT_GREEN);
CAUTIONBUY.setLineWeight(4);

plot CAUTIONSELL = if caution and condition4 then condition4 else Double.NaN;
CAUTIONSELL.SetPaintingStrategy(PaintingStrategy.POINTS);
CAUTIONSELL.SetDefaultColor(Color.PINK);
CAUTIONSELL.setLineWeight(4);

#clouds
AddCloud("VI-", "VI+", Color.dark_RED, Color.CURRENT);
AddCloud("VI+", "VI-", Color.dark_GREEN, Color.CURRENT);




The next question people ask is, "Can you send a Watchlist Column?" Yes, here you go. Default setting is 15 minutes. To change the time, click on heading and select Edit Formula. The "caution" indicators can also be turned on/off in the input settings.

Watchlist Column:
http://tos.mx/JqMuz0P

TL8MSir.png


The next question people ask is, "Can you send a Scan?" Yes, here you go.

Buy Scan:
http://tos.mx/YMMcu1E

WzJHeSa.png


Sell Scan:
http://tos.mx/8n5jQgH

ZAoenTX.png


Enjoy!
 
Last edited:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

thanks for your hard work......I am having only ONE issue. On the scan part, the buy or sell does not come up. everything else works fine!

NVM.......i figured it out!!!! thanks man!!! awesome work!
 
Last edited by a moderator:
@chewie76 I swear our minds work too much in unison because every indicator I am working on you are tinkering with as well... I just started utilizing and tweaking VortexIndicator over the weekend and have been implementing it this week... Crazy...!!!

Nice work...!!! (y)
 
@chewie76 For CSELL, SELL, CBUY, BUY. Which has more weighted? Thanks!!
Caution just indicates an extreme buying or selling pressure. The red and green indicate the pressure is ending. The pressure could reverse, or it could continue.
 
Here is a version Where I added Multi Time Frames

Code:
Declare Lower;
input agg1 = AggregationPeriod.FIVE_MIN;
input agg2 = AggregationPeriod.Thirty_MIN;
input agg3 = AggregationPeriod. Hour;
input length = 14;
input Lower = 0.80;
input Upper = 1.2;
input Caution = yes;
input Price_Color = yes;
Def AC = Close(Period = Agg1);
Def BC = Close(Period = Agg2);
Def CC = Close(Period = Agg3);
Def AH = High(Period = Agg1);
Def BH = High(Period = Agg2);
Def CH = High(Period = Agg3);
Def AL = Low(Period = Agg1);
Def BL = Low(Period = Agg2);
Def CL = Low(Period = Agg3);
def trSumA = sum(TrueRange(AH, AC, AL), length);
plot "AVI+" = if trSumA == 0 then 0 else sum(AbsValue(AH - AL[1]), length) / trSumA;
plot "AVI-" = if trSumA == 0 then 0 else sum(AbsValue(AL - AH[1]), length) / trSumA;
def trSumB = sum(TrueRange(BH, BC, BL), length);
plot "BVI+" = if trSumB == 0 then 0 else sum(AbsValue(BH - BL[1]), length) / trSumB;
plot "BVI-" = if trSumB == 0 then 0 else sum(AbsValue(BL - BH[1]), length) / trSumB;
def trSumC = sum(TrueRange(CH, CC, CL), length);
plot "CVI+" = if trSumC == 0 then 0 else sum(AbsValue(CH - CL[1]), length) / trSumC;
plot "CVI-" = if trSumC == 0 then 0 else sum(AbsValue(CL - CH[1]), length) / trSumC;
"AVI+".SetDefaultColor(Color.GREEN);
"AVI+".SetLineWeight(2);
"AVI-".SetDefaultColor(Color.RED);
"AVI-".SetLineWeight(2);
"BVI+".SetDefaultColor(Color.GREEN);
"BVI+".SetLineWeight(3);
"BVI-".SetDefaultColor(Color.RED);
"BVI-".SetLineWeight(3);
"CVI+".SetDefaultColor(Color.GREEN);
"CVI+".SetLineWeight(4);
"CVI-".SetDefaultColor(Color.RED);
"CVI-".SetLineWeight(4);

plot LOW = LOWER;
LOW.SetDefaultColor(Color.GRAY);
plot HIGH = UPPER;
HIGH.SetDefaultColor(Color.GRAY);
plot MIDDLE = 1;
MIDDLE.SetDefaultColor(Color.YELLOW);

#clouds
AddCloud("AVI-", "AVI+", Color.Dark_RED, Color.CURRENT);
AddCloud("AVI+", "AVI-", Color.Dark_GREEN, Color.CURRENT);
AddCloud("BVI-", "BVI+", Color.Dark_RED, Color.CURRENT);
AddCloud("BVI+", "BVI-", Color.Dark_GREEN, Color.CURRENT);
AddCloud("CVI-", "CVI+", Color.Dark_RED, Color.CURRENT);
AddCloud("CVI+", "CVI-", Color.Dark_GREEN, Color.CURRENT);
#Candle Colors
assignpriceColor(if Price_Color AND "AVI+" > "AVI-" then color.dark_green else color.current);
assignpriceColor(if Price_Color AND "AVI+" < "AVI-" then color.red else color.current);
assignpriceColor(if Price_Color AND "AVI+" > "AVI-" AND "AVI+" < "AVI+"[1] then color.light_green else color.current);
assignpriceColor(if Price_Color AND "AVI+" < "AVI-" AND "AVI-" < "AVI-"[1] then color.yellow else color.current);

def condition1A = "AVI+" <= lower and "AVI-" >= upper and "AVI+" > "AVI+"[1] and "AVI-" < "AVI-"[1];
def condition2A = "AVI-" <= lower and "AVI+" >= upper and "AVI-" > "AVI-"[1] and "AVI+" < "AVI+"[1];
def condition3A = "AVI+" <= lower and "AVI-" >= upper;
def condition4A = "AVI-" <= lower and "AVI+" >= upper;

# Plot DOTS
plot BUYA = if condition1A then condition1A else Double.NaN;
BUYA.SetPaintingStrategy(PaintingStrategy.POINTS);
BUYA.SetDefaultColor(Color.DARK_GREEN);
BUYA.setLineWeight(4);

plot SELLA = if condition2A then condition2A else Double.NaN;
SELLA.SetPaintingStrategy(PaintingStrategy.POINTS);
SELLA.SetDefaultColor(Color.red);
SELLA.setLineWeight(4);

plot CAUTIONBUYA = if caution and condition3A then condition3A else Double.NaN;
CAUTIONBUYA.SetPaintingStrategy(PaintingStrategy.POINTS);
CAUTIONBUYA.SetDefaultColor(Color.LIGHT_GREEN);
CAUTIONBUYA.setLineWeight(4);

plot CAUTIONSELLA = if caution and condition4A then condition4A else Double.NaN;
CAUTIONSELLA.SetPaintingStrategy(PaintingStrategy.POINTS);
CAUTIONSELLA.SetDefaultColor(Color.PINK);
CAUTIONSELLA.setLineWeight(4);
 
Good Day Henry, where do I upload this script?

Copy and paste the code, click on the beaker button on a chart, it will open a box, click on create, then paste the code and give it a name, click ok

How do you get this to show in the watch list?
 
Last edited by a moderator:
@ESMINTON Go over the second half of the video below. It's for a different watchlist column but the process is the same.

 

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
367 Online
Create Post

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