Simple Neural Network Transformed RSI for ThinkOrSwim

samer800

Moderator - Expert
VIP
Lifetime
I3b0Stv.png


Author Message:
The Simple Neural Network Transformed RSI (ɴɴᴛ ʀsɪ) stands out as a formidable tool for traders who specialize in lower timeframe trading.
It is an innovative enhancement of the traditional RSI readings with simple neural network smoothing techniques.

This unique blend results in fairly accurate signals, tailored for swift market movements. The ɴɴᴛ ʀsɪ is particularly resistant to the usual market noise found in lower timeframes, ensuring a clearer view of short-term trends.
Furthermore, its diverse range of visualization options adds versatility, making it a valuable tool for traders seeking to capitalize on short-duration market dynamics.
More details: https://www.tradingview.com/v/6qTxRYB1/

CODE:

CSS:
#//https://www.tradingview.com/v/6qTxRYB1/
#// This source code is subject to the terms of the Mozilla Public License 2.0
#// © QuantraAI
#indicator("Simple Neural Network Transformed RSI [QuantraAI]", "??? ?s? [QuantraAI]"
# Converted by Sam4Cok@Samer800    - 01/2024
declare lower;
input timeframe = {Default "Use Chart Timeframe", "Custom Timefram"};
input customTimeframe = AggregationPeriod.FIFTEEN_MIN;
input Source = FundamentalType.CLOSE;    # "Source"
input rsiLength = 14;                    # "RSI Length"
input nnLength  = 5;                     # "NN Input Length"
input MedianCrossInsteadOfMidLineCross = no; # "Median cross instead of Mid line cross"
input MedianLength = 365;                    # "Median Length"
input DisplayVariant = {default "Hybrid", "Heikin-Ashi", "Classic"};    # "Display Variant"
input HollowCandles  = yes;                  # "Hollow Candles"
input barColorType = {default "None", "Trend Following", "Candles", "Extremities", "Reversions"};
input ShowReversionSignals = yes;            # "Show Reversion Signals - HA only"

def na = Double.NaN;
def last = IsNaN(close);
def useMed = MedianCrossInsteadOfMidLineCross;
def NoHA    = DisplayVariant != DisplayVariant."Heikin-Ashi";
def NoClass = DisplayVariant != DisplayVariant."Classic";
def hybrid  = DisplayVariant == DisplayVariant."Hybrid";
#-- MTF
def cTF = Fundamental(FundamentalType = Source);
def cMTF = Fundamental(FundamentalType = Source, Period = customTimeframe);
def src;
Switch (timeframe) {
Case  "Custom Timefram" : src = cMTF;
Default                 : src = cTF;
}
DefineGlobalColor("up", CreateColor(95, 250, 224));
DefineGlobalColor("dn", CreateColor(194, 46, 208));
DefineGlobalColor("dup", CreateColor(3, 106, 89));
DefineGlobalColor("ddn", CreateColor(89, 21, 96));
DefineGlobalColor("BgU", CreateColor(6, 182, 153));
DefineGlobalColor("BgD", CreateColor(149, 35, 160));
#method ha(bar b, simple bool p = true) =>
script ha {
    input bo = open;
    input bh = high;
    input bl = low;
    input bc = close;
    def xc = (bo + bh + bl + bc) / 4;
    def xo = if !xo[1] then (bo + bc) / 2 else (xo[1] + xc[1]) / 2;
    def xh = Max(bh, Max(xo, xc));
    def xl = Min(bl, Min(xo, xc));
    plot hac = xc;
    plot hao = xo;
    plot hah = xh;
    plot hal = xl;
}
#// Calculate Dynamic OB/OS Zones
script stdv_bands {
    input _src = close;
    input _length = 365;
    input _mult = 1;
    def basis = Average(_src, _length);
    def dev   = _mult * StDev(_src, _length);
    plot up = basis + dev;
    plot dn = basis - dev;
}
#// Base calculations
def rsi1 = RSI(Price = src, Length = rsiLength);
def nnOutput = Sum(rsi1 * 1 / nnLength, nnLength);
def median  =  Median(nnOutput, MedianLength);
def cross  = if last then na else if useMed then median else 50;
def haro = ha(nnOutput[1], Max(nnOutput, nnOutput[1]), Min(nnOutput, nnOutput[1]), nnOutput).hao;
def harh = ha(nnOutput[1], Max(nnOutput, nnOutput[1]), Min(nnOutput, nnOutput[1]), nnOutput).hah;
def harl = ha(nnOutput[1], Max(nnOutput, nnOutput[1]), Min(nnOutput, nnOutput[1]), nnOutput).hal;
def harc = ha(nnOutput[1], Max(nnOutput, nnOutput[1]), Min(nnOutput, nnOutput[1]), nnOutput).hac;


def u1 = stdv_bands(nnOutput, MedianLength, 1).up;
def l1 = stdv_bands(nnOutput, MedianLength, 1).dn;
def u2 = stdv_bands(nnOutput, MedianLength, 2).up;
def l2 = stdv_bands(nnOutput, MedianLength, 2).dn;

def UpCol = harc > haro;
def DnCol = harc < haro;

def col;
Switch (barColorType) {
Case "None"       : col = na;
Case "Candles"    : col = if harc > haro then 1 else -1;
Case "Extremities": col = if harc > u2 then -1 else if harc <l2 then 1 else 0;
Case "Reversions" : col = if harh > u2 and DnCol and !(harc[1] < haro[1]) then -1 else
                          if harl < l2 and UpCol and !(harc[1] > haro[1]) then  1 else 0;
Default           : col = if (if NoHA then nnOutput else harc) > cross then 1 else -1;
}

##// Final Plots + Fill
plot pu1 = u1;
plot pl1 = l1;
def pu2 = u2;
def pl2 = l2;
plot pOut= if NoHA and hybrid then nnOutput else na;
plot poutClass = if !NoClass then nnOutput else na;
plot mid = cross;    # "Crossing Line"

poutClass.SetLineWeight(2);
mid.SetDefaultColor(Color.DARK_GRAY);
pu1.SetDefaultColor(GlobalColor("ddn"));
pl1.SetDefaultColor(GlobalColor("dup"));
pOut.AssignValueColor(if nnOutput > cross then GlobalColor("up") else GlobalColor("dn"));
poutClass.AssignValueColor(if nnOutput > cross then Color.CYAN else Color.MAGENTA);

AddCloud(if pOut > mid then pOut else na, pOut - (pOut - mid)/2, GlobalColor("dup"));
AddCloud(if pOut > mid then na else pOut + (mid - pOut)/2, pOut, GlobalColor("ddn"));

AddCloud(pu2, pu2 - (pu2-pu1)/2, GlobalColor("dn"));
AddCloud(pl2 + (pl1-pl2)/2, pl2, GlobalColor("up"));
AddCloud(pu2 - (pu2-pu1)/2, pu1, GlobalColor("ddn"));
AddCloud(pl1, pl2 + (pl1-pl2)/2, GlobalColor("dup"));

#// Plot Reversions
def sigDn = if NoClass and ShowReversionSignals then
            if harh > u2 and DnCol and !(harc[1] < haro[1]) then harh +5 else na else na;
def sigUp = if NoClass and ShowReversionSignals then
            if harl < l2 and UpCol and !(harc[1] > haro[1]) then harl -5 else na else na;

plot shapeUp = sigUp;
plot shapeDn = sigDn;
shapeUp.SetDefaultColor(Color.GREEN);
shapeDn.SetDefaultColor(Color.RED);
shapeUp.SetPaintingStrategy(PaintingStrategy.SQUARES);
shapeDn.SetPaintingStrategy(PaintingStrategy.SQUARES);

def oUp = if NoClass and UpCol then if HollowCandles then haro else harc else na;
def cUp = if NoClass and UpCol then if HollowCandles then harc else haro else na;
def oDn = if NoClass and DnCol then if HollowCandles then harc else haro else na;
def cDn = if NoClass and DnCol then if HollowCandles then haro else harc else na;

AddChart(open = oUp, high = harh , low = harl , close = cUp,
         type = ChartType.CANDLE, growcolor =  Color.CYAN);

AddChart(open = oDn, high = harh , low = harl , close = cDn,
         type = ChartType.CANDLE, growcolor =  Color.MAGENTA);

#-- Bar Color
AssignPriceColor(if isNaN(col) then Color.CURRENT else
                 if col > 0 then GlobalColor("up") else
                 if col < 0 then GlobalColor("dn") else Color.GRAY);

#-- END of CODE
 

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

I am seeing the lower study, and it looks great. But it's not repainting my upper chart, as shown in your screenshot.
 
Great study, thank you. Is it possible to modify so it ranges more between 100-0 rather than 80/20 its presently doing?
 
I created a mobile friendly version of this very nice indicator by changing the clouds into lines, let me know if i messed up because i have no clue how to code...
Screenshot 2024-01-16 112401.png

Code:
#//https://www.tradingview.com/v/6qTxRYB1/
#// This source code is subject to the terms of the Mozilla Public License 2.0
#// © QuantraAI
#indicator("Simple Neural Network Transformed RSI [QuantraAI]", "??? ?s? [QuantraAI]"
# Converted by Sam4Cok@Samer800    - 01/2024
declare lower;
input timeframe = {Default "Use Chart Timeframe", "Custom Timefram"};
input customTimeframe = AggregationPeriod.FIFTEEN_MIN;
input Source = FundamentalType.CLOSE;    # "Source"
input rsiLength = 14;                    # "RSI Length"
input nnLength  = 5;                     # "NN Input Length"
input MedianCrossInsteadOfMidLineCross = no; # "Median cross instead of Mid line cross"
input MedianLength = 365;                    # "Median Length"
input DisplayVariant = {default "Hybrid", "Heikin-Ashi", "Classic"};    # "Display Variant"
input HollowCandles  = yes;                  # "Hollow Candles"
input barColorType = {default "None", "Trend Following", "Candles", "Extremities", "Reversions"};
input ShowReversionSignals = yes;            # "Show Reversion Signals - HA only"

def na = Double.NaN;
def last = IsNaN(close);
def useMed = MedianCrossInsteadOfMidLineCross;
def NoHA    = DisplayVariant != DisplayVariant."Heikin-Ashi";
def NoClass = DisplayVariant != DisplayVariant."Classic";
def hybrid  = DisplayVariant == DisplayVariant."Hybrid";
#-- MTF
def cTF = Fundamental(FundamentalType = Source);
def cMTF = Fundamental(FundamentalType = Source, Period = customTimeframe);
def src;
Switch (timeframe) {
Case  "Custom Timefram" : src = cMTF;
Default                 : src = cTF;
}
DefineGlobalColor("up", CreateColor(95, 250, 224));
DefineGlobalColor("dn", CreateColor(194, 46, 208));
DefineGlobalColor("dup", CreateColor(3, 106, 89));
DefineGlobalColor("ddn", CreateColor(89, 21, 96));
DefineGlobalColor("BgU", CreateColor(6, 182, 153));
DefineGlobalColor("BgD", CreateColor(149, 35, 160));
#method ha(bar b, simple bool p = true) =>
script ha {
    input bo = open;
    input bh = high;
    input bl = low;
    input bc = close;
    def xc = (bo + bh + bl + bc) / 4;
    def xo = if !xo[1] then (bo + bc) / 2 else (xo[1] + xc[1]) / 2;
    def xh = Max(bh, Max(xo, xc));
    def xl = Min(bl, Min(xo, xc));
    plot hac = xc;
    plot hao = xo;
    plot hah = xh;
    plot hal = xl;
}
#// Calculate Dynamic OB/OS Zones
script stdv_bands {
    input _src = close;
    input _length = 365;
    input _mult = 1;
    def basis = Average(_src, _length);
    def dev   = _mult * StDev(_src, _length);
    plot up = basis + dev;
    plot dn = basis - dev;
}
#// Base calculations
def rsi1 = RSI(Price = src, Length = rsiLength);
def nnOutput = Sum(rsi1 * 1 / nnLength, nnLength);
def median  =  Median(nnOutput, MedianLength);
def cross  = if last then na else if useMed then median else 50;
def haro = ha(nnOutput[1], Max(nnOutput, nnOutput[1]), Min(nnOutput, nnOutput[1]), nnOutput).hao;
def harh = ha(nnOutput[1], Max(nnOutput, nnOutput[1]), Min(nnOutput, nnOutput[1]), nnOutput).hah;
def harl = ha(nnOutput[1], Max(nnOutput, nnOutput[1]), Min(nnOutput, nnOutput[1]), nnOutput).hal;
def harc = ha(nnOutput[1], Max(nnOutput, nnOutput[1]), Min(nnOutput, nnOutput[1]), nnOutput).hac;


PLOT u1 = stdv_bands(nnOutput, MedianLength, 1).up;
PLOT l1 = stdv_bands(nnOutput, MedianLength, 1).dn;
PLOT u2 = stdv_bands(nnOutput, MedianLength, 2).up;
PLOT l2 = stdv_bands(nnOutput, MedianLength, 2).dn;

def UpCol = harc > haro;
def DnCol = harc < haro;

def col;
Switch (barColorType) {
Case "None"       : col = na;
Case "Candles"    : col = if harc > haro then 1 else -1;
Case "Extremities": col = if harc > u2 then -1 else if harc <l2 then 1 else 0;
Case "Reversions" : col = if harh > u2 and DnCol and !(harc[1] < haro[1]) then -1 else
                          if harl < l2 and UpCol and !(harc[1] > haro[1]) then  1 else 0;
Default           : col = if (if NoHA then nnOutput else harc) > cross then 1 else -1;
}

##// Final Plots + Fill
plot pu1 = u1;
plot pl1 = l1;
PLOT pu2 = u2;
PLOT pl2 = l2;
plot pOut= if NoHA and hybrid then nnOutput else na;
plot poutClass = if !NoClass then nnOutput else na;
plot mid = cross;    # "Crossing Line"

poutClass.SetLineWeight(2);
mid.SetDefaultColor(Color.DARK_GRAY);
pu1.SetDefaultColor(GlobalColor("ddn"));
pl1.SetDefaultColor(GlobalColor("dup"));
pOut.AssignValueColor(if nnOutput > cross then GlobalColor("up") else GlobalColor("dn"));
poutClass.AssignValueColor(if nnOutput > cross then Color.CYAN else Color.MAGENTA);

#AddCloud(if pOut > mid then pOut else na, pOut - (pOut - mid)/2, GlobalColor("dup"));
#ADDCLOUD(if pOut > mid then na else pOut + (mid - pOut)/2, pOut, GlobalColor("ddn"));

#AddCloud(pu2, pu2 - (pu2-pu1)/2, GlobalColor("dn"));
plot puu2 = pu2 - (pu2-pu1)/2;
#AddCloud(pl2 + (pl1-pl2)/2, pl2, GlobalColor("up"));
#AddCloud(pu2 - (pu2-pu1)/2, pu1, GlobalColor("ddn"));
plot puu11 = pl2 + (pl1-pl2)/2;
#AddCloud(pl1, pl2 + (pl1-pl2)/2, GlobalColor("dup"));

#// Plot Reversions
def sigDn = if NoClass and ShowReversionSignals then
            if harh > u2 and DnCol and !(harc[1] < haro[1]) then harh +5 else na else na;
def sigUp = if NoClass and ShowReversionSignals then
            if harl < l2 and UpCol and !(harc[1] > haro[1]) then harl -5 else na else na;

plot shapeUp = sigUp;
plot shapeDn = sigDn;
shapeUp.SetDefaultColor(Color.GREEN);
shapeDn.SetDefaultColor(Color.RED);
shapeUp.SetPaintingStrategy(PaintingStrategy.SQUARES);
shapeDn.SetPaintingStrategy(PaintingStrategy.SQUARES);

def oUp = if NoClass and UpCol then if HollowCandles then haro else harc else na;
def cUp = if NoClass and UpCol then if HollowCandles then harc else haro else na;
def oDn = if NoClass and DnCol then if HollowCandles then harc else haro else na;
def cDn = if NoClass and DnCol then if HollowCandles then haro else harc else na;

AddChart(open = oUp, high = harh , low = harl , close = cUp,
         type = ChartType.CANDLE, growcolor =  Color.CYAN);

AddChart(open = oDn, high = harh , low = harl , close = cDn,
         type = ChartType.CANDLE, growcolor =  Color.MAGENTA);

#-- Bar Color
AssignPriceColor(if isNaN(col) then Color.CURRENT else
                 if col > 0 then GlobalColor("up") else
                 if col < 0 then GlobalColor("dn") else Color.GRAY);

#-- END of CODE
 
Last edited:
Does this repaint after candle close?

There is nothing in this code to indicate any repainting,
AS LONG AS
you are using the timeframe setting on its default:
input timeframe = {Default "Use Chart Timeframe", "Custom Timefram"};

Please note: indicators that repaint have a prefix of REPAINTS in the title of the thread.
 
Last edited:
I3b0Stv.png


Author Message:
The Simple Neural Network Transformed RSI (ɴɴᴛ ʀsɪ) stands out as a formidable tool for traders who specialize in lower timeframe trading.
It is an innovative enhancement of the traditional RSI readings with simple neural network smoothing techniques.

This unique blend results in fairly accurate signals, tailored for swift market movements. The ɴɴᴛ ʀsɪ is particularly resistant to the usual market noise found in lower timeframes, ensuring a clearer view of short-term trends.
Furthermore, its diverse range of visualization options adds versatility, making it a valuable tool for traders seeking to capitalize on short-duration market dynamics.
More details: https://www.tradingview.com/v/6qTxRYB1/

CODE:

CSS:
#//https://www.tradingview.com/v/6qTxRYB1/
#// This source code is subject to the terms of the Mozilla Public License 2.0
#// © QuantraAI
#indicator("Simple Neural Network Transformed RSI [QuantraAI]", "??? ?s? [QuantraAI]"
# Converted by Sam4Cok@Samer800    - 01/2024
declare lower;
input timeframe = {Default "Use Chart Timeframe", "Custom Timefram"};
input customTimeframe = AggregationPeriod.FIFTEEN_MIN;
input Source = FundamentalType.CLOSE;    # "Source"
input rsiLength = 14;                    # "RSI Length"
input nnLength  = 5;                     # "NN Input Length"
input MedianCrossInsteadOfMidLineCross = no; # "Median cross instead of Mid line cross"
input MedianLength = 365;                    # "Median Length"
input DisplayVariant = {default "Hybrid", "Heikin-Ashi", "Classic"};    # "Display Variant"
input HollowCandles  = yes;                  # "Hollow Candles"
input barColorType = {default "None", "Trend Following", "Candles", "Extremities", "Reversions"};
input ShowReversionSignals = yes;            # "Show Reversion Signals - HA only"

def na = Double.NaN;
def last = IsNaN(close);
def useMed = MedianCrossInsteadOfMidLineCross;
def NoHA    = DisplayVariant != DisplayVariant."Heikin-Ashi";
def NoClass = DisplayVariant != DisplayVariant."Classic";
def hybrid  = DisplayVariant == DisplayVariant."Hybrid";
#-- MTF
def cTF = Fundamental(FundamentalType = Source);
def cMTF = Fundamental(FundamentalType = Source, Period = customTimeframe);
def src;
Switch (timeframe) {
Case  "Custom Timefram" : src = cMTF;
Default                 : src = cTF;
}
DefineGlobalColor("up", CreateColor(95, 250, 224));
DefineGlobalColor("dn", CreateColor(194, 46, 208));
DefineGlobalColor("dup", CreateColor(3, 106, 89));
DefineGlobalColor("ddn", CreateColor(89, 21, 96));
DefineGlobalColor("BgU", CreateColor(6, 182, 153));
DefineGlobalColor("BgD", CreateColor(149, 35, 160));
#method ha(bar b, simple bool p = true) =>
script ha {
    input bo = open;
    input bh = high;
    input bl = low;
    input bc = close;
    def xc = (bo + bh + bl + bc) / 4;
    def xo = if !xo[1] then (bo + bc) / 2 else (xo[1] + xc[1]) / 2;
    def xh = Max(bh, Max(xo, xc));
    def xl = Min(bl, Min(xo, xc));
    plot hac = xc;
    plot hao = xo;
    plot hah = xh;
    plot hal = xl;
}
#// Calculate Dynamic OB/OS Zones
script stdv_bands {
    input _src = close;
    input _length = 365;
    input _mult = 1;
    def basis = Average(_src, _length);
    def dev   = _mult * StDev(_src, _length);
    plot up = basis + dev;
    plot dn = basis - dev;
}
#// Base calculations
def rsi1 = RSI(Price = src, Length = rsiLength);
def nnOutput = Sum(rsi1 * 1 / nnLength, nnLength);
def median  =  Median(nnOutput, MedianLength);
def cross  = if last then na else if useMed then median else 50;
def haro = ha(nnOutput[1], Max(nnOutput, nnOutput[1]), Min(nnOutput, nnOutput[1]), nnOutput).hao;
def harh = ha(nnOutput[1], Max(nnOutput, nnOutput[1]), Min(nnOutput, nnOutput[1]), nnOutput).hah;
def harl = ha(nnOutput[1], Max(nnOutput, nnOutput[1]), Min(nnOutput, nnOutput[1]), nnOutput).hal;
def harc = ha(nnOutput[1], Max(nnOutput, nnOutput[1]), Min(nnOutput, nnOutput[1]), nnOutput).hac;


def u1 = stdv_bands(nnOutput, MedianLength, 1).up;
def l1 = stdv_bands(nnOutput, MedianLength, 1).dn;
def u2 = stdv_bands(nnOutput, MedianLength, 2).up;
def l2 = stdv_bands(nnOutput, MedianLength, 2).dn;

def UpCol = harc > haro;
def DnCol = harc < haro;

def col;
Switch (barColorType) {
Case "None"       : col = na;
Case "Candles"    : col = if harc > haro then 1 else -1;
Case "Extremities": col = if harc > u2 then -1 else if harc <l2 then 1 else 0;
Case "Reversions" : col = if harh > u2 and DnCol and !(harc[1] < haro[1]) then -1 else
                          if harl < l2 and UpCol and !(harc[1] > haro[1]) then  1 else 0;
Default           : col = if (if NoHA then nnOutput else harc) > cross then 1 else -1;
}

##// Final Plots + Fill
plot pu1 = u1;
plot pl1 = l1;
def pu2 = u2;
def pl2 = l2;
plot pOut= if NoHA and hybrid then nnOutput else na;
plot poutClass = if !NoClass then nnOutput else na;
plot mid = cross;    # "Crossing Line"

poutClass.SetLineWeight(2);
mid.SetDefaultColor(Color.DARK_GRAY);
pu1.SetDefaultColor(GlobalColor("ddn"));
pl1.SetDefaultColor(GlobalColor("dup"));
pOut.AssignValueColor(if nnOutput > cross then GlobalColor("up") else GlobalColor("dn"));
poutClass.AssignValueColor(if nnOutput > cross then Color.CYAN else Color.MAGENTA);

AddCloud(if pOut > mid then pOut else na, pOut - (pOut - mid)/2, GlobalColor("dup"));
AddCloud(if pOut > mid then na else pOut + (mid - pOut)/2, pOut, GlobalColor("ddn"));

AddCloud(pu2, pu2 - (pu2-pu1)/2, GlobalColor("dn"));
AddCloud(pl2 + (pl1-pl2)/2, pl2, GlobalColor("up"));
AddCloud(pu2 - (pu2-pu1)/2, pu1, GlobalColor("ddn"));
AddCloud(pl1, pl2 + (pl1-pl2)/2, GlobalColor("dup"));

#// Plot Reversions
def sigDn = if NoClass and ShowReversionSignals then
            if harh > u2 and DnCol and !(harc[1] < haro[1]) then harh +5 else na else na;
def sigUp = if NoClass and ShowReversionSignals then
            if harl < l2 and UpCol and !(harc[1] > haro[1]) then harl -5 else na else na;

plot shapeUp = sigUp;
plot shapeDn = sigDn;
shapeUp.SetDefaultColor(Color.GREEN);
shapeDn.SetDefaultColor(Color.RED);
shapeUp.SetPaintingStrategy(PaintingStrategy.SQUARES);
shapeDn.SetPaintingStrategy(PaintingStrategy.SQUARES);

def oUp = if NoClass and UpCol then if HollowCandles then haro else harc else na;
def cUp = if NoClass and UpCol then if HollowCandles then harc else haro else na;
def oDn = if NoClass and DnCol then if HollowCandles then harc else haro else na;
def cDn = if NoClass and DnCol then if HollowCandles then haro else harc else na;

AddChart(open = oUp, high = harh , low = harl , close = cUp,
         type = ChartType.CANDLE, growcolor =  Color.CYAN);

AddChart(open = oDn, high = harh , low = harl , close = cDn,
         type = ChartType.CANDLE, growcolor =  Color.MAGENTA);

#-- Bar Color
AssignPriceColor(if isNaN(col) then Color.CURRENT else
                 if col > 0 then GlobalColor("up") else
                 if col < 0 then GlobalColor("dn") else Color.GRAY);

#-- END of CODE
when I switch display variant to HA, it does not show on the study. Something am missing? Great work.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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