SUPERTREND CCI ATR TREND COMBO 1 PLOT WORKS ON MOBILE

L

leakywaders

New member
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

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:)

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:)
 
Last edited:
Shinthus

Shinthus

Member
VIP
Nice! Just my style. I love ATR/supertrends and adding CCI is neat. I'm actually not well-versed on CCI so off to the interwebs for me.
 
markos

markos

Well-known member
VIP
Warehouse
Check the code for possible reasons why... did you turn off fit studies?
 
W

Wormtrader

New member
I love this indicator... removed the lines and just color coded the price candles.
Code:
# SUPERTREND BY MOBIUS AND CCI ATR TREND COMBINED INTO ONE CHART INDICATOR, BOTH IN AGREEMENT IS A VERY POWERFUL SIGNAL IF TRENDING. VERY GOOD AT CATCHING REVERSALS. WORKS WELL ON 1 AND 5 MIN CHARTS. PLOT IS THE COMBINATION LOWEST FOR UPTREND AND HIGHEST OF THE DOWNTREND. DOTS COLORED IF BOTH IN AGREEMENT OR GREY IF NOT -  08/10/19 DTEK


def c = close;
def h = high;
def l = low;
def pricedata = hl2;

#SUPERTREND
input ST_Atr_Mult = 1.0;
input ST_Length = 4;
input ST_AvgType = AverageType.HULL;

def ATR = MovingAverage(ST_AvgType, TrueRange(high, close, low), ST_Length);
def UP = HL2 + (ST_Atr_Mult* ATR);
def DN = HL2 + (-ST_Atr_Mult * ATR);
def ST = if close < ST[1] then UP else DN;

def SuperTrend = ST;


#CCI_ATR
input lengthCCI = 50;
input lengthATR = 21;
input AtrFactor = 1.0;

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);
def CCI_ATR_TREND = MT1;

plot ST_ATR_COMBO = if C> ST and C>CCI_ATR_TREND then min(CCI_ATR_TREND, ST) else if c< ST and c<CCI_ATR_TREND then max(CCI_ATR_TREND, ST) else CCI_ATR_TREND;

AssignPriceColor(if c < MT1 and c <ST then color.LIGHT_RED else if C > MT1 and c >ST then color.GREEN else color.YELLOW);
 
Last edited:
H

horserider

Active member
Warehouse
@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.
 
dougn

dougn

New member
VIP
Could I trouble someone to please post the script for the watchlist column? My platform will not allow the import of these but I can install from script. Thank you
 
M

Miket

New member
Could I trouble someone to please post the script for the watchlist column? My platform will not allow the import of these but I can install from script. Thank you


#Combo ST and CCI ATR TREND Coloumn

def c = close;
def h = high;
def l = low;
def pricedata = hl2;


#SUPERTREND
input ST_Atr_Mult = 1.0;
input ST_Length = 4;
input ST_AvgType = AverageType.HULL;

def ATR = MovingAverage(ST_AvgType, TrueRange(high, close, low), ST_Length);
def UP = HL2 + (ST_Atr_Mult* ATR);
def DN = HL2 + (-ST_Atr_Mult * ATR);
def ST = if close < ST[1] then UP else DN;

def SuperTrend = ST;

#CCI_ATR
input lengthCCI = 50;
input lengthATR = 21;
input AtrFactor = 1.0;

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);
def CCI_ATR_TREND = MT1;

plot ST_ATR_COMBO = if C> ST and C>CCI_ATR_TREND then 4 else if c< ST and c<CCI_ATR_TREND then -4 else 0;

AssignBackgroundColor(if ST_ATR_COMBO ==4 then color.cyaN else if ST_ATR_COMBO == -4 then color.magENTA else color.DARK_GRAY);
ST_ATR_COMBO.assignValueColor(color.blue);
 
M

Miket

New member
@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.
Thank you.

I tend to overthink things.
 
markos

markos

Well-known member
VIP
Warehouse
I love this indicator... removed the lines and just color coded the price candles.
Code:
# SUPERTREND BY MOBIUS AND CCI ATR TREND COMBINED INTO ONE CHART INDICATOR, BOTH IN AGREEMENT IS A VERY POWERFUL SIGNAL IF TRENDING. VERY GOOD AT CATCHING REVERSALS. WORKS WELL ON 1 AND 5 MIN CHARTS. PLOT IS THE COMBINATION LOWEST FOR UPTREND AND HIGHEST OF THE DOWNTREND. DOTS COLORED IF BOTH IN AGREEMENT OR GREY IF NOT -  08/10/19 DTEK


def c = close;
def h = high;
def l = low;
def pricedata = hl2;

#SUPERTREND
input ST_Atr_Mult = 1.0;
input ST_Length = 4;
input ST_AvgType = AverageType.HULL;

def ATR = MovingAverage(ST_AvgType, TrueRange(high, close, low), ST_Length);
def UP = HL2 + (ST_Atr_Mult* ATR);
def DN = HL2 + (-ST_Atr_Mult * ATR);
def ST = if close < ST[1] then UP else DN;

def SuperTrend = ST;


#CCI_ATR
input lengthCCI = 50;
input lengthATR = 21;
input AtrFactor = 1.0;

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);
def CCI_ATR_TREND = MT1;

plot ST_ATR_COMBO = if C> ST and C>CCI_ATR_TREND then min(CCI_ATR_TREND, ST) else if c< ST and c<CCI_ATR_TREND then max(CCI_ATR_TREND, ST) else CCI_ATR_TREND;

AssignPriceColor(if c < MT1 and c <ST then color.LIGHT_RED else if C > MT1 and c >ST then color.GREEN else color.YELLOW);
@Wormtrader do yourself a favor. Don't delete lines. If instead of you "comment then out" by putting a # in front of each unwanted line they will be inactive but always available.
 

Top