Supertrend CCI ATR in 1 Plot For Mobile For ThinkOrSwim

Anyway this can be made into scan for new signals. I tried scanning the conventional ways but no results come up. I have used the original SuperTrend Scan but have been unable to combine it with this one for a complete scan.


Figured it out. Sharing scans below.

STAtrCCICombo Bear Scan

STAtrCCI Bull Scan
 
Last edited:
Hi to all!!!

A boring day watching SPY burn theta so thought I'd jump on here and contribute back. This chart indicator is a combination of two indicators found here and elsewhere but combined into a single plot - the CCI ATR Trend indicator and Supertrend. It plots a connected dotted line based on the lowest value of the two indicators if it's in an uptrend or the highest of the two if it's in a downtrend - the dots color if both indicators are in agreement or the dots are grey if they are not. All credit goes to the original creators - I just combined the two to make sure they are in agreement and to simplify my chart setup. I don't post here much but hope you can find some use out of this. It's made me quite a bit of money - both the standalone indicators and now it's combination. I've customized the inputs to match what I've found to work best but they can be changed either in the script or in the settings to whatever you like. Works on mobile.

Works very well on the 1 minute - 5 minute charts. Nice clean lines on TOS mobile. Great for finding early reversals and to keep you in a choppy yet trending trade.
Indicator
https://tos.mx/T0U5Ty
Watchlist Column (EDIT: doesn't work right on mobile)- Just save multiple instances of this and change the aggregation period to get an at a glance MTF analysis of the indicator over your whole watchlist. Colored if in agreement - grey if not. EDIT: SORRY on mobile this doesn't produce accurate results. It works on a PC though. I just compared it. Thought it did but it doesn't maybe someone can tweak it or I'll spend time on it and share another version. I'm done trading for the day though so It'll be a PC version for now:)
https://tos.mx/L5pVNN
Got to go looks like SPY is moving. I probably won't be able to comment much more on this. Please feel free to edit and tweak to your liking:)
The supercci doesnt work for desktop? I try downloading and won't save
 
Hi to all!!!

A boring day watching SPY burn theta so thought I'd jump on here and contribute back. This chart indicator is a combination of two indicators found here and elsewhere but combined into a single plot - the CCI ATR Trend indicator and Supertrend. It plots a connected dotted line based on the lowest value of the two indicators if it's in an uptrend or the highest of the two if it's in a downtrend - the dots color if both indicators are in agreement or the dots are grey if they are not. All credit goes to the original creators - I just combined the two to make sure they are in agreement and to simplify my chart setup. I don't post here much but hope you can find some use out of this. It's made me quite a bit of money - both the standalone indicators and now it's combination. I've customized the inputs to match what I've found to work best but they can be changed either in the script or in the settings to whatever you like. Works on mobile.

Works very well on the 1 minute - 5 minute charts. Nice clean lines on TOS mobile. Great for finding early reversals and to keep you in a choppy yet trending trade.
Indicator
https://tos.mx/T0U5Ty
Watchlist Column (EDIT: doesn't work right on mobile)- Just save multiple instances of this and change the aggregation period to get an at a glance MTF analysis of the indicator over your whole watchlist. Colored if in agreement - grey if not. EDIT: SORRY on mobile this doesn't produce accurate results. It works on a PC though. I just compared it. Thought it did but it doesn't maybe someone can tweak it or I'll spend time on it and share another version. I'm done trading for the day though so It'll be a PC version for now:)
https://tos.mx/L5pVNN
Got to go looks like SPY is moving. I probably won't be able to comment much more on this. Please feel free to edit and tweak to your liking:)

Hello, it works on WINDOWS 10 PC but does not work on iPhone/iPad. Can someone paste the working script for iPhone/iPad. Looking forward to hear from someone soon
 
Hello, it works on WINDOWS 10 PC but does not work on iPhone/iPad. Can someone paste the working script for iPhone/iPad. Looking forward to hear from someone soon
@hmjassal check the tutorials section. I wrote up why some studies don't work on iOS or Android.
 
@Miket It is a combination of two trend indicators. So it is supposed to give a good trend signal. If the two trend indicators are in agreement on the direction of the trend it plots a green dot for an uptrend, red dot for downtrend. If they are not in agreement it plots the gray dot. So basically green buy, red sell. Gray wait or hold for a green or red dot.
Hello Miket, I also just installed this combo indicator on PC and works great. it colors the candle GREEN for uptrend, RED for downtrend and YELLOW for hold.
Question: Can you please help me make it work for iPhone XR and iPadAir (latest 10.5") wth iOS 13.2
 
OK - Thanks very much for quick reply. If someone else has tweaked it and made it work for iOS, please paste the working script.
 
Having a little problem. On smaller timeframes, it does this and scrunches up the price action.

Hi,
On the above chart there is price 639.775 with GREEN color highlighted. What does this signifies?
Also on my charts there is another prices shows up with RED color highlight below the GREEN price. what does these mean?
 
Last edited by a moderator:
Hello,
Has someone tried Supertrend with Stochastic indicator, if yes, can u please share the script.
Thanks
Harv
 
@Hguru when i set the aggregation to weekly on the daily chart the indicator will repaint at times. Is there a way to avoid this?
Thanks!
 
@Hguru That's not repainting. Since you set it to weekly, the current weekly candle must close for the direction/signal to be confirmed.
 
Hello,
Can someone share thinkscript with Stochastic indicator integrated into Supertrend CCI ATR thinkscript
Harv
 
@hmjassal Looking at the code, CCI was able to be added to SuperTrend study because it clearly defines a bullish play as CCI > 0. Otherwise it would be a bearish play if CCI < 0.

In a similar fashion if you are able to clearly define the conditions for Stochastic mathematically for a bullish/bearish play, those conditions can be coded in.
 
So I am using the CCI_ATR Supertrend MTF indicators. I look for signals on the daily charts with confirmation on the Weekly and Monthly time frame. The issue I encounter with backtesting this in TOS and using it on a day to day basis is that often time the Weekly signal will repaint. Meaning that sometimes I am left with a position in the wrong direction and I have to close with a small loss plus commissions. In TOS backtesting it uses the Weekly close, high and low for ALL daily bars for the week and does not take into account that they change from day to day. I understand this is not a bug. Is there a way to mitigate false signals on the Weekly and Monthly? An example is on 12/3 I got some weekly and daily sell signals for some stocks however the next day the weekly sell signal went away. Anyway to mitigate this?

Thanks this forum has been extremely helpful with a great community :)

here is the code for my indicator, can't seem to find it in forums.

Code:
declare lower;

# GLOBAL DEFINITIONS

DefineGlobalColor("TrendUp", CreateColor(0, 254, 30));
DefineGlobalColor("TrendDown", CreateColor(255, 3, 2));

input agg = AggregationPeriod.DAY;
input agg2 = AggregationPeriod.WEEK;
input agg3 = AggregationPeriod.MONTH;

input lengthCCI = 14;
input lengthATR = 4;
input AtrFactor = 0.7;

input DotSize = 3;
input n = 3;
input Factor = 1.3;
input Pd = 60;
input Lookback = 3;

def n1  = n + 1;

# AGGREGATION 1

def c = close(period = agg);
def h = high(period = agg);
def l = low(period = agg);
def pricedata = HL2(period = agg);
def ATRcci = Average(TrueRange(h, c, l), lengthATR) * AtrFactor;
def price = c + l + h;
def linDev = lindev(price, lengthCCI);
def CCI = if lindev == 0 then 0 else (price - Average(price, lengthCCI)) / linDev / 0.015;
def MT1 = if CCI > 0
          then Max(MT1[1], pricedata - ATRcci)
          else Min(MT1[1], pricedata + ATRcci);
plot MT1_Dot = if IsNaN(close) then Double.NaN else 1;
MT1_Dot.SetPaintingStrategy(PaintingStrategy.Points);
MT1_Dot.SetLineWeight(DotSize);
MT1_Dot.AssignValueColor(if c < MT1 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
#AddChartBubble(!IsNaN(close[n1]) and IsNaN(close[n]), 1, (agg/1000/60) + " min", Color.Yellow, yes);

# AGGREGATION 2

def c2 = close(period = agg2);
def h2 = high(period = agg2);
def l2 = low(period = agg2);
def pricedata2 = HL2(period = agg2);
def ATRcci2 = Average(TrueRange(h2, c2, l2), lengthATR) * AtrFactor;
def price2 = c2 + l2 + h2;
def linDev2 = lindev(price2, lengthCCI);
def CCI2 = if linDev2 == 0 then 0 else (price2 - Average(price2, lengthCCI)) / linDev2 / 0.015;
def MT2 = if CCI2 > 0
          then Max(MT2[1], pricedata2 - ATRcci2)
          else Min(MT2[1], pricedata2 + ATRcci2);
plot MT2_Dot = if IsNaN(close) then Double.NaN else 2;
MT2_Dot.SetPaintingStrategy(PaintingStrategy.Points);
MT2_Dot.SetLineWeight(DotSize);
MT2_Dot.AssignValueColor(if c2 < MT2 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
#AddChartBubble(!IsNaN(close[n1]) and IsNaN(close[n]), 2, (agg2/1000/60) + " min", Color.Yellow, yes);
addlabel(yes, "prev agg2", if c2[1] < MT2[1] then color.red else color.green);
# AGGREGATION 3

def c3 = close(period = agg3);
def h3 = high(period = agg3);
def l3 = low(period = agg3);
def pricedata3 = HL2(period = agg3);

def ATRcci3 = Average(TrueRange(h3, c3, l3), lengthATR) * AtrFactor;
def price3 = c3 + l3 + h3;
def linDev3 = lindev(price3, lengthCCI);
def CCI3 = if linDev3 == 0 then 0 else (price3 - Average(price3, lengthCCI)) / linDev3 / 0.015;
def MT3 = if CCI3 > 0
          then Max(MT3[1], pricedata3 - ATRcci3)
          else Min(MT3[1], pricedata3 + ATRcci3);
plot MT3_Dot = if IsNaN(close) then Double.NaN else 3;
MT3_Dot.SetPaintingStrategy(PaintingStrategy.Points);
MT3_Dot.SetLineWeight(DotSize);
MT3_Dot.AssignValueColor(if c3 < MT3 then GlobalColor("TrendDown") else GlobalColor("TrendUp"));
#AddChartBubble(!IsNaN(close[n1]) and IsNaN(close[n]), 3, (agg3/1000/60) + " min", Color.Yellow, yes);
# End Trend Magic MTF
 
What you just referred to is not repainting. Think of using this indicator on the 5m chart. Say you see a signal on the current 5m candle; you would want to wait for that candle to close with the signal intact. After that happen, the signal is confirmed. Similar idea to how it should work with the weekly timeframe. You would have to wait for the current weekly candle to close for confirmation. Using the weekly timeframe to day trade would be a bad idea, especially if you rely on this type of indicator.
 
I use this to swing trade. Holding period of around 3-5 days. How would you code that into TOS backtest? I am finding it difficult. Thanks for the quick response, very helpful.
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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