Repaints NSDT HAMA Candles + SSL Channel For ThinkOrSwim

Repaints
these are signal filters. You need to enable the required filter and change the setting if needed. enabling and disabling the filter wont change the chart or plot, it will affect the signal arrows only.
Okay. I was looking for changes to the indicators after hours so I didn't see any arrow differences. Thanks.
 
I continue to be impressed by this Strategy. Right now I am using a 987Tick chart, with a 2000T and a 3M chart for confirmation.

The 3M I just have VWAP, (because you can't see VWAP on a tick chart I don't believe) and the Andean Oscillator to validate that I am trading with the prevailing trend.

On both of my tick charts I am using a DCPR provided by @bigboss to show the "macro-trend". If the DCPR cloud is green, I don't short the underlying no matter what NSDT HAMA says, and vice versa for longs. This has helped me avoid "guessing" if we truly have a reversal or not...I asked about this in an earlier question.

Further, I am using a stripped down version of the B4 to help time entries, though I am relying on it less and less. As well, I am using the TEA indicator to help identify chop.

Essentially if the 2000T and 987T are in agreement, I feel very good about my entries.

Just to make sure I'm understanding NSDT...for longs, we want Regular candles above HAMA candles Blue and above the Moving Average line that turns from pink to blue...and both of these should be above the SSL (turns from red to green)?

Vice Versa for longs:
Regular candles below HAMA candles (pink), below the Moving Average Line that turns from blue to pink, and all of these are below the SSL (Turns from green to red)

If anyone has any feedback I would appreciate it....below is my Flexible Grid in case anyone is interested

https://tos.mx/nesHbqI
are you still using this successfully... considering the volatility? i like the chart setup you have provided here.
 
Ver 1.2
* added RSI filter, Background Color, some signal enhancement.



Code:
#study("NSDT HAMA Candles", overlay=true)
#//The follow gradient code is taken from the Pinecoders Gradient Framework example.
#//https://www.tradingview.com/script/hqH4YIFa-Color-Gradient-Framework-PineCoders/
#https://www.tradingview.com/script/k7nrF2oI-NSDT-HAMA-Candles/
# included SSL Channel https://www.tradingview.com/script/6y9SkpnV-SSL-Channel/
#Converted by Sam4Cok @ 07/2022
#Ver 1.1 by Sam4Cok @ 07/2022  -- Added Filters (ADX / TDFI / Range Indicator and options to Show/Hide indicators
#Ver 1.2 by Sam4COK @ 07/2022 -- Added Background Color, RSI Filter, signal enhancment.

#//INPUTS
input ColorBar   = no;
input showArrow  = yes;
input BackgroundColor = no;
### NSDT ###
input TrendSource = close;
input HAMALength  = 69;
input HAMAType    = {default EMA, WMA, SMA, HMA};
input HAMABar     = yes;
input HAMAMa      = yes;
#//MA INFO
input OpenLength  = 25;                      #"Length Open"
input OpenType    = {default EMA, SMA, WMA}; #"Type Open"
input HighLength  = 20;                      #"Length High"
input HighType    = {default EMA, SMA, WMA}; #"Type High"
input LowLength   = 20;                      #"Low"
input LowType     = {default EMA, SMA, WMA}; #"Type Low"
input CloseLength = 20;                     #"Length Close"
input CloseType   = {default EMA, SMA, WMA}; #"Close"
### SSL1Source ###
input ShowSSL   = yes; #(true, "Highlight State ?")
input SSLWicks  = no;#(false, "Take Wicks into Account ?")
input SSLType   = {WMA, default SMA, EMA, HMA};
input SSL_MaLength = 69; #"MA "Channel ?
### RSI ###
input RSIFilter = no;
input RSILength = 30;
input RSIMovAvg = 200;
### TDFI ###
input TDFIFilter = no;
input TDFIPeriod =  11;   # "Lookback"
input TDFIAbove  =  0.03; # "Filter High"
input TDFIBelow  = -0.03; # "Filter Low"
### ADX ###
input ADXFilter = no;
input ADXLength = 11;
input ADXLimit  = 20;
### Range Indicator
input RangeIndicatorFilter = no;
input RILength       = 11;
input RangeLimit     = 20;
input RangeSmoothing = 5;
##################
def na = Double.NaN;
########## Colors ########
DefineGlobalColor("Bull"        , CreateColor(38, 166, 154)); # HAMA GREEN - Teal
DefineGlobalColor("Bear"        , CreateColor(239, 83, 80));  # HAMA Red
DefineGlobalColor("WeakBull"    , CreateColor(204, 204, 0));  # HAMA DARK Yellow
DefineGlobalColor("WeakBear"    , CreateColor(255, 128, 0));  # HAMA Orange
DefineGlobalColor("Neutral"     , CreateColor(255, 255, 0));  # HAMA Yellow

DefineGlobalColor("BullBar"     , CreateColor(0, 255, 0));    # GREEN
DefineGlobalColor("WeakBullBar" , CreateColor(0, 128, 0));    # Dark GREEN
DefineGlobalColor("BearBar"     , CreateColor(255, 0, 0));    # Red
DefineGlobalColor("WeakBearBar" , CreateColor(128, 0, 0));   # DARK RED
DefineGlobalColor("NeutralBar"  , CreateColor(255, 255, 0));  # yellow

DefineGlobalColor("BGBull"      , CreateColor (153, 255, 153));
DefineGlobalColor("BGBear"      , CreateColor (255, 153, 153));
#////////////////////////////////////////////////////////////////////////////////
#mat(source, length, type) =>
script mat {
    input source = close;
    input length = 69;
    input type   = "EMA";
    def mat;
    mat =
    if type == "SMA" then SimpleMovingAvg(source, length) else
    if type == "EMA" then ExpAverage(source, length) else
    if type == "WMA" then WMA(source, length) else
    if type == "HMA" then WMA(2 * WMA(source, length / 2) - WMA(source, length), Round(Sqrt(length)))
       else Double.NaN;
    plot result = mat;
}

def ma = WMA(TrendSource, HAMALength);

#//GRADIENT AREA
def center  = ExpAverage(ma, 3);
def xUp     = ma crosses above center;
def xDn     = ma crosses below center;
def chg     = ma - ma[1];
def up      = chg > 0;
def dn      = chg < 0;
def srcBull = ma > center;
def srcBear = ma < center;

#### TREND####
def StrongUP = srcBull and up;
def WeakUp   = srcBull and dn;
def StrongDN = srcBear and dn;
def WeakDN   = srcBear and up;
def Neutral  = xUp or xDn or !StrongUP and !StrongDN and !WeakUp and !WeakDN;

def SourceClose = (open + high + low + close) / 4;
def LengthClose = CloseLength;

def SourceOpen = CompoundValue(1, (SourceOpen[1] + SourceClose[1]) / 2, SourceClose) ;
def LengthOpen = OpenLength;

def SourceHigh = Max(Max(high, SourceOpen), SourceClose);
def LengthHigh = HighLength;

def SourceLow = Min(Min(low, SourceOpen), SourceClose);
def LengthLow = LowLength;

#funcCalcMA1(type1, src1, len1) =>
script funcCalcMA1 {
    input type1 = "EMA";
    input src1  = close;
    input len1  = 0;
    def funcCalcMA1;
    funcCalcMA1 = if type1 == "SMA" then SimpleMovingAvg(src1, len1) else
                  if type1 == "EMA" then ExpAverage(src1, len1) else WMA(src1, len1);
    plot result = funcCalcMA1;
}
#funcCalcOpen(TypeOpen, SourceOpen, LengthOpen) =>
script funcCalcOpen {
    input TypeOpen   = "EMA";
    input SourceOpen = close;
    input LengthOpen = 0;
    def funcCalcOpen;
    funcCalcOpen = if TypeOpen == "SMA" then SimpleMovingAvg(SourceOpen, LengthOpen) else
                   if TypeOpen == "EMA" then ExpAverage(SourceOpen, LengthOpen) else WMA(SourceOpen, LengthOpen);
    plot result = funcCalcOpen;
}
#funcCalcHigh(TypeHigh, SourceHigh, LengthHigh) =>
script funcCalcHigh {
    input TypeHigh   = "EMA";
    input SourceHigh = close;
    input LengthHigh = 0;
    def funcCalcHigh;
    funcCalcHigh = if TypeHigh == "SMA" then SimpleMovingAvg(SourceHigh, LengthHigh) else
                   if TypeHigh == "EMA" then ExpAverage(SourceHigh, LengthHigh) else WMA(SourceHigh, LengthHigh);
    plot result = funcCalcHigh;
}
#funcCalcLow(TypeLow, SourceLow, LengthLow) =>
script funcCalcLow {
    input TypeLow   = "EMA";
    input SourceLow = close;
    input LengthLow = 0;
    def funcCalcLow;
    funcCalcLow = if TypeLow == "SMA" then SimpleMovingAvg(SourceLow, LengthLow) else
                  if TypeLow == "EMA" then ExpAverage(SourceLow, LengthLow) else WMA(SourceLow, LengthLow);
    plot result = funcCalcLow;
}
#funcCalcClose(TypeClose, SourceClose, LengthClose) =>
script funcCalcClose {
    input TypeClose   = "EMA";
    input SourceClose = close;
    input LengthClose = 0;
    def funcCalcClose;
    funcCalcClose = if TypeClose == "SMA" then SimpleMovingAvg(SourceClose, LengthClose) else
                    if TypeClose == "EMA" then ExpAverage(SourceClose, LengthClose) else WMA(SourceClose, LengthClose);
    plot result = funcCalcClose;
}

# Plot the new Chart
def CandleOpen  = funcCalcOpen(OpenType, SourceOpen, LengthOpen);
def CandleHigh  = funcCalcHigh(HighType, SourceHigh, LengthHigh);
def CandleLow   = funcCalcLow(LowType, SourceLow, LengthLow);
def CandleClose = funcCalcClose(CloseType, SourceClose, LengthClose);

def MAValue  = funcCalcMA1(HAMAType, TrendSource, HAMALength);

plot MALine = if HAMAMa then MAValue else na;
MALine.SetStyle(Curve.FIRM);
MALine.AssignValueColor( if StrongUP then GlobalColor("Bull")     else
                         if WeakUp   then GlobalColor("WeakBull") else
                         if StrongDN then GlobalColor("Bear")     else
                         if WeakDN   then GlobalColor("WeakBear") else GlobalColor("Neutral"));
MALine.SetLineWeight(1);

# Plot STRONG UP
def UpO1;
def UpH1;
def UpL1;
def UpC1;
if StrongUP and HAMABar
then {
    UpO1 = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    UpH1 = if CandleHigh > CandleClose then CandleClose else CandleHigh;
    UpL1 = if CandleLow  < CandleOpen  then CandleOpen  else CandleLow;
    UpC1 = if CandleOpen < CandleClose then CandleOpen  else CandleClose;
} else
{
    UpO1 = na;
    UpH1 = na;
    UpL1 = na;
    UpC1 = na;
}
# Plot WEAK UP
def UpO;
def UpH;
def UpL;
def UpC;
if WeakUp and HAMABar
then {
    UpO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    UpH = if CandleHigh > CandleClose then CandleClose else CandleHigh;
    UpL = if CandleLow  < CandleOpen  then CandleOpen else CandleLow;
    UpC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    UpO = na;
    UpH = na;
    UpL = na;
    UpC = na;
}
# Plot WEAK DOWN
def DnO;
def DnH;
def DnL;
def DnC;
if WeakDN and HAMABar
then {
    DnO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    DnH = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    DnL = if CandleLow  < CandleClose then CandleClose else CandleLow;
    DnC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    DnO = na;
    DnH = na;
    DnL = na;
    DnC = na;
}
# Plot STRONG DOWN
def DnO1;
def DnH1;
def DnL1;
def DnC1;
if StrongDN and HAMABar
then {
    DnO1 = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    DnH1 = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    DnL1 = if CandleLow  < CandleClose then CandleClose else CandleLow;
    DnC1 = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    DnO1 = na;
    DnH1 = na;
    DnL1 = na;
    DnC1 = na;
}
# Plot Neutral
def NuO;
def NuH;
def NuL;
def NuC;
if Neutral and HAMABar
then {
    NuO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    NuH = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    NuL = if CandleLow  < CandleClose then CandleClose else CandleLow;
    NuC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    NuO = na;
    NuH = na;
    NuL = na;
    NuC = na;
}
# Plot the new Chart
AddChart(high = UpH1, low = UpL1, open = UpO1, close = UpC1,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Bull"));
AddChart(high = UpH , low = UpL , open = UpO,  close = UpC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("WeakBull"));

AddChart(high = DnH1, low = DnL1, open = DnO1, close = DnC1,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Bear"));
AddChart(high = DnH , low = DnL , open = DnO,  close = DnC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("WeakBear"));

AddChart(high = NuH , low = NuL , open = NuO,  close = NuC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Neutral"));
########
#indicator("SSL Channel", by MissTricky)
#https://www.tradingview.com/script/6y9SkpnV-SSL-Channel/
def ma1 = mat(high,SSL_MaLength, SSLType);
def ma2 = mat(low ,SSL_MaLength, SSLType);

def Hlv1 = if (if SSLWicks then high else close) > ma1 then 1 else
           if (if SSLWicks then low  else close) < ma2 then -1 else Hlv1[1];
def Hlv = Hlv1;

def sslUp   = if Hlv < 0 then ma2 else ma1;
def sslDown = if Hlv < 0 then ma1 else ma2;

def SSLBull = Hlv1 > 0 and Hlv1[1] < 0;
def SSLBear = Hlv1 < 0 and Hlv1[1] > 0;

plot highLine = if ShowSSL then sslUp else na;
plot lowLine  = if ShowSSL then sslDown else na;

highLine.AssignValueColor(if Hlv > 0 then Color.GREEN else color.RED);
lowLine.AssignValueColor( if Hlv > 0 then Color.GREEN else color.RED);

highLine.AssignValueColor(if Hlv > 0 then Color.GREEN else Color.RED);
lowLine.AssignValueColor( if Hlv > 0 then Color.GREEN else Color.RED);

AddCloud (highLine, lowLine, Color.DARK_GREEN, Color.DARK_RED, no);

##### RSI
def RSIup   = WildersAverage(Max(close - close[1], 0), rsiLength);
def RSIdown = WildersAverage(-Min(close - close[1], 0), rsiLength);
def RSIvalue = if RSIdown == 0 then 100 else if RSIup == 0 then 0 else 100 - (100 / (1 + RSIup / RSIdown));
def RSIAvg   = SimpleMovingAvg(RSIvalue, RSIMovAvg);
def RSI = if RSIvalue > RSIAvg then  1 else
          if RSIvalue < RSIAvg then -1 else na;

##### TDFI
def mma  = ExpAverage(close * 1000, TDFIPeriod);
def smma = ExpAverage(mma, TDFIPeriod);
def impetmma  = mma - mma[1];
def impetsmma = smma - smma[1];
def divma = AbsValue(mma - smma);
def averimpet = (impetmma + impetsmma) / 2;
def tdf  = Power(divma, 1) * Power(averimpet, 3);
def TDFIvalue = tdf / Highest(AbsValue(tdf), TDFIPeriod * 3);
def TDFI = if TDFIvalue > TDFIAbove then  1 else
           if TDFIvalue < TDFIBelow then -1 else na;

###### ADX Filter
def ADXvalue = DMI(ADXLength, AverageType.WILDERS).ADX;
def ADX      = if ADXvalue >= ADXlimit then 1 else na;

###### Range Indicator
def data = TrueRange(high, close, low) / if close > close[1] then (close - close[1]) else 1;
def hData = Highest(data, RILength);
def lData = Lowest(data, RILength);
def range = 100 * (data - lData) / if hData > lData then (hData - lData) else 1;
def RIvalue = ExpAverage(range, RangeSmoothing);
def RI = if RIvalue >= Rangelimit then 1 else na;

### Signal###
def UpOpen = if CandleOpen < CandleClose then CandleClose else CandleOpen;
def UpHigh = if CandleHigh > CandleClose then CandleClose else CandleHigh;
def UpLow  = if CandleLow  < CandleOpen  then CandleOpen  else CandleLow;
def UpClose= if CandleOpen < CandleClose then CandleOpen  else CandleClose;

def DnOpen = if CandleOpen < CandleClose then CandleClose else CandleOpen;
def DnHigh = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
def DnLow  = if CandleLow  < CandleClose then CandleClose else CandleLow;
def DnClose= if CandleOpen < CandleClose then CandleOpen else CandleClose;

def HAMAHigh = close > CandleLow;
def HAMALow  = low < DnLow;

def SigUp    = if TDFIFilter then (SSLBull and close > MAValue and HAMAHigh and TDFI > 0)
                             else (SSLBull and close > MAValue and HAMAHigh);
def SigUp1   = if ADXFilter then SigUp and ADX else SigUp;
def SigUp2   = if RangeIndicatorFilter then SigUp1 and RI else SigUp1;
def SignalUp = if RSIFilter then SigUp2 and RSI > 0 else SigUp2;

def SigDN = if TDFIFilter then (SSLBear and close < MAValue and HAMALow and TDFI < 0)
                          else (SSLBear and close < MAValue and HAMALow);
def SigDn1 = if ADXFilter then SigDn and ADX else SigDn;
def SigDn2 = if RangeIndicatorFilter then SigDn1 and RI else SigDn1;
def SignalDn = if RSIFilter then SigDn2 and RSI < 0 else SigDn2;

plot Arrow_Up = if showArrow and SignalUp then low  else na;
plot Arrow_Dn = if showArrow and SignalDn then high else na;

Arrow_Up.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
Arrow_Up.SetDefaultColor(Color.WHITE);
Arrow_Up.SetLineWeight(3);

Arrow_Dn.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
Arrow_Dn.SetDefaultColor(Color.YELLOW);
Arrow_Dn.SetLineWeight(3);

##### Background & Price Color
AssignPriceColor(if ColorBar  then
                  if Neutral  then GlobalColor("NeutralBar")  else
                  if StrongUP and close < UpHigh then GlobalColor("WeakBullBar") else
                  if StrongUP and close > UpHigh then GlobalColor("BullBar")     else
                  if StrongDN and close < DnLow  then GlobalColor("BearBar")     else
                  if StrongDN and close > DnLow then GlobalColor("WeakBearBar")  else
                                                 Color.DARK_ORANGE else Color.CURRENT);

AssignBackgroundColor(if BackgroundColor then
                  if StrongUP and close > UpHigh then GlobalColor("BGBull") else
                  if StrongDN and close < DnLow  then GlobalColor("BGBear") else
                    Color.CURRENT else Color.CURRENT);

### ENd ####

Is this still the latest?


#study("NSDT HAMA Candles", overlay=true)
#//The follow gradient code is taken from the Pinecoders Gradient Framework example.
#//https://www.tradingview.com/script/hqH4YIFa-Color-Gradient-Framework-PineCoders/
#https://www.tradingview.com/script/k7nrF2oI-NSDT-HAMA-Candles/
# included SSL Channel https://www.tradingview.com/script/6y9SkpnV-SSL-Channel/
#Converted by Sam4Cok @ 07/2022
#Ver 1.1 by Sam4Cok @ 07/2022 -- Added Filters (ADX / TDFI / Range Indicator and options to Show/Hide indicators
#Ver 1.2 by Sam4COK @ 07/2022 -- Added Background Color, RSI Filter, signal enhancment.
 
Last edited by a moderator:
Is this still the latest?


#study("NSDT HAMA Candles", overlay=true)
#//The follow gradient code is taken from the Pinecoders Gradient Framework example.
#//https://www.tradingview.com/script/hqH4YIFa-Color-Gradient-Framework-PineCoders/
#https://www.tradingview.com/script/k7nrF2oI-NSDT-HAMA-Candles/
# included SSL Channel https://www.tradingview.com/script/6y9SkpnV-SSL-Channel/
#Converted by Sam4Cok @ 07/2022
#Ver 1.1 by Sam4Cok @ 07/2022 -- Added Filters (ADX / TDFI / Range Indicator and options to Show/Hide indicators
#Ver 1.2 by Sam4COK @ 07/2022 -- Added Background Color, RSI Filter, signal enhancment.
yes. how, the creater changed little bit the calc method. I included in the script. You can try both methods.

CSS:
#study("NSDT HAMA Candles", overlay=true)
#//The follow gradient code is taken from the Pinecoders Gradient Framework example.
#//https://www.tradingview.com/script/hqH4YIFa-Color-Gradient-Framework-PineCoders/
#https://www.tradingview.com/script/k7nrF2oI-NSDT-HAMA-Candles/
# included SSL Channel https://www.tradingview.com/script/6y9SkpnV-SSL-Channel/
# Youtube strategy https://www.youtube.com/watch?v=YJrELewfIrU
#Converted by Sam4Cok @ 07/2022
#Ver 1.1 by Sam4Cok @ 07/2022  -- Added Filters (ADX / TDFI / Range Indicator and options to Show/Hide indicators
#Ver 1.2 by Sam4COK @ 07/2022 -- Added Background Color, RSI Filter, signal enhancment.
# updated by Sam4COK@Samer800 - 12/2022 - Added method 2 for HA calc

#//INPUTS
input ColorBar   = no;
input showArrow  = yes;
input BackgroundColor = no;
### NSDT ###
input HamaCalcMethod = {Method1,Default Method2};
input TrendSource = close;
input HAMALength  = 55;
input HAMAType    = {default EMA, WMA, SMA, HMA};
input HAMABar     = yes;
input HAMAMa      = yes;
#//MA INFO
input OpenLength  = 25;                      #"Length Open"
input OpenType    = {default EMA, SMA, WMA}; #"Type Open"
input HighLength  = 20;                      #"Length High"
input HighType    = {default EMA, SMA, WMA}; #"Type High"
input LowLength   = 20;                      #"Low"
input LowType     = {default EMA, SMA, WMA}; #"Type Low"
input CloseLength = 20;                     #"Length Close"
input CloseType   = {default EMA, SMA, WMA}; #"Close"
### SSL1Source ###
input ShowSSL   = yes; #(true, "Highlight State ?")
input SSLWicks  = no;#(false, "Take Wicks into Account ?")
input SSLType   = {WMA, default SMA, EMA, HMA};
input SSL_MaLength = 55; #"MA "Channel ?
### RSI ###
input RSIFilter = no;
input RSILength = 30;
input RSIMovAvg = 200;
### TDFI ###
input TDFIFilter = no;
input TDFIPeriod =  11;   # "Lookback"
input TDFIAbove  =  0.03; # "Filter High"
input TDFIBelow  = -0.03; # "Filter Low"
### ADX ###
input ADXFilter = no;
input ADXLength = 11;
input ADXLimit  = 20;
### Range Indicator
input RangeIndicatorFilter = no;
input RILength       = 11;
input RangeLimit     = 20;
input RangeSmoothing = 5;
##################
def na = Double.NaN;
def Op = open; def Cl = close; def Hi = High; def Lo = low;
def method = if HamaCalcMethod==HamaCalcMethod.Method1 then 1 else
             if HamaCalcMethod==HamaCalcMethod.Method2 then 0 else method[1];
########## Colors ########
DefineGlobalColor("Bull"        , CreateColor(38, 166, 154)); # HAMA GREEN - Teal
DefineGlobalColor("Bear"        , CreateColor(239, 83, 80));  # HAMA Red
DefineGlobalColor("WeakBull"    , CreateColor(204, 204, 0));  # HAMA DARK Yellow   
DefineGlobalColor("WeakBear"    , CreateColor(255, 128, 0));  # HAMA Orange 
DefineGlobalColor("Neutral"     , CreateColor(255, 255, 0));  # HAMA Yellow 

DefineGlobalColor("BullBar"     , CreateColor(0, 255, 0));    # GREEN
DefineGlobalColor("WeakBullBar" , CreateColor(0, 128, 0));    # Dark GREEN
DefineGlobalColor("BearBar"     , CreateColor(255, 0, 0));    # Red
DefineGlobalColor("WeakBearBar" , CreateColor(128, 0, 0));   # DARK RED
DefineGlobalColor("NeutralBar"  , CreateColor(255, 255, 0));  # yellow

DefineGlobalColor("BGBull"      , CreateColor (153, 255, 153));
DefineGlobalColor("BGBear"      , CreateColor (255, 153, 153));
#////////////////////////////////////////////////////////////////////////////////
#mat(source, length, type) =>
script mat {
    input source = close;
    input length = 69;
    input type   = "EMA";
    def mat;
    mat =
    if type == "SMA" then SimpleMovingAvg(source, length) else
    if type == "EMA" then ExpAverage(source, length) else
    if type == "WMA" then WMA(source, length) else
    if type == "HMA" then WMA(2 * WMA(source, length / 2) - WMA(source, length), Round(Sqrt(length)))
       else Double.NaN;
    plot result = mat;
}

def ma = WMA(TrendSource, HAMALength);

#//GRADIENT AREA
def center  = ExpAverage(ma, 3);
def xUp     = ma crosses above center;
def xDn     = ma crosses below center;
def chg     = ma - ma[1];
def up      = chg > 0;
def dn      = chg < 0;
def srcBull = ma > center;
def srcBear = ma < center;

#### TREND####
def StrongUP = srcBull and up;
def WeakUp   = srcBull and dn;
def StrongDN = srcBear and dn;
def WeakDN   = srcBear and up;
def Neutral  = xUp or xDn or !StrongUP and !StrongDN and !WeakUp and !WeakDN;

def SourceClose = (Op + Hi + Lo + Cl) / 4;
def LengthClose = CloseLength;

def SourceOpen = CompoundValue(1, (SourceOpen[1] + SourceClose[1]) / 2, SourceClose) ;
def LengthOpen = OpenLength;

def SourceHigh = Max(Max(Hi, SourceOpen), SourceClose);
def LengthHigh = HighLength;

def SourceLow = Min(Min(Lo, SourceOpen), SourceClose);
def LengthLow = LowLength;

def SrcOpen = (Op[1] + Cl[1]) / 2;
def SrcHigh = Max(Hi, Cl);
def SrcLow = Min(Lo, Cl);
def SrcClose = SourceClose;
#funcCalcMA1(type1, src1, len1) =>
script funcCalcMA1 {
    input type1 = "EMA";
    input src1  = close;
    input len1  = 0;
    def funcCalcMA1;
    funcCalcMA1 = if type1 == "SMA" then SimpleMovingAvg(src1, len1) else
                  if type1 == "EMA" then ExpAverage(src1, len1) else WMA(src1, len1);
    plot result = funcCalcMA1;
}
#funcCalcOpen(TypeOpen, SourceOpen, LengthOpen) =>
script funcCalcOpen {
    input TypeOpen   = "EMA";
    input SourceOpen = close;
    input LengthOpen = 0;
    def funcCalcOpen;
    funcCalcOpen = if TypeOpen == "SMA" then SimpleMovingAvg(SourceOpen, LengthOpen) else
                   if TypeOpen == "EMA" then ExpAverage(SourceOpen, LengthOpen) else WMA(SourceOpen, LengthOpen);
    plot result = funcCalcOpen;
}
#funcCalcHigh(TypeHigh, SourceHigh, LengthHigh) =>
script funcCalcHigh {
    input TypeHigh   = "EMA";
    input SourceHigh = close;
    input LengthHigh = 0;
    def funcCalcHigh;
    funcCalcHigh = if TypeHigh == "SMA" then SimpleMovingAvg(SourceHigh, LengthHigh) else
                   if TypeHigh == "EMA" then ExpAverage(SourceHigh, LengthHigh) else WMA(SourceHigh, LengthHigh);
    plot result = funcCalcHigh;
}
#funcCalcLow(TypeLow, SourceLow, LengthLow) =>
script funcCalcLow {
    input TypeLow   = "EMA";
    input SourceLow = close;
    input LengthLow = 0;
    def funcCalcLow;
    funcCalcLow = if TypeLow == "SMA" then SimpleMovingAvg(SourceLow, LengthLow) else
                  if TypeLow == "EMA" then ExpAverage(SourceLow, LengthLow) else WMA(SourceLow, LengthLow);
    plot result = funcCalcLow;
}
#funcCalcClose(TypeClose, SourceClose, LengthClose) =>
script funcCalcClose {
    input TypeClose   = "EMA";
    input SourceClose = close;
    input LengthClose = 0;
    def funcCalcClose;
    funcCalcClose = if TypeClose == "SMA" then SimpleMovingAvg(SourceClose, LengthClose) else
                    if TypeClose == "EMA" then ExpAverage(SourceClose, LengthClose) else WMA(SourceClose, LengthClose);
    plot result = funcCalcClose;
}

# Plot the new Chart
def CandleOpen1  = funcCalcOpen(OpenType, SourceOpen, LengthOpen);
def CandleHigh1  = funcCalcHigh(HighType, SourceHigh, LengthHigh);
def CandleLow1   = funcCalcLow(LowType, SourceLow, LengthLow);
def CandleClose1 = funcCalcClose(CloseType, SourceClose, LengthClose);
def CandleOpen2  = funcCalcOpen(OpenType, SrcOpen, LengthOpen);
def CandleHigh2  = funcCalcHigh(HighType, SrcHigh, LengthHigh);
def CandleLow2  = funcCalcLow(LowType, SrcLow, LengthLow);
def CandleClose2 = funcCalcClose(CloseType, SrcClose, LengthClose);

def MAValue  = funcCalcMA1(HAMAType, TrendSource, HAMALength);

plot MALine = if HAMAMa then MAValue else na;
MALine.SetStyle(Curve.FIRM);
MALine.AssignValueColor( if StrongUP then GlobalColor("Bull")     else
                         if WeakUp   then GlobalColor("WeakBull") else
                         if StrongDN then GlobalColor("Bear")     else
                         if WeakDN   then GlobalColor("WeakBear") else GlobalColor("Neutral"));

def CandleOpen  = if method then CandleOpen1 else CandleOpen2;
def CandleHigh  = if method then CandleHigh1 else CandleHigh2;
def CandleLow   = if method then CandleLow1 else CandleLow2;
def CandleClose = if method then CandleClose1 else CandleClose2;

# Plot STRONG UP
def UpO1;
def UpH1;
def UpL1;
def UpC1;
if StrongUP and HAMABar
then {
    UpO1 = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    UpH1 = if CandleHigh > CandleClose then CandleClose else CandleHigh;
    UpL1 = if CandleLow  < CandleOpen  then CandleOpen  else CandleLow;
    UpC1 = if CandleOpen < CandleClose then CandleOpen  else CandleClose;
} else
{
    UpO1 = na;
    UpH1 = na;
    UpL1 = na;
    UpC1 = na;
}
# Plot WEAK UP
def UpO;
def UpH;
def UpL;
def UpC;
if WeakUp and HAMABar
then {
    UpO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    UpH = if CandleHigh > CandleClose then CandleClose else CandleHigh;
    UpL = if CandleLow  < CandleOpen  then CandleOpen else CandleLow;
    UpC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    UpO = na;
    UpH = na;
    UpL = na;
    UpC = na;
}
# Plot WEAK DOWN
def DnO;
def DnH;
def DnL;
def DnC;
if WeakDN and HAMABar
then {
    DnO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    DnH = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    DnL = if CandleLow  < CandleClose then CandleClose else CandleLow;
    DnC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    DnO = na;
    DnH = na;
    DnL = na;
    DnC = na;
}
# Plot STRONG DOWN
def DnO1;
def DnH1;
def DnL1;
def DnC1;
if StrongDN and HAMABar
then {
    DnO1 = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    DnH1 = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    DnL1 = if CandleLow  < CandleClose then CandleClose else CandleLow;
    DnC1 = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    DnO1 = na;
    DnH1 = na;
    DnL1 = na;
    DnC1 = na;
}
# Plot Neutral
def NuO;
def NuH;
def NuL;
def NuC;
if Neutral and HAMABar
then {
    NuO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    NuH = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    NuL = if CandleLow  < CandleClose then CandleClose else CandleLow;
    NuC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    NuO = na;
    NuH = na;
    NuL = na;
    NuC = na;
}
# Plot the new Chart
AddChart(high = UpH1, low = UpL1, open = UpO1, close = UpC1,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Bull"));
AddChart(high = UpH , low = UpL , open = UpO,  close = UpC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("WeakBull"));

AddChart(high = DnH1, low = DnL1, open = DnO1, close = DnC1,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Bear"));
AddChart(high = DnH , low = DnL , open = DnO,  close = DnC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("WeakBear"));

AddChart(high = NuH , low = NuL , open = NuO,  close = NuC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Neutral"));
########
#indicator("SSL Channel", by MissTricky)
#https://www.tradingview.com/script/6y9SkpnV-SSL-Channel/
def ma1 = mat(Hi,SSL_MaLength, SSLType);
def ma2 = mat(Lo ,SSL_MaLength, SSLType);

def Hlv1 = if (if SSLWicks then Hi else Cl) > ma1 then 1 else
           if (if SSLWicks then Lo  else Cl) < ma2 then -1 else Hlv1[1];
def Hlv = Hlv1;

def sslUp   = if Hlv < 0 then ma2 else ma1;
def sslDown = if Hlv < 0 then ma1 else ma2;

def SSLBull = Hlv1 > 0 and Hlv1[1] < 0;
def SSLBear = Hlv1 < 0 and Hlv1[1] > 0;

plot highLine = if ShowSSL then sslUp else na;
plot lowLine  = if ShowSSL then sslDown else na;

highLine.AssignValueColor(if Hlv > 0 then Color.GREEN else color.RED);
lowLine.AssignValueColor( if Hlv > 0 then Color.GREEN else color.RED);

highLine.AssignValueColor(if Hlv > 0 then Color.GREEN else Color.RED);
lowLine.AssignValueColor( if Hlv > 0 then Color.GREEN else Color.RED);

AddCloud (highLine, lowLine, Color.DARK_GREEN, Color.DARK_RED, no);

##### RSI
def RSIup   = WildersAverage(Max(Cl - Cl[1], 0), rsiLength);
def RSIdown = WildersAverage(-Min(Cl - Cl[1], 0), rsiLength);
def RSIvalue = if RSIdown == 0 then 100 else if RSIup == 0 then 0 else 100 - (100 / (1 + RSIup / RSIdown));
def RSIAvg   = SimpleMovingAvg(RSIvalue, RSIMovAvg);
def RSI = if RSIvalue > RSIAvg then  1 else
          if RSIvalue < RSIAvg then -1 else na;

##### TDFI
def mma  = ExpAverage(Cl * 1000, TDFIPeriod);
def smma = ExpAverage(mma, TDFIPeriod);
def impetmma  = mma - mma[1];
def impetsmma = smma - smma[1];
def divma = AbsValue(mma - smma);
def averimpet = (impetmma + impetsmma) / 2;
def tdf  = Power(divma, 1) * Power(averimpet, 3);
def TDFIvalue = tdf / Highest(AbsValue(tdf), TDFIPeriod * 3);
def TDFI = if TDFIvalue > TDFIAbove then  1 else
           if TDFIvalue < TDFIBelow then -1 else na;

###### ADX Filter
def ADXvalue = DMI(ADXLength, AverageType.WILDERS).ADX;
def ADX      = if ADXvalue >= ADXlimit then 1 else na;

###### Range Indicator
def data = TrueRange(Hi, Cl, Lo) / if Cl > Cl[1] then (Cl - Cl[1]) else 1;
def hData = Highest(data, RILength);
def lData = Lowest(data, RILength);
def range = 100 * (data - lData) / if hData > lData then (hData - lData) else 1;
def RIvalue = ExpAverage(range, RangeSmoothing);
def RI = if RIvalue >= Rangelimit then 1 else na;

### Signal###
def UpOpen = if CandleOpen < CandleClose then CandleClose else CandleOpen;
def UpHigh = if CandleHigh > CandleClose then CandleClose else CandleHigh;
def UpLow  = if CandleLow  < CandleOpen  then CandleOpen  else CandleLow;
def UpClose= if CandleOpen < CandleClose then CandleOpen  else CandleClose;

def DnOpen = if CandleOpen < CandleClose then CandleClose else CandleOpen;
def DnHigh = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
def DnLow  = if CandleLow  < CandleClose then CandleClose else CandleLow;
def DnClose= if CandleOpen < CandleClose then CandleOpen else CandleClose;

def HAMAHigh = Cl > CandleLow;
def HAMALow  = Lo < DnLow;

def SigUp    = if TDFIFilter then (SSLBull and Cl > MAValue and HAMAHigh and TDFI > 0)
                             else (SSLBull and Cl > MAValue and HAMAHigh);
def SigUp1   = if ADXFilter then SigUp and ADX else SigUp;
def SigUp2   = if RangeIndicatorFilter then SigUp1 and RI else SigUp1;
def SignalUp = if RSIFilter then SigUp2 and RSI > 0 else SigUp2;

def SigDN = if TDFIFilter then (SSLBear and Cl < MAValue and HAMALow and TDFI < 0)
                          else (SSLBear and Cl < MAValue and HAMALow);
def SigDn1 = if ADXFilter then SigDn and ADX else SigDn;
def SigDn2 = if RangeIndicatorFilter then SigDn1 and RI else SigDn1;
def SignalDn = if RSIFilter then SigDn2 and RSI < 0 else SigDn2;

plot Arrow_Up = if showArrow and SignalUp then Lo  else na;
plot Arrow_Dn = if showArrow and SignalDn then Hi else na;

Arrow_Up.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
Arrow_Up.SetDefaultColor(Color.WHITE);
Arrow_Up.SetLineWeight(3);

Arrow_Dn.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
Arrow_Dn.SetDefaultColor(Color.YELLOW);
Arrow_Dn.SetLineWeight(3);

##### Background & Price Color
AssignPriceColor(if ColorBar  then
                  if Neutral  then GlobalColor("NeutralBar")  else
                  if StrongUP and Cl < UpHigh then GlobalColor("WeakBullBar") else
                  if StrongUP and Cl > UpHigh then GlobalColor("BullBar")     else
                  if StrongDN and Cl < DnLow  then GlobalColor("BearBar")     else
                  if StrongDN and Cl > DnLow then GlobalColor("WeakBearBar")  else
                                                 Color.DARK_ORANGE else Color.CURRENT);

AssignBackgroundColor(if BackgroundColor then
                  if StrongUP and Cl > UpHigh then GlobalColor("BGBull") else
                  if StrongDN and Cl < DnLow  then GlobalColor("BGBear") else
                    Color.CURRENT else Color.CURRENT);

### ENd ####
 
yes. how, the creater changed little bit the calc method. I included in the script. You can try both methods.

CSS:
#study("NSDT HAMA Candles", overlay=true)
#//The follow gradient code is taken from the Pinecoders Gradient Framework example.
#//https://www.tradingview.com/script/hqH4YIFa-Color-Gradient-Framework-PineCoders/
#https://www.tradingview.com/script/k7nrF2oI-NSDT-HAMA-Candles/
# included SSL Channel https://www.tradingview.com/script/6y9SkpnV-SSL-Channel/
# Youtube strategy https://www.youtube.com/watch?v=YJrELewfIrU
#Converted by Sam4Cok @ 07/2022
#Ver 1.1 by Sam4Cok @ 07/2022  -- Added Filters (ADX / TDFI / Range Indicator and options to Show/Hide indicators
#Ver 1.2 by Sam4COK @ 07/2022 -- Added Background Color, RSI Filter, signal enhancment.
# updated by Sam4COK@Samer800 - 12/2022 - Added method 2 for HA calc

#//INPUTS
input ColorBar   = no;
input showArrow  = yes;
input BackgroundColor = no;
### NSDT ###
input HamaCalcMethod = {Method1,Default Method2};
input TrendSource = close;
input HAMALength  = 55;
input HAMAType    = {default EMA, WMA, SMA, HMA};
input HAMABar     = yes;
input HAMAMa      = yes;
#//MA INFO
input OpenLength  = 25;                      #"Length Open"
input OpenType    = {default EMA, SMA, WMA}; #"Type Open"
input HighLength  = 20;                      #"Length High"
input HighType    = {default EMA, SMA, WMA}; #"Type High"
input LowLength   = 20;                      #"Low"
input LowType     = {default EMA, SMA, WMA}; #"Type Low"
input CloseLength = 20;                     #"Length Close"
input CloseType   = {default EMA, SMA, WMA}; #"Close"
### SSL1Source ###
input ShowSSL   = yes; #(true, "Highlight State ?")
input SSLWicks  = no;#(false, "Take Wicks into Account ?")
input SSLType   = {WMA, default SMA, EMA, HMA};
input SSL_MaLength = 55; #"MA "Channel ?
### RSI ###
input RSIFilter = no;
input RSILength = 30;
input RSIMovAvg = 200;
### TDFI ###
input TDFIFilter = no;
input TDFIPeriod =  11;   # "Lookback"
input TDFIAbove  =  0.03; # "Filter High"
input TDFIBelow  = -0.03; # "Filter Low"
### ADX ###
input ADXFilter = no;
input ADXLength = 11;
input ADXLimit  = 20;
### Range Indicator
input RangeIndicatorFilter = no;
input RILength       = 11;
input RangeLimit     = 20;
input RangeSmoothing = 5;
##################
def na = Double.NaN;
def Op = open; def Cl = close; def Hi = High; def Lo = low;
def method = if HamaCalcMethod==HamaCalcMethod.Method1 then 1 else
             if HamaCalcMethod==HamaCalcMethod.Method2 then 0 else method[1];
########## Colors ########
DefineGlobalColor("Bull"        , CreateColor(38, 166, 154)); # HAMA GREEN - Teal
DefineGlobalColor("Bear"        , CreateColor(239, 83, 80));  # HAMA Red
DefineGlobalColor("WeakBull"    , CreateColor(204, 204, 0));  # HAMA DARK Yellow  
DefineGlobalColor("WeakBear"    , CreateColor(255, 128, 0));  # HAMA Orange
DefineGlobalColor("Neutral"     , CreateColor(255, 255, 0));  # HAMA Yellow

DefineGlobalColor("BullBar"     , CreateColor(0, 255, 0));    # GREEN
DefineGlobalColor("WeakBullBar" , CreateColor(0, 128, 0));    # Dark GREEN
DefineGlobalColor("BearBar"     , CreateColor(255, 0, 0));    # Red
DefineGlobalColor("WeakBearBar" , CreateColor(128, 0, 0));   # DARK RED
DefineGlobalColor("NeutralBar"  , CreateColor(255, 255, 0));  # yellow

DefineGlobalColor("BGBull"      , CreateColor (153, 255, 153));
DefineGlobalColor("BGBear"      , CreateColor (255, 153, 153));
#////////////////////////////////////////////////////////////////////////////////
#mat(source, length, type) =>
script mat {
    input source = close;
    input length = 69;
    input type   = "EMA";
    def mat;
    mat =
    if type == "SMA" then SimpleMovingAvg(source, length) else
    if type == "EMA" then ExpAverage(source, length) else
    if type == "WMA" then WMA(source, length) else
    if type == "HMA" then WMA(2 * WMA(source, length / 2) - WMA(source, length), Round(Sqrt(length)))
       else Double.NaN;
    plot result = mat;
}

def ma = WMA(TrendSource, HAMALength);

#//GRADIENT AREA
def center  = ExpAverage(ma, 3);
def xUp     = ma crosses above center;
def xDn     = ma crosses below center;
def chg     = ma - ma[1];
def up      = chg > 0;
def dn      = chg < 0;
def srcBull = ma > center;
def srcBear = ma < center;

#### TREND####
def StrongUP = srcBull and up;
def WeakUp   = srcBull and dn;
def StrongDN = srcBear and dn;
def WeakDN   = srcBear and up;
def Neutral  = xUp or xDn or !StrongUP and !StrongDN and !WeakUp and !WeakDN;

def SourceClose = (Op + Hi + Lo + Cl) / 4;
def LengthClose = CloseLength;

def SourceOpen = CompoundValue(1, (SourceOpen[1] + SourceClose[1]) / 2, SourceClose) ;
def LengthOpen = OpenLength;

def SourceHigh = Max(Max(Hi, SourceOpen), SourceClose);
def LengthHigh = HighLength;

def SourceLow = Min(Min(Lo, SourceOpen), SourceClose);
def LengthLow = LowLength;

def SrcOpen = (Op[1] + Cl[1]) / 2;
def SrcHigh = Max(Hi, Cl);
def SrcLow = Min(Lo, Cl);
def SrcClose = SourceClose;
#funcCalcMA1(type1, src1, len1) =>
script funcCalcMA1 {
    input type1 = "EMA";
    input src1  = close;
    input len1  = 0;
    def funcCalcMA1;
    funcCalcMA1 = if type1 == "SMA" then SimpleMovingAvg(src1, len1) else
                  if type1 == "EMA" then ExpAverage(src1, len1) else WMA(src1, len1);
    plot result = funcCalcMA1;
}
#funcCalcOpen(TypeOpen, SourceOpen, LengthOpen) =>
script funcCalcOpen {
    input TypeOpen   = "EMA";
    input SourceOpen = close;
    input LengthOpen = 0;
    def funcCalcOpen;
    funcCalcOpen = if TypeOpen == "SMA" then SimpleMovingAvg(SourceOpen, LengthOpen) else
                   if TypeOpen == "EMA" then ExpAverage(SourceOpen, LengthOpen) else WMA(SourceOpen, LengthOpen);
    plot result = funcCalcOpen;
}
#funcCalcHigh(TypeHigh, SourceHigh, LengthHigh) =>
script funcCalcHigh {
    input TypeHigh   = "EMA";
    input SourceHigh = close;
    input LengthHigh = 0;
    def funcCalcHigh;
    funcCalcHigh = if TypeHigh == "SMA" then SimpleMovingAvg(SourceHigh, LengthHigh) else
                   if TypeHigh == "EMA" then ExpAverage(SourceHigh, LengthHigh) else WMA(SourceHigh, LengthHigh);
    plot result = funcCalcHigh;
}
#funcCalcLow(TypeLow, SourceLow, LengthLow) =>
script funcCalcLow {
    input TypeLow   = "EMA";
    input SourceLow = close;
    input LengthLow = 0;
    def funcCalcLow;
    funcCalcLow = if TypeLow == "SMA" then SimpleMovingAvg(SourceLow, LengthLow) else
                  if TypeLow == "EMA" then ExpAverage(SourceLow, LengthLow) else WMA(SourceLow, LengthLow);
    plot result = funcCalcLow;
}
#funcCalcClose(TypeClose, SourceClose, LengthClose) =>
script funcCalcClose {
    input TypeClose   = "EMA";
    input SourceClose = close;
    input LengthClose = 0;
    def funcCalcClose;
    funcCalcClose = if TypeClose == "SMA" then SimpleMovingAvg(SourceClose, LengthClose) else
                    if TypeClose == "EMA" then ExpAverage(SourceClose, LengthClose) else WMA(SourceClose, LengthClose);
    plot result = funcCalcClose;
}

# Plot the new Chart
def CandleOpen1  = funcCalcOpen(OpenType, SourceOpen, LengthOpen);
def CandleHigh1  = funcCalcHigh(HighType, SourceHigh, LengthHigh);
def CandleLow1   = funcCalcLow(LowType, SourceLow, LengthLow);
def CandleClose1 = funcCalcClose(CloseType, SourceClose, LengthClose);
def CandleOpen2  = funcCalcOpen(OpenType, SrcOpen, LengthOpen);
def CandleHigh2  = funcCalcHigh(HighType, SrcHigh, LengthHigh);
def CandleLow2  = funcCalcLow(LowType, SrcLow, LengthLow);
def CandleClose2 = funcCalcClose(CloseType, SrcClose, LengthClose);

def MAValue  = funcCalcMA1(HAMAType, TrendSource, HAMALength);

plot MALine = if HAMAMa then MAValue else na;
MALine.SetStyle(Curve.FIRM);
MALine.AssignValueColor( if StrongUP then GlobalColor("Bull")     else
                         if WeakUp   then GlobalColor("WeakBull") else
                         if StrongDN then GlobalColor("Bear")     else
                         if WeakDN   then GlobalColor("WeakBear") else GlobalColor("Neutral"));

def CandleOpen  = if method then CandleOpen1 else CandleOpen2;
def CandleHigh  = if method then CandleHigh1 else CandleHigh2;
def CandleLow   = if method then CandleLow1 else CandleLow2;
def CandleClose = if method then CandleClose1 else CandleClose2;

# Plot STRONG UP
def UpO1;
def UpH1;
def UpL1;
def UpC1;
if StrongUP and HAMABar
then {
    UpO1 = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    UpH1 = if CandleHigh > CandleClose then CandleClose else CandleHigh;
    UpL1 = if CandleLow  < CandleOpen  then CandleOpen  else CandleLow;
    UpC1 = if CandleOpen < CandleClose then CandleOpen  else CandleClose;
} else
{
    UpO1 = na;
    UpH1 = na;
    UpL1 = na;
    UpC1 = na;
}
# Plot WEAK UP
def UpO;
def UpH;
def UpL;
def UpC;
if WeakUp and HAMABar
then {
    UpO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    UpH = if CandleHigh > CandleClose then CandleClose else CandleHigh;
    UpL = if CandleLow  < CandleOpen  then CandleOpen else CandleLow;
    UpC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    UpO = na;
    UpH = na;
    UpL = na;
    UpC = na;
}
# Plot WEAK DOWN
def DnO;
def DnH;
def DnL;
def DnC;
if WeakDN and HAMABar
then {
    DnO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    DnH = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    DnL = if CandleLow  < CandleClose then CandleClose else CandleLow;
    DnC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    DnO = na;
    DnH = na;
    DnL = na;
    DnC = na;
}
# Plot STRONG DOWN
def DnO1;
def DnH1;
def DnL1;
def DnC1;
if StrongDN and HAMABar
then {
    DnO1 = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    DnH1 = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    DnL1 = if CandleLow  < CandleClose then CandleClose else CandleLow;
    DnC1 = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    DnO1 = na;
    DnH1 = na;
    DnL1 = na;
    DnC1 = na;
}
# Plot Neutral
def NuO;
def NuH;
def NuL;
def NuC;
if Neutral and HAMABar
then {
    NuO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    NuH = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    NuL = if CandleLow  < CandleClose then CandleClose else CandleLow;
    NuC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    NuO = na;
    NuH = na;
    NuL = na;
    NuC = na;
}
# Plot the new Chart
AddChart(high = UpH1, low = UpL1, open = UpO1, close = UpC1,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Bull"));
AddChart(high = UpH , low = UpL , open = UpO,  close = UpC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("WeakBull"));

AddChart(high = DnH1, low = DnL1, open = DnO1, close = DnC1,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Bear"));
AddChart(high = DnH , low = DnL , open = DnO,  close = DnC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("WeakBear"));

AddChart(high = NuH , low = NuL , open = NuO,  close = NuC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Neutral"));
########
#indicator("SSL Channel", by MissTricky)
#https://www.tradingview.com/script/6y9SkpnV-SSL-Channel/
def ma1 = mat(Hi,SSL_MaLength, SSLType);
def ma2 = mat(Lo ,SSL_MaLength, SSLType);

def Hlv1 = if (if SSLWicks then Hi else Cl) > ma1 then 1 else
           if (if SSLWicks then Lo  else Cl) < ma2 then -1 else Hlv1[1];
def Hlv = Hlv1;

def sslUp   = if Hlv < 0 then ma2 else ma1;
def sslDown = if Hlv < 0 then ma1 else ma2;

def SSLBull = Hlv1 > 0 and Hlv1[1] < 0;
def SSLBear = Hlv1 < 0 and Hlv1[1] > 0;

plot highLine = if ShowSSL then sslUp else na;
plot lowLine  = if ShowSSL then sslDown else na;

highLine.AssignValueColor(if Hlv > 0 then Color.GREEN else color.RED);
lowLine.AssignValueColor( if Hlv > 0 then Color.GREEN else color.RED);

highLine.AssignValueColor(if Hlv > 0 then Color.GREEN else Color.RED);
lowLine.AssignValueColor( if Hlv > 0 then Color.GREEN else Color.RED);

AddCloud (highLine, lowLine, Color.DARK_GREEN, Color.DARK_RED, no);

##### RSI
def RSIup   = WildersAverage(Max(Cl - Cl[1], 0), rsiLength);
def RSIdown = WildersAverage(-Min(Cl - Cl[1], 0), rsiLength);
def RSIvalue = if RSIdown == 0 then 100 else if RSIup == 0 then 0 else 100 - (100 / (1 + RSIup / RSIdown));
def RSIAvg   = SimpleMovingAvg(RSIvalue, RSIMovAvg);
def RSI = if RSIvalue > RSIAvg then  1 else
          if RSIvalue < RSIAvg then -1 else na;

##### TDFI
def mma  = ExpAverage(Cl * 1000, TDFIPeriod);
def smma = ExpAverage(mma, TDFIPeriod);
def impetmma  = mma - mma[1];
def impetsmma = smma - smma[1];
def divma = AbsValue(mma - smma);
def averimpet = (impetmma + impetsmma) / 2;
def tdf  = Power(divma, 1) * Power(averimpet, 3);
def TDFIvalue = tdf / Highest(AbsValue(tdf), TDFIPeriod * 3);
def TDFI = if TDFIvalue > TDFIAbove then  1 else
           if TDFIvalue < TDFIBelow then -1 else na;

###### ADX Filter
def ADXvalue = DMI(ADXLength, AverageType.WILDERS).ADX;
def ADX      = if ADXvalue >= ADXlimit then 1 else na;

###### Range Indicator
def data = TrueRange(Hi, Cl, Lo) / if Cl > Cl[1] then (Cl - Cl[1]) else 1;
def hData = Highest(data, RILength);
def lData = Lowest(data, RILength);
def range = 100 * (data - lData) / if hData > lData then (hData - lData) else 1;
def RIvalue = ExpAverage(range, RangeSmoothing);
def RI = if RIvalue >= Rangelimit then 1 else na;

### Signal###
def UpOpen = if CandleOpen < CandleClose then CandleClose else CandleOpen;
def UpHigh = if CandleHigh > CandleClose then CandleClose else CandleHigh;
def UpLow  = if CandleLow  < CandleOpen  then CandleOpen  else CandleLow;
def UpClose= if CandleOpen < CandleClose then CandleOpen  else CandleClose;

def DnOpen = if CandleOpen < CandleClose then CandleClose else CandleOpen;
def DnHigh = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
def DnLow  = if CandleLow  < CandleClose then CandleClose else CandleLow;
def DnClose= if CandleOpen < CandleClose then CandleOpen else CandleClose;

def HAMAHigh = Cl > CandleLow;
def HAMALow  = Lo < DnLow;

def SigUp    = if TDFIFilter then (SSLBull and Cl > MAValue and HAMAHigh and TDFI > 0)
                             else (SSLBull and Cl > MAValue and HAMAHigh);
def SigUp1   = if ADXFilter then SigUp and ADX else SigUp;
def SigUp2   = if RangeIndicatorFilter then SigUp1 and RI else SigUp1;
def SignalUp = if RSIFilter then SigUp2 and RSI > 0 else SigUp2;

def SigDN = if TDFIFilter then (SSLBear and Cl < MAValue and HAMALow and TDFI < 0)
                          else (SSLBear and Cl < MAValue and HAMALow);
def SigDn1 = if ADXFilter then SigDn and ADX else SigDn;
def SigDn2 = if RangeIndicatorFilter then SigDn1 and RI else SigDn1;
def SignalDn = if RSIFilter then SigDn2 and RSI < 0 else SigDn2;

plot Arrow_Up = if showArrow and SignalUp then Lo  else na;
plot Arrow_Dn = if showArrow and SignalDn then Hi else na;

Arrow_Up.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
Arrow_Up.SetDefaultColor(Color.WHITE);
Arrow_Up.SetLineWeight(3);

Arrow_Dn.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
Arrow_Dn.SetDefaultColor(Color.YELLOW);
Arrow_Dn.SetLineWeight(3);

##### Background & Price Color
AssignPriceColor(if ColorBar  then
                  if Neutral  then GlobalColor("NeutralBar")  else
                  if StrongUP and Cl < UpHigh then GlobalColor("WeakBullBar") else
                  if StrongUP and Cl > UpHigh then GlobalColor("BullBar")     else
                  if StrongDN and Cl < DnLow  then GlobalColor("BearBar")     else
                  if StrongDN and Cl > DnLow then GlobalColor("WeakBearBar")  else
                                                 Color.DARK_ORANGE else Color.CURRENT);

AssignBackgroundColor(if BackgroundColor then
                  if StrongUP and Cl > UpHigh then GlobalColor("BGBull") else
                  if StrongDN and Cl < DnLow  then GlobalColor("BGBear") else
                    Color.CURRENT else Color.CURRENT);

### ENd ####
Hey @samer800 Is there an alert or a scan or watchlist for when the Hama turns or candles turn Yellow?
 
yes. how, the creater changed little bit the calc method. I included in the script. You can try both methods.

CSS:
#study("NSDT HAMA Candles", overlay=true)
#//The follow gradient code is taken from the Pinecoders Gradient Framework example.
#//https://www.tradingview.com/script/hqH4YIFa-Color-Gradient-Framework-PineCoders/
#https://www.tradingview.com/script/k7nrF2oI-NSDT-HAMA-Candles/
# included SSL Channel https://www.tradingview.com/script/6y9SkpnV-SSL-Channel/
# Youtube strategy https://www.youtube.com/watch?v=YJrELewfIrU
#Converted by Sam4Cok @ 07/2022
#Ver 1.1 by Sam4Cok @ 07/2022  -- Added Filters (ADX / TDFI / Range Indicator and options to Show/Hide indicators
#Ver 1.2 by Sam4COK @ 07/2022 -- Added Background Color, RSI Filter, signal enhancment.
# updated by Sam4COK@Samer800 - 12/2022 - Added method 2 for HA calc

#//INPUTS
input ColorBar   = no;
input showArrow  = yes;
input BackgroundColor = no;
### NSDT ###
input HamaCalcMethod = {Method1,Default Method2};
input TrendSource = close;
input HAMALength  = 55;
input HAMAType    = {default EMA, WMA, SMA, HMA};
input HAMABar     = yes;
input HAMAMa      = yes;
#//MA INFO
input OpenLength  = 25;                      #"Length Open"
input OpenType    = {default EMA, SMA, WMA}; #"Type Open"
input HighLength  = 20;                      #"Length High"
input HighType    = {default EMA, SMA, WMA}; #"Type High"
input LowLength   = 20;                      #"Low"
input LowType     = {default EMA, SMA, WMA}; #"Type Low"
input CloseLength = 20;                     #"Length Close"
input CloseType   = {default EMA, SMA, WMA}; #"Close"
### SSL1Source ###
input ShowSSL   = yes; #(true, "Highlight State ?")
input SSLWicks  = no;#(false, "Take Wicks into Account ?")
input SSLType   = {WMA, default SMA, EMA, HMA};
input SSL_MaLength = 55; #"MA "Channel ?
### RSI ###
input RSIFilter = no;
input RSILength = 30;
input RSIMovAvg = 200;
### TDFI ###
input TDFIFilter = no;
input TDFIPeriod =  11;   # "Lookback"
input TDFIAbove  =  0.03; # "Filter High"
input TDFIBelow  = -0.03; # "Filter Low"
### ADX ###
input ADXFilter = no;
input ADXLength = 11;
input ADXLimit  = 20;
### Range Indicator
input RangeIndicatorFilter = no;
input RILength       = 11;
input RangeLimit     = 20;
input RangeSmoothing = 5;
##################
def na = Double.NaN;
def Op = open; def Cl = close; def Hi = High; def Lo = low;
def method = if HamaCalcMethod==HamaCalcMethod.Method1 then 1 else
             if HamaCalcMethod==HamaCalcMethod.Method2 then 0 else method[1];
########## Colors ########
DefineGlobalColor("Bull"        , CreateColor(38, 166, 154)); # HAMA GREEN - Teal
DefineGlobalColor("Bear"        , CreateColor(239, 83, 80));  # HAMA Red
DefineGlobalColor("WeakBull"    , CreateColor(204, 204, 0));  # HAMA DARK Yellow  
DefineGlobalColor("WeakBear"    , CreateColor(255, 128, 0));  # HAMA Orange
DefineGlobalColor("Neutral"     , CreateColor(255, 255, 0));  # HAMA Yellow

DefineGlobalColor("BullBar"     , CreateColor(0, 255, 0));    # GREEN
DefineGlobalColor("WeakBullBar" , CreateColor(0, 128, 0));    # Dark GREEN
DefineGlobalColor("BearBar"     , CreateColor(255, 0, 0));    # Red
DefineGlobalColor("WeakBearBar" , CreateColor(128, 0, 0));   # DARK RED
DefineGlobalColor("NeutralBar"  , CreateColor(255, 255, 0));  # yellow

DefineGlobalColor("BGBull"      , CreateColor (153, 255, 153));
DefineGlobalColor("BGBear"      , CreateColor (255, 153, 153));
#////////////////////////////////////////////////////////////////////////////////
#mat(source, length, type) =>
script mat {
    input source = close;
    input length = 69;
    input type   = "EMA";
    def mat;
    mat =
    if type == "SMA" then SimpleMovingAvg(source, length) else
    if type == "EMA" then ExpAverage(source, length) else
    if type == "WMA" then WMA(source, length) else
    if type == "HMA" then WMA(2 * WMA(source, length / 2) - WMA(source, length), Round(Sqrt(length)))
       else Double.NaN;
    plot result = mat;
}

def ma = WMA(TrendSource, HAMALength);

#//GRADIENT AREA
def center  = ExpAverage(ma, 3);
def xUp     = ma crosses above center;
def xDn     = ma crosses below center;
def chg     = ma - ma[1];
def up      = chg > 0;
def dn      = chg < 0;
def srcBull = ma > center;
def srcBear = ma < center;

#### TREND####
def StrongUP = srcBull and up;
def WeakUp   = srcBull and dn;
def StrongDN = srcBear and dn;
def WeakDN   = srcBear and up;
def Neutral  = xUp or xDn or !StrongUP and !StrongDN and !WeakUp and !WeakDN;

def SourceClose = (Op + Hi + Lo + Cl) / 4;
def LengthClose = CloseLength;

def SourceOpen = CompoundValue(1, (SourceOpen[1] + SourceClose[1]) / 2, SourceClose) ;
def LengthOpen = OpenLength;

def SourceHigh = Max(Max(Hi, SourceOpen), SourceClose);
def LengthHigh = HighLength;

def SourceLow = Min(Min(Lo, SourceOpen), SourceClose);
def LengthLow = LowLength;

def SrcOpen = (Op[1] + Cl[1]) / 2;
def SrcHigh = Max(Hi, Cl);
def SrcLow = Min(Lo, Cl);
def SrcClose = SourceClose;
#funcCalcMA1(type1, src1, len1) =>
script funcCalcMA1 {
    input type1 = "EMA";
    input src1  = close;
    input len1  = 0;
    def funcCalcMA1;
    funcCalcMA1 = if type1 == "SMA" then SimpleMovingAvg(src1, len1) else
                  if type1 == "EMA" then ExpAverage(src1, len1) else WMA(src1, len1);
    plot result = funcCalcMA1;
}
#funcCalcOpen(TypeOpen, SourceOpen, LengthOpen) =>
script funcCalcOpen {
    input TypeOpen   = "EMA";
    input SourceOpen = close;
    input LengthOpen = 0;
    def funcCalcOpen;
    funcCalcOpen = if TypeOpen == "SMA" then SimpleMovingAvg(SourceOpen, LengthOpen) else
                   if TypeOpen == "EMA" then ExpAverage(SourceOpen, LengthOpen) else WMA(SourceOpen, LengthOpen);
    plot result = funcCalcOpen;
}
#funcCalcHigh(TypeHigh, SourceHigh, LengthHigh) =>
script funcCalcHigh {
    input TypeHigh   = "EMA";
    input SourceHigh = close;
    input LengthHigh = 0;
    def funcCalcHigh;
    funcCalcHigh = if TypeHigh == "SMA" then SimpleMovingAvg(SourceHigh, LengthHigh) else
                   if TypeHigh == "EMA" then ExpAverage(SourceHigh, LengthHigh) else WMA(SourceHigh, LengthHigh);
    plot result = funcCalcHigh;
}
#funcCalcLow(TypeLow, SourceLow, LengthLow) =>
script funcCalcLow {
    input TypeLow   = "EMA";
    input SourceLow = close;
    input LengthLow = 0;
    def funcCalcLow;
    funcCalcLow = if TypeLow == "SMA" then SimpleMovingAvg(SourceLow, LengthLow) else
                  if TypeLow == "EMA" then ExpAverage(SourceLow, LengthLow) else WMA(SourceLow, LengthLow);
    plot result = funcCalcLow;
}
#funcCalcClose(TypeClose, SourceClose, LengthClose) =>
script funcCalcClose {
    input TypeClose   = "EMA";
    input SourceClose = close;
    input LengthClose = 0;
    def funcCalcClose;
    funcCalcClose = if TypeClose == "SMA" then SimpleMovingAvg(SourceClose, LengthClose) else
                    if TypeClose == "EMA" then ExpAverage(SourceClose, LengthClose) else WMA(SourceClose, LengthClose);
    plot result = funcCalcClose;
}

# Plot the new Chart
def CandleOpen1  = funcCalcOpen(OpenType, SourceOpen, LengthOpen);
def CandleHigh1  = funcCalcHigh(HighType, SourceHigh, LengthHigh);
def CandleLow1   = funcCalcLow(LowType, SourceLow, LengthLow);
def CandleClose1 = funcCalcClose(CloseType, SourceClose, LengthClose);
def CandleOpen2  = funcCalcOpen(OpenType, SrcOpen, LengthOpen);
def CandleHigh2  = funcCalcHigh(HighType, SrcHigh, LengthHigh);
def CandleLow2  = funcCalcLow(LowType, SrcLow, LengthLow);
def CandleClose2 = funcCalcClose(CloseType, SrcClose, LengthClose);

def MAValue  = funcCalcMA1(HAMAType, TrendSource, HAMALength);

plot MALine = if HAMAMa then MAValue else na;
MALine.SetStyle(Curve.FIRM);
MALine.AssignValueColor( if StrongUP then GlobalColor("Bull")     else
                         if WeakUp   then GlobalColor("WeakBull") else
                         if StrongDN then GlobalColor("Bear")     else
                         if WeakDN   then GlobalColor("WeakBear") else GlobalColor("Neutral"));

def CandleOpen  = if method then CandleOpen1 else CandleOpen2;
def CandleHigh  = if method then CandleHigh1 else CandleHigh2;
def CandleLow   = if method then CandleLow1 else CandleLow2;
def CandleClose = if method then CandleClose1 else CandleClose2;

# Plot STRONG UP
def UpO1;
def UpH1;
def UpL1;
def UpC1;
if StrongUP and HAMABar
then {
    UpO1 = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    UpH1 = if CandleHigh > CandleClose then CandleClose else CandleHigh;
    UpL1 = if CandleLow  < CandleOpen  then CandleOpen  else CandleLow;
    UpC1 = if CandleOpen < CandleClose then CandleOpen  else CandleClose;
} else
{
    UpO1 = na;
    UpH1 = na;
    UpL1 = na;
    UpC1 = na;
}
# Plot WEAK UP
def UpO;
def UpH;
def UpL;
def UpC;
if WeakUp and HAMABar
then {
    UpO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    UpH = if CandleHigh > CandleClose then CandleClose else CandleHigh;
    UpL = if CandleLow  < CandleOpen  then CandleOpen else CandleLow;
    UpC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    UpO = na;
    UpH = na;
    UpL = na;
    UpC = na;
}
# Plot WEAK DOWN
def DnO;
def DnH;
def DnL;
def DnC;
if WeakDN and HAMABar
then {
    DnO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    DnH = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    DnL = if CandleLow  < CandleClose then CandleClose else CandleLow;
    DnC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    DnO = na;
    DnH = na;
    DnL = na;
    DnC = na;
}
# Plot STRONG DOWN
def DnO1;
def DnH1;
def DnL1;
def DnC1;
if StrongDN and HAMABar
then {
    DnO1 = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    DnH1 = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    DnL1 = if CandleLow  < CandleClose then CandleClose else CandleLow;
    DnC1 = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    DnO1 = na;
    DnH1 = na;
    DnL1 = na;
    DnC1 = na;
}
# Plot Neutral
def NuO;
def NuH;
def NuL;
def NuC;
if Neutral and HAMABar
then {
    NuO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    NuH = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    NuL = if CandleLow  < CandleClose then CandleClose else CandleLow;
    NuC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    NuO = na;
    NuH = na;
    NuL = na;
    NuC = na;
}
# Plot the new Chart
AddChart(high = UpH1, low = UpL1, open = UpO1, close = UpC1,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Bull"));
AddChart(high = UpH , low = UpL , open = UpO,  close = UpC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("WeakBull"));

AddChart(high = DnH1, low = DnL1, open = DnO1, close = DnC1,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Bear"));
AddChart(high = DnH , low = DnL , open = DnO,  close = DnC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("WeakBear"));

AddChart(high = NuH , low = NuL , open = NuO,  close = NuC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Neutral"));
########
#indicator("SSL Channel", by MissTricky)
#https://www.tradingview.com/script/6y9SkpnV-SSL-Channel/
def ma1 = mat(Hi,SSL_MaLength, SSLType);
def ma2 = mat(Lo ,SSL_MaLength, SSLType);

def Hlv1 = if (if SSLWicks then Hi else Cl) > ma1 then 1 else
           if (if SSLWicks then Lo  else Cl) < ma2 then -1 else Hlv1[1];
def Hlv = Hlv1;

def sslUp   = if Hlv < 0 then ma2 else ma1;
def sslDown = if Hlv < 0 then ma1 else ma2;

def SSLBull = Hlv1 > 0 and Hlv1[1] < 0;
def SSLBear = Hlv1 < 0 and Hlv1[1] > 0;

plot highLine = if ShowSSL then sslUp else na;
plot lowLine  = if ShowSSL then sslDown else na;

highLine.AssignValueColor(if Hlv > 0 then Color.GREEN else color.RED);
lowLine.AssignValueColor( if Hlv > 0 then Color.GREEN else color.RED);

highLine.AssignValueColor(if Hlv > 0 then Color.GREEN else Color.RED);
lowLine.AssignValueColor( if Hlv > 0 then Color.GREEN else Color.RED);

AddCloud (highLine, lowLine, Color.DARK_GREEN, Color.DARK_RED, no);

##### RSI
def RSIup   = WildersAverage(Max(Cl - Cl[1], 0), rsiLength);
def RSIdown = WildersAverage(-Min(Cl - Cl[1], 0), rsiLength);
def RSIvalue = if RSIdown == 0 then 100 else if RSIup == 0 then 0 else 100 - (100 / (1 + RSIup / RSIdown));
def RSIAvg   = SimpleMovingAvg(RSIvalue, RSIMovAvg);
def RSI = if RSIvalue > RSIAvg then  1 else
          if RSIvalue < RSIAvg then -1 else na;

##### TDFI
def mma  = ExpAverage(Cl * 1000, TDFIPeriod);
def smma = ExpAverage(mma, TDFIPeriod);
def impetmma  = mma - mma[1];
def impetsmma = smma - smma[1];
def divma = AbsValue(mma - smma);
def averimpet = (impetmma + impetsmma) / 2;
def tdf  = Power(divma, 1) * Power(averimpet, 3);
def TDFIvalue = tdf / Highest(AbsValue(tdf), TDFIPeriod * 3);
def TDFI = if TDFIvalue > TDFIAbove then  1 else
           if TDFIvalue < TDFIBelow then -1 else na;

###### ADX Filter
def ADXvalue = DMI(ADXLength, AverageType.WILDERS).ADX;
def ADX      = if ADXvalue >= ADXlimit then 1 else na;

###### Range Indicator
def data = TrueRange(Hi, Cl, Lo) / if Cl > Cl[1] then (Cl - Cl[1]) else 1;
def hData = Highest(data, RILength);
def lData = Lowest(data, RILength);
def range = 100 * (data - lData) / if hData > lData then (hData - lData) else 1;
def RIvalue = ExpAverage(range, RangeSmoothing);
def RI = if RIvalue >= Rangelimit then 1 else na;

### Signal###
def UpOpen = if CandleOpen < CandleClose then CandleClose else CandleOpen;
def UpHigh = if CandleHigh > CandleClose then CandleClose else CandleHigh;
def UpLow  = if CandleLow  < CandleOpen  then CandleOpen  else CandleLow;
def UpClose= if CandleOpen < CandleClose then CandleOpen  else CandleClose;

def DnOpen = if CandleOpen < CandleClose then CandleClose else CandleOpen;
def DnHigh = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
def DnLow  = if CandleLow  < CandleClose then CandleClose else CandleLow;
def DnClose= if CandleOpen < CandleClose then CandleOpen else CandleClose;

def HAMAHigh = Cl > CandleLow;
def HAMALow  = Lo < DnLow;

def SigUp    = if TDFIFilter then (SSLBull and Cl > MAValue and HAMAHigh and TDFI > 0)
                             else (SSLBull and Cl > MAValue and HAMAHigh);
def SigUp1   = if ADXFilter then SigUp and ADX else SigUp;
def SigUp2   = if RangeIndicatorFilter then SigUp1 and RI else SigUp1;
def SignalUp = if RSIFilter then SigUp2 and RSI > 0 else SigUp2;

def SigDN = if TDFIFilter then (SSLBear and Cl < MAValue and HAMALow and TDFI < 0)
                          else (SSLBear and Cl < MAValue and HAMALow);
def SigDn1 = if ADXFilter then SigDn and ADX else SigDn;
def SigDn2 = if RangeIndicatorFilter then SigDn1 and RI else SigDn1;
def SignalDn = if RSIFilter then SigDn2 and RSI < 0 else SigDn2;

plot Arrow_Up = if showArrow and SignalUp then Lo  else na;
plot Arrow_Dn = if showArrow and SignalDn then Hi else na;

Arrow_Up.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
Arrow_Up.SetDefaultColor(Color.WHITE);
Arrow_Up.SetLineWeight(3);

Arrow_Dn.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
Arrow_Dn.SetDefaultColor(Color.YELLOW);
Arrow_Dn.SetLineWeight(3);

##### Background & Price Color
AssignPriceColor(if ColorBar  then
                  if Neutral  then GlobalColor("NeutralBar")  else
                  if StrongUP and Cl < UpHigh then GlobalColor("WeakBullBar") else
                  if StrongUP and Cl > UpHigh then GlobalColor("BullBar")     else
                  if StrongDN and Cl < DnLow  then GlobalColor("BearBar")     else
                  if StrongDN and Cl > DnLow then GlobalColor("WeakBearBar")  else
                                                 Color.DARK_ORANGE else Color.CURRENT);

AssignBackgroundColor(if BackgroundColor then
                  if StrongUP and Cl > UpHigh then GlobalColor("BGBull") else
                  if StrongDN and Cl < DnLow  then GlobalColor("BGBear") else
                    Color.CURRENT else Color.CURRENT);

### ENd ####

Thank you.

I follow most of your work. I'm always curious. What confluences, strategies, etc. do you use for trading and what type of trading?
 
@samer800 Is there a way to create a scan or watchlist (Preferred) that will show when the Hama line/blocks turn yellow? I have been trying to figure out where this action is referred to in the code but cannot locate it.
I believe I have successfully created a Up Arrow and a Down Arrow Scan for the original script but I have no idea how to create a watchlist that will show a "Green" colored box when up is signaled and a "red" colored box when down is signaled. Any help, if it is achievable would be appreciated.

Can someone please add an addorder to this strat or provide the proper code so that I may add it. I have tried and cannot get it to work. I would like to use the Floating PL to back test. Thanks.
 
Last edited:
@samer800 Is there a way to create a scan or watchlist (Preferred) that will show when the Hama line/blocks turn yellow? I have been trying to figure out where this action is referred to in the code but cannot locate it.
I believe I have successfully created a Up Arrow and a Down Arrow Scan for the original script but I have no idea how to create a watchlist that will show a "Green" colored box when up is signaled and a "red" colored box when down is signaled. Any help, if it is achievable would be appreciated.

Can someone please add an addorder to this strat or provide the proper code so that I may add it. I have tried and cannot get it to work. I would like to use the Floating PL to back test. Thanks.
This indicator repaints.
We do not post backtesting scripts for repainters on this forum, as it gives viewers an inaccurate impression of how the indicator will work in real trading.
 
Last edited:
Thank you very much for your contributions
If I may ask, it is a repainting indicator?
The SSL channel portion of this script uses "future bars".
So yes, that is a type of repainting. It waits to find out what happened in the future, then goes back in history to repaint its calculations.

So, if "show ssl" is set to "No", it shouldn't repaint?
If "show ssl" is set to "No", that will remove the SSL channel from plotting on the chart, but the signals would still repaint based on the SSL calculations.
 

Ver 1.2
* added RSI filter, Background Color, some signal enhancement.



Code:
#study("NSDT HAMA Candles", overlay=true)
#//The follow gradient code is taken from the Pinecoders Gradient Framework example.
#//https://www.tradingview.com/script/hqH4YIFa-Color-Gradient-Framework-PineCoders/
#https://www.tradingview.com/script/k7nrF2oI-NSDT-HAMA-Candles/
# included SSL Channel https://www.tradingview.com/script/6y9SkpnV-SSL-Channel/
# Youtube strategy https://www.youtube.com/watch?v=YJrELewfIrU
#Converted by Sam4Cok @ 07/2022
#Ver 1.1 by Sam4Cok @ 07/2022  -- Added Filters (ADX / TDFI / Range Indicator and options to Show/Hide indicators
#Ver 1.2 by Sam4COK @ 07/2022 -- Added Background Color, RSI Filter, signal enhancment.

#//INPUTS
input ColorBar   = no;
input showArrow  = yes;
input BackgroundColor = no;
### NSDT ###
input TrendSource = close;
input HAMALength  = 69;
input HAMAType    = {default EMA, WMA, SMA, HMA};
input HAMABar     = yes;
input HAMAMa      = yes;
#//MA INFO
input OpenLength  = 25;                      #"Length Open"
input OpenType    = {default EMA, SMA, WMA}; #"Type Open"
input HighLength  = 20;                      #"Length High"
input HighType    = {default EMA, SMA, WMA}; #"Type High"
input LowLength   = 20;                      #"Low"
input LowType     = {default EMA, SMA, WMA}; #"Type Low"
input CloseLength = 20;                     #"Length Close"
input CloseType   = {default EMA, SMA, WMA}; #"Close"
### SSL1Source ###
input ShowSSL   = yes; #(true, "Highlight State ?")
input SSLWicks  = no;#(false, "Take Wicks into Account ?")
input SSLType   = {WMA, default SMA, EMA, HMA};
input SSL_MaLength = 69; #"MA "Channel ?
### RSI ###
input RSIFilter = no;
input RSILength = 30;
input RSIMovAvg = 200;
### TDFI ###
input TDFIFilter = no;
input TDFIPeriod =  11;   # "Lookback"
input TDFIAbove  =  0.03; # "Filter High"
input TDFIBelow  = -0.03; # "Filter Low"
### ADX ###
input ADXFilter = no;
input ADXLength = 11;
input ADXLimit  = 20;
### Range Indicator
input RangeIndicatorFilter = no;
input RILength       = 11;
input RangeLimit     = 20;
input RangeSmoothing = 5;
##################
def na = Double.NaN;
########## Colors ########
DefineGlobalColor("Bull"        , CreateColor(38, 166, 154)); # HAMA GREEN - Teal
DefineGlobalColor("Bear"        , CreateColor(239, 83, 80));  # HAMA Red
DefineGlobalColor("WeakBull"    , CreateColor(204, 204, 0));  # HAMA DARK Yellow 
DefineGlobalColor("WeakBear"    , CreateColor(255, 128, 0));  # HAMA Orange
DefineGlobalColor("Neutral"     , CreateColor(255, 255, 0));  # HAMA Yellow

DefineGlobalColor("BullBar"     , CreateColor(0, 255, 0));    # GREEN
DefineGlobalColor("WeakBullBar" , CreateColor(0, 128, 0));    # Dark GREEN
DefineGlobalColor("BearBar"     , CreateColor(255, 0, 0));    # Red
DefineGlobalColor("WeakBearBar" , CreateColor(128, 0, 0));   # DARK RED
DefineGlobalColor("NeutralBar"  , CreateColor(255, 255, 0));  # yellow

DefineGlobalColor("BGBull"      , CreateColor (153, 255, 153));
DefineGlobalColor("BGBear"      , CreateColor (255, 153, 153));
#////////////////////////////////////////////////////////////////////////////////
#mat(source, length, type) =>
script mat {
    input source = close;
    input length = 69;
    input type   = "EMA";
    def mat;
    mat =
    if type == "SMA" then SimpleMovingAvg(source, length) else
    if type == "EMA" then ExpAverage(source, length) else
    if type == "WMA" then WMA(source, length) else
    if type == "HMA" then WMA(2 * WMA(source, length / 2) - WMA(source, length), Round(Sqrt(length)))
       else Double.NaN;
    plot result = mat;
}

def ma = WMA(TrendSource, HAMALength);

#//GRADIENT AREA
def center  = ExpAverage(ma, 3);
def xUp     = ma crosses above center;
def xDn     = ma crosses below center;
def chg     = ma - ma[1];
def up      = chg > 0;
def dn      = chg < 0;
def srcBull = ma > center;
def srcBear = ma < center;

#### TREND####
def StrongUP = srcBull and up;
def WeakUp   = srcBull and dn;
def StrongDN = srcBear and dn;
def WeakDN   = srcBear and up;
def Neutral  = xUp or xDn or !StrongUP and !StrongDN and !WeakUp and !WeakDN;

def SourceClose = (open + high + low + close) / 4;
def LengthClose = CloseLength;

def SourceOpen = CompoundValue(1, (SourceOpen[1] + SourceClose[1]) / 2, SourceClose) ;
def LengthOpen = OpenLength;

def SourceHigh = Max(Max(high, SourceOpen), SourceClose);
def LengthHigh = HighLength;

def SourceLow = Min(Min(low, SourceOpen), SourceClose);
def LengthLow = LowLength;

#funcCalcMA1(type1, src1, len1) =>
script funcCalcMA1 {
    input type1 = "EMA";
    input src1  = close;
    input len1  = 0;
    def funcCalcMA1;
    funcCalcMA1 = if type1 == "SMA" then SimpleMovingAvg(src1, len1) else
                  if type1 == "EMA" then ExpAverage(src1, len1) else WMA(src1, len1);
    plot result = funcCalcMA1;
}
#funcCalcOpen(TypeOpen, SourceOpen, LengthOpen) =>
script funcCalcOpen {
    input TypeOpen   = "EMA";
    input SourceOpen = close;
    input LengthOpen = 0;
    def funcCalcOpen;
    funcCalcOpen = if TypeOpen == "SMA" then SimpleMovingAvg(SourceOpen, LengthOpen) else
                   if TypeOpen == "EMA" then ExpAverage(SourceOpen, LengthOpen) else WMA(SourceOpen, LengthOpen);
    plot result = funcCalcOpen;
}
#funcCalcHigh(TypeHigh, SourceHigh, LengthHigh) =>
script funcCalcHigh {
    input TypeHigh   = "EMA";
    input SourceHigh = close;
    input LengthHigh = 0;
    def funcCalcHigh;
    funcCalcHigh = if TypeHigh == "SMA" then SimpleMovingAvg(SourceHigh, LengthHigh) else
                   if TypeHigh == "EMA" then ExpAverage(SourceHigh, LengthHigh) else WMA(SourceHigh, LengthHigh);
    plot result = funcCalcHigh;
}
#funcCalcLow(TypeLow, SourceLow, LengthLow) =>
script funcCalcLow {
    input TypeLow   = "EMA";
    input SourceLow = close;
    input LengthLow = 0;
    def funcCalcLow;
    funcCalcLow = if TypeLow == "SMA" then SimpleMovingAvg(SourceLow, LengthLow) else
                  if TypeLow == "EMA" then ExpAverage(SourceLow, LengthLow) else WMA(SourceLow, LengthLow);
    plot result = funcCalcLow;
}
#funcCalcClose(TypeClose, SourceClose, LengthClose) =>
script funcCalcClose {
    input TypeClose   = "EMA";
    input SourceClose = close;
    input LengthClose = 0;
    def funcCalcClose;
    funcCalcClose = if TypeClose == "SMA" then SimpleMovingAvg(SourceClose, LengthClose) else
                    if TypeClose == "EMA" then ExpAverage(SourceClose, LengthClose) else WMA(SourceClose, LengthClose);
    plot result = funcCalcClose;
}

# Plot the new Chart
def CandleOpen  = funcCalcOpen(OpenType, SourceOpen, LengthOpen);
def CandleHigh  = funcCalcHigh(HighType, SourceHigh, LengthHigh);
def CandleLow   = funcCalcLow(LowType, SourceLow, LengthLow);
def CandleClose = funcCalcClose(CloseType, SourceClose, LengthClose);

def MAValue  = funcCalcMA1(HAMAType, TrendSource, HAMALength);

plot MALine = if HAMAMa then MAValue else na;
MALine.SetStyle(Curve.FIRM);
MALine.AssignValueColor( if StrongUP then GlobalColor("Bull")     else
                         if WeakUp   then GlobalColor("WeakBull") else
                         if StrongDN then GlobalColor("Bear")     else
                         if WeakDN   then GlobalColor("WeakBear") else GlobalColor("Neutral"));
MALine.SetLineWeight(1);

# Plot STRONG UP
def UpO1;
def UpH1;
def UpL1;
def UpC1;
if StrongUP and HAMABar
then {
    UpO1 = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    UpH1 = if CandleHigh > CandleClose then CandleClose else CandleHigh;
    UpL1 = if CandleLow  < CandleOpen  then CandleOpen  else CandleLow;
    UpC1 = if CandleOpen < CandleClose then CandleOpen  else CandleClose;
} else
{
    UpO1 = na;
    UpH1 = na;
    UpL1 = na;
    UpC1 = na;
}
# Plot WEAK UP
def UpO;
def UpH;
def UpL;
def UpC;
if WeakUp and HAMABar
then {
    UpO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    UpH = if CandleHigh > CandleClose then CandleClose else CandleHigh;
    UpL = if CandleLow  < CandleOpen  then CandleOpen else CandleLow;
    UpC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    UpO = na;
    UpH = na;
    UpL = na;
    UpC = na;
}
# Plot WEAK DOWN
def DnO;
def DnH;
def DnL;
def DnC;
if WeakDN and HAMABar
then {
    DnO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    DnH = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    DnL = if CandleLow  < CandleClose then CandleClose else CandleLow;
    DnC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    DnO = na;
    DnH = na;
    DnL = na;
    DnC = na;
}
# Plot STRONG DOWN
def DnO1;
def DnH1;
def DnL1;
def DnC1;
if StrongDN and HAMABar
then {
    DnO1 = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    DnH1 = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    DnL1 = if CandleLow  < CandleClose then CandleClose else CandleLow;
    DnC1 = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    DnO1 = na;
    DnH1 = na;
    DnL1 = na;
    DnC1 = na;
}
# Plot Neutral
def NuO;
def NuH;
def NuL;
def NuC;
if Neutral and HAMABar
then {
    NuO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    NuH = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    NuL = if CandleLow  < CandleClose then CandleClose else CandleLow;
    NuC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    NuO = na;
    NuH = na;
    NuL = na;
    NuC = na;
}
# Plot the new Chart
AddChart(high = UpH1, low = UpL1, open = UpO1, close = UpC1,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Bull"));
AddChart(high = UpH , low = UpL , open = UpO,  close = UpC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("WeakBull"));

AddChart(high = DnH1, low = DnL1, open = DnO1, close = DnC1,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Bear"));
AddChart(high = DnH , low = DnL , open = DnO,  close = DnC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("WeakBear"));

AddChart(high = NuH , low = NuL , open = NuO,  close = NuC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Neutral"));
########
#indicator("SSL Channel", by MissTricky)
#https://www.tradingview.com/script/6y9SkpnV-SSL-Channel/
def ma1 = mat(high,SSL_MaLength, SSLType);
def ma2 = mat(low ,SSL_MaLength, SSLType);

def Hlv1 = if (if SSLWicks then high else close) > ma1 then 1 else
           if (if SSLWicks then low  else close) < ma2 then -1 else Hlv1[1];
def Hlv = Hlv1;

def sslUp   = if Hlv < 0 then ma2 else ma1;
def sslDown = if Hlv < 0 then ma1 else ma2;

def SSLBull = Hlv1 > 0 and Hlv1[1] < 0;
def SSLBear = Hlv1 < 0 and Hlv1[1] > 0;

plot highLine = if ShowSSL then sslUp else na;
plot lowLine  = if ShowSSL then sslDown else na;

highLine.AssignValueColor(if Hlv > 0 then Color.GREEN else color.RED);
lowLine.AssignValueColor( if Hlv > 0 then Color.GREEN else color.RED);

highLine.AssignValueColor(if Hlv > 0 then Color.GREEN else Color.RED);
lowLine.AssignValueColor( if Hlv > 0 then Color.GREEN else Color.RED);

AddCloud (highLine, lowLine, Color.DARK_GREEN, Color.DARK_RED, no);

##### RSI
def RSIup   = WildersAverage(Max(close - close[1], 0), rsiLength);
def RSIdown = WildersAverage(-Min(close - close[1], 0), rsiLength);
def RSIvalue = if RSIdown == 0 then 100 else if RSIup == 0 then 0 else 100 - (100 / (1 + RSIup / RSIdown));
def RSIAvg   = SimpleMovingAvg(RSIvalue, RSIMovAvg);
def RSI = if RSIvalue > RSIAvg then  1 else
          if RSIvalue < RSIAvg then -1 else na;

##### TDFI
def mma  = ExpAverage(close * 1000, TDFIPeriod);
def smma = ExpAverage(mma, TDFIPeriod);
def impetmma  = mma - mma[1];
def impetsmma = smma - smma[1];
def divma = AbsValue(mma - smma);
def averimpet = (impetmma + impetsmma) / 2;
def tdf  = Power(divma, 1) * Power(averimpet, 3);
def TDFIvalue = tdf / Highest(AbsValue(tdf), TDFIPeriod * 3);
def TDFI = if TDFIvalue > TDFIAbove then  1 else
           if TDFIvalue < TDFIBelow then -1 else na;

###### ADX Filter
def ADXvalue = DMI(ADXLength, AverageType.WILDERS).ADX;
def ADX      = if ADXvalue >= ADXlimit then 1 else na;

###### Range Indicator
def data = TrueRange(high, close, low) / if close > close[1] then (close - close[1]) else 1;
def hData = Highest(data, RILength);
def lData = Lowest(data, RILength);
def range = 100 * (data - lData) / if hData > lData then (hData - lData) else 1;
def RIvalue = ExpAverage(range, RangeSmoothing);
def RI = if RIvalue >= Rangelimit then 1 else na;

### Signal###
def UpOpen = if CandleOpen < CandleClose then CandleClose else CandleOpen;
def UpHigh = if CandleHigh > CandleClose then CandleClose else CandleHigh;
def UpLow  = if CandleLow  < CandleOpen  then CandleOpen  else CandleLow;
def UpClose= if CandleOpen < CandleClose then CandleOpen  else CandleClose;

def DnOpen = if CandleOpen < CandleClose then CandleClose else CandleOpen;
def DnHigh = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
def DnLow  = if CandleLow  < CandleClose then CandleClose else CandleLow;
def DnClose= if CandleOpen < CandleClose then CandleOpen else CandleClose;

def HAMAHigh = close > CandleLow;
def HAMALow  = low < DnLow;

def SigUp    = if TDFIFilter then (SSLBull and close > MAValue and HAMAHigh and TDFI > 0)
                             else (SSLBull and close > MAValue and HAMAHigh);
def SigUp1   = if ADXFilter then SigUp and ADX else SigUp;
def SigUp2   = if RangeIndicatorFilter then SigUp1 and RI else SigUp1;
def SignalUp = if RSIFilter then SigUp2 and RSI > 0 else SigUp2;

def SigDN = if TDFIFilter then (SSLBear and close < MAValue and HAMALow and TDFI < 0)
                          else (SSLBear and close < MAValue and HAMALow);
def SigDn1 = if ADXFilter then SigDn and ADX else SigDn;
def SigDn2 = if RangeIndicatorFilter then SigDn1 and RI else SigDn1;
def SignalDn = if RSIFilter then SigDn2 and RSI < 0 else SigDn2;

plot Arrow_Up = if showArrow and SignalUp then low  else na;
plot Arrow_Dn = if showArrow and SignalDn then high else na;

Arrow_Up.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
Arrow_Up.SetDefaultColor(Color.WHITE);
Arrow_Up.SetLineWeight(3);

Arrow_Dn.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
Arrow_Dn.SetDefaultColor(Color.YELLOW);
Arrow_Dn.SetLineWeight(3);

##### Background & Price Color
AssignPriceColor(if ColorBar  then
                  if Neutral  then GlobalColor("NeutralBar")  else
                  if StrongUP and close < UpHigh then GlobalColor("WeakBullBar") else
                  if StrongUP and close > UpHigh then GlobalColor("BullBar")     else
                  if StrongDN and close < DnLow  then GlobalColor("BearBar")     else
                  if StrongDN and close > DnLow then GlobalColor("WeakBearBar")  else
                                                 Color.DARK_ORANGE else Color.CURRENT);

AssignBackgroundColor(if BackgroundColor then
                  if StrongUP and close > UpHigh then GlobalColor("BGBull") else
                  if StrongDN and close < DnLow  then GlobalColor("BGBear") else
                    Color.CURRENT else Color.CURRENT);

### ENd ####
Good afternoon! I wanted to see how the script works, added it to the graph, but unfortunately it does not work.. I'm trying it on tradingview. Maybe I don't understand something, I'm still a beginner))
 
Good afternoon! I wanted to see how the script works, added it to the graph, but unfortunately it does not work.. I'm trying it on tradingview. Maybe I don't understand something, I'm still a beginner))
Unfortunately, "doesn't work" is not enough information to say where you went astray.
Please post a "Shared Chart Link" which will allow members to 'see' what you are seeing.

Here are directions to creating a shared chart link:
https://intercom.help/simpler-trading/en/articles/3291051-how-to-share-a-chart-in-tos
 
@dap711 Can you turn this into a strategy with Buy, Sell, Close Labels? I believe this will be a great option for us.
https://tos.mx/mXCxBk4
Basically, you will see when the price crosses over the hama candles the hama will turn yellow and then a buy signal. This has been tested to be 80% accurate when used with the ADX filter on.
I di not know how to code. I did attempt it a time back but failed.

@dap711, I believe I have created a Strategy using the HAMA Strat and using the Macro Recorder. I have a couple of issues. My labels are staying black (not white) also, I would like to crate a close to buy and close to sell option but do not know how to accomplish this. i know where I want the close to happen. I am just not sure how to write it. Also, I cannot post the Hama with the Strategy as Merry Day has informed me that I am not allowed to show a backtesting of a study that repaints on this forum.
@samer800, I am using the Hama that you redesigned. Great job by the way.
 
Last edited by a moderator:
@METAL @dap711 This indicator repaints.
We take the trust of our 50,000 viewers seriously. We want to make sure that the information we provide is accurate and reliable. Unfortunately, it's not possible to backtest repainting studies because the bad signals have been erased, leaving only the perfect trades to be counted in the backtest. This leads to unrealistic and misleading results. We don't want to do a disservice to our viewers by posting something that isn't accurate. We know there's no reputable site that allows the posting of backtests of repainting scripts, and we want to make sure we're held to the same high standards. Thanks for understanding!
 
Last edited:
Thank you for sharing this, it looks very promising. Can anyone explain when is the short and long entry using this? I watched the video couple of times but don't understand the color changing part. It would be great if someone give a example?
And, what time frame works best?
 
yes. how, the creater changed little bit the calc method. I included in the script. You can try both methods.

CSS:
#study("NSDT HAMA Candles", overlay=true)
#//The follow gradient code is taken from the Pinecoders Gradient Framework example.
#//https://www.tradingview.com/script/hqH4YIFa-Color-Gradient-Framework-PineCoders/
#https://www.tradingview.com/script/k7nrF2oI-NSDT-HAMA-Candles/
# included SSL Channel https://www.tradingview.com/script/6y9SkpnV-SSL-Channel/
# Youtube strategy https://www.youtube.com/watch?v=YJrELewfIrU
#Converted by Sam4Cok @ 07/2022
#Ver 1.1 by Sam4Cok @ 07/2022  -- Added Filters (ADX / TDFI / Range Indicator and options to Show/Hide indicators
#Ver 1.2 by Sam4COK @ 07/2022 -- Added Background Color, RSI Filter, signal enhancment.
# updated by Sam4COK@Samer800 - 12/2022 - Added method 2 for HA calc

#//INPUTS
input ColorBar   = no;
input showArrow  = yes;
input BackgroundColor = no;
### NSDT ###
input HamaCalcMethod = {Method1,Default Method2};
input TrendSource = close;
input HAMALength  = 55;
input HAMAType    = {default EMA, WMA, SMA, HMA};
input HAMABar     = yes;
input HAMAMa      = yes;
#//MA INFO
input OpenLength  = 25;                      #"Length Open"
input OpenType    = {default EMA, SMA, WMA}; #"Type Open"
input HighLength  = 20;                      #"Length High"
input HighType    = {default EMA, SMA, WMA}; #"Type High"
input LowLength   = 20;                      #"Low"
input LowType     = {default EMA, SMA, WMA}; #"Type Low"
input CloseLength = 20;                     #"Length Close"
input CloseType   = {default EMA, SMA, WMA}; #"Close"
### SSL1Source ###
input ShowSSL   = yes; #(true, "Highlight State ?")
input SSLWicks  = no;#(false, "Take Wicks into Account ?")
input SSLType   = {WMA, default SMA, EMA, HMA};
input SSL_MaLength = 55; #"MA "Channel ?
### RSI ###
input RSIFilter = no;
input RSILength = 30;
input RSIMovAvg = 200;
### TDFI ###
input TDFIFilter = no;
input TDFIPeriod =  11;   # "Lookback"
input TDFIAbove  =  0.03; # "Filter High"
input TDFIBelow  = -0.03; # "Filter Low"
### ADX ###
input ADXFilter = no;
input ADXLength = 11;
input ADXLimit  = 20;
### Range Indicator
input RangeIndicatorFilter = no;
input RILength       = 11;
input RangeLimit     = 20;
input RangeSmoothing = 5;
##################
def na = Double.NaN;
def Op = open; def Cl = close; def Hi = High; def Lo = low;
def method = if HamaCalcMethod==HamaCalcMethod.Method1 then 1 else
             if HamaCalcMethod==HamaCalcMethod.Method2 then 0 else method[1];
########## Colors ########
DefineGlobalColor("Bull"        , CreateColor(38, 166, 154)); # HAMA GREEN - Teal
DefineGlobalColor("Bear"        , CreateColor(239, 83, 80));  # HAMA Red
DefineGlobalColor("WeakBull"    , CreateColor(204, 204, 0));  # HAMA DARK Yellow  
DefineGlobalColor("WeakBear"    , CreateColor(255, 128, 0));  # HAMA Orange
DefineGlobalColor("Neutral"     , CreateColor(255, 255, 0));  # HAMA Yellow

DefineGlobalColor("BullBar"     , CreateColor(0, 255, 0));    # GREEN
DefineGlobalColor("WeakBullBar" , CreateColor(0, 128, 0));    # Dark GREEN
DefineGlobalColor("BearBar"     , CreateColor(255, 0, 0));    # Red
DefineGlobalColor("WeakBearBar" , CreateColor(128, 0, 0));   # DARK RED
DefineGlobalColor("NeutralBar"  , CreateColor(255, 255, 0));  # yellow

DefineGlobalColor("BGBull"      , CreateColor (153, 255, 153));
DefineGlobalColor("BGBear"      , CreateColor (255, 153, 153));
#////////////////////////////////////////////////////////////////////////////////
#mat(source, length, type) =>
script mat {
    input source = close;
    input length = 69;
    input type   = "EMA";
    def mat;
    mat =
    if type == "SMA" then SimpleMovingAvg(source, length) else
    if type == "EMA" then ExpAverage(source, length) else
    if type == "WMA" then WMA(source, length) else
    if type == "HMA" then WMA(2 * WMA(source, length / 2) - WMA(source, length), Round(Sqrt(length)))
       else Double.NaN;
    plot result = mat;
}

def ma = WMA(TrendSource, HAMALength);

#//GRADIENT AREA
def center  = ExpAverage(ma, 3);
def xUp     = ma crosses above center;
def xDn     = ma crosses below center;
def chg     = ma - ma[1];
def up      = chg > 0;
def dn      = chg < 0;
def srcBull = ma > center;
def srcBear = ma < center;

#### TREND####
def StrongUP = srcBull and up;
def WeakUp   = srcBull and dn;
def StrongDN = srcBear and dn;
def WeakDN   = srcBear and up;
def Neutral  = xUp or xDn or !StrongUP and !StrongDN and !WeakUp and !WeakDN;

def SourceClose = (Op + Hi + Lo + Cl) / 4;
def LengthClose = CloseLength;

def SourceOpen = CompoundValue(1, (SourceOpen[1] + SourceClose[1]) / 2, SourceClose) ;
def LengthOpen = OpenLength;

def SourceHigh = Max(Max(Hi, SourceOpen), SourceClose);
def LengthHigh = HighLength;

def SourceLow = Min(Min(Lo, SourceOpen), SourceClose);
def LengthLow = LowLength;

def SrcOpen = (Op[1] + Cl[1]) / 2;
def SrcHigh = Max(Hi, Cl);
def SrcLow = Min(Lo, Cl);
def SrcClose = SourceClose;
#funcCalcMA1(type1, src1, len1) =>
script funcCalcMA1 {
    input type1 = "EMA";
    input src1  = close;
    input len1  = 0;
    def funcCalcMA1;
    funcCalcMA1 = if type1 == "SMA" then SimpleMovingAvg(src1, len1) else
                  if type1 == "EMA" then ExpAverage(src1, len1) else WMA(src1, len1);
    plot result = funcCalcMA1;
}
#funcCalcOpen(TypeOpen, SourceOpen, LengthOpen) =>
script funcCalcOpen {
    input TypeOpen   = "EMA";
    input SourceOpen = close;
    input LengthOpen = 0;
    def funcCalcOpen;
    funcCalcOpen = if TypeOpen == "SMA" then SimpleMovingAvg(SourceOpen, LengthOpen) else
                   if TypeOpen == "EMA" then ExpAverage(SourceOpen, LengthOpen) else WMA(SourceOpen, LengthOpen);
    plot result = funcCalcOpen;
}
#funcCalcHigh(TypeHigh, SourceHigh, LengthHigh) =>
script funcCalcHigh {
    input TypeHigh   = "EMA";
    input SourceHigh = close;
    input LengthHigh = 0;
    def funcCalcHigh;
    funcCalcHigh = if TypeHigh == "SMA" then SimpleMovingAvg(SourceHigh, LengthHigh) else
                   if TypeHigh == "EMA" then ExpAverage(SourceHigh, LengthHigh) else WMA(SourceHigh, LengthHigh);
    plot result = funcCalcHigh;
}
#funcCalcLow(TypeLow, SourceLow, LengthLow) =>
script funcCalcLow {
    input TypeLow   = "EMA";
    input SourceLow = close;
    input LengthLow = 0;
    def funcCalcLow;
    funcCalcLow = if TypeLow == "SMA" then SimpleMovingAvg(SourceLow, LengthLow) else
                  if TypeLow == "EMA" then ExpAverage(SourceLow, LengthLow) else WMA(SourceLow, LengthLow);
    plot result = funcCalcLow;
}
#funcCalcClose(TypeClose, SourceClose, LengthClose) =>
script funcCalcClose {
    input TypeClose   = "EMA";
    input SourceClose = close;
    input LengthClose = 0;
    def funcCalcClose;
    funcCalcClose = if TypeClose == "SMA" then SimpleMovingAvg(SourceClose, LengthClose) else
                    if TypeClose == "EMA" then ExpAverage(SourceClose, LengthClose) else WMA(SourceClose, LengthClose);
    plot result = funcCalcClose;
}

# Plot the new Chart
def CandleOpen1  = funcCalcOpen(OpenType, SourceOpen, LengthOpen);
def CandleHigh1  = funcCalcHigh(HighType, SourceHigh, LengthHigh);
def CandleLow1   = funcCalcLow(LowType, SourceLow, LengthLow);
def CandleClose1 = funcCalcClose(CloseType, SourceClose, LengthClose);
def CandleOpen2  = funcCalcOpen(OpenType, SrcOpen, LengthOpen);
def CandleHigh2  = funcCalcHigh(HighType, SrcHigh, LengthHigh);
def CandleLow2  = funcCalcLow(LowType, SrcLow, LengthLow);
def CandleClose2 = funcCalcClose(CloseType, SrcClose, LengthClose);

def MAValue  = funcCalcMA1(HAMAType, TrendSource, HAMALength);

plot MALine = if HAMAMa then MAValue else na;
MALine.SetStyle(Curve.FIRM);
MALine.AssignValueColor( if StrongUP then GlobalColor("Bull")     else
                         if WeakUp   then GlobalColor("WeakBull") else
                         if StrongDN then GlobalColor("Bear")     else
                         if WeakDN   then GlobalColor("WeakBear") else GlobalColor("Neutral"));

def CandleOpen  = if method then CandleOpen1 else CandleOpen2;
def CandleHigh  = if method then CandleHigh1 else CandleHigh2;
def CandleLow   = if method then CandleLow1 else CandleLow2;
def CandleClose = if method then CandleClose1 else CandleClose2;

# Plot STRONG UP
def UpO1;
def UpH1;
def UpL1;
def UpC1;
if StrongUP and HAMABar
then {
    UpO1 = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    UpH1 = if CandleHigh > CandleClose then CandleClose else CandleHigh;
    UpL1 = if CandleLow  < CandleOpen  then CandleOpen  else CandleLow;
    UpC1 = if CandleOpen < CandleClose then CandleOpen  else CandleClose;
} else
{
    UpO1 = na;
    UpH1 = na;
    UpL1 = na;
    UpC1 = na;
}
# Plot WEAK UP
def UpO;
def UpH;
def UpL;
def UpC;
if WeakUp and HAMABar
then {
    UpO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    UpH = if CandleHigh > CandleClose then CandleClose else CandleHigh;
    UpL = if CandleLow  < CandleOpen  then CandleOpen else CandleLow;
    UpC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    UpO = na;
    UpH = na;
    UpL = na;
    UpC = na;
}
# Plot WEAK DOWN
def DnO;
def DnH;
def DnL;
def DnC;
if WeakDN and HAMABar
then {
    DnO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    DnH = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    DnL = if CandleLow  < CandleClose then CandleClose else CandleLow;
    DnC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    DnO = na;
    DnH = na;
    DnL = na;
    DnC = na;
}
# Plot STRONG DOWN
def DnO1;
def DnH1;
def DnL1;
def DnC1;
if StrongDN and HAMABar
then {
    DnO1 = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    DnH1 = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    DnL1 = if CandleLow  < CandleClose then CandleClose else CandleLow;
    DnC1 = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    DnO1 = na;
    DnH1 = na;
    DnL1 = na;
    DnC1 = na;
}
# Plot Neutral
def NuO;
def NuH;
def NuL;
def NuC;
if Neutral and HAMABar
then {
    NuO = if CandleOpen < CandleClose then CandleClose else CandleOpen;
    NuH = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
    NuL = if CandleLow  < CandleClose then CandleClose else CandleLow;
    NuC = if CandleOpen < CandleClose then CandleOpen else CandleClose;
} else
{
    NuO = na;
    NuH = na;
    NuL = na;
    NuC = na;
}
# Plot the new Chart
AddChart(high = UpH1, low = UpL1, open = UpO1, close = UpC1,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Bull"));
AddChart(high = UpH , low = UpL , open = UpO,  close = UpC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("WeakBull"));

AddChart(high = DnH1, low = DnL1, open = DnO1, close = DnC1,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Bear"));
AddChart(high = DnH , low = DnL , open = DnO,  close = DnC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("WeakBear"));

AddChart(high = NuH , low = NuL , open = NuO,  close = NuC,
         type = ChartType.CANDLE, growcolor =  GlobalColor("Neutral"));
########
#indicator("SSL Channel", by MissTricky)
#https://www.tradingview.com/script/6y9SkpnV-SSL-Channel/
def ma1 = mat(Hi,SSL_MaLength, SSLType);
def ma2 = mat(Lo ,SSL_MaLength, SSLType);

def Hlv1 = if (if SSLWicks then Hi else Cl) > ma1 then 1 else
           if (if SSLWicks then Lo  else Cl) < ma2 then -1 else Hlv1[1];
def Hlv = Hlv1;

def sslUp   = if Hlv < 0 then ma2 else ma1;
def sslDown = if Hlv < 0 then ma1 else ma2;

def SSLBull = Hlv1 > 0 and Hlv1[1] < 0;
def SSLBear = Hlv1 < 0 and Hlv1[1] > 0;

plot highLine = if ShowSSL then sslUp else na;
plot lowLine  = if ShowSSL then sslDown else na;

highLine.AssignValueColor(if Hlv > 0 then Color.GREEN else color.RED);
lowLine.AssignValueColor( if Hlv > 0 then Color.GREEN else color.RED);

highLine.AssignValueColor(if Hlv > 0 then Color.GREEN else Color.RED);
lowLine.AssignValueColor( if Hlv > 0 then Color.GREEN else Color.RED);

AddCloud (highLine, lowLine, Color.DARK_GREEN, Color.DARK_RED, no);

##### RSI
def RSIup   = WildersAverage(Max(Cl - Cl[1], 0), rsiLength);
def RSIdown = WildersAverage(-Min(Cl - Cl[1], 0), rsiLength);
def RSIvalue = if RSIdown == 0 then 100 else if RSIup == 0 then 0 else 100 - (100 / (1 + RSIup / RSIdown));
def RSIAvg   = SimpleMovingAvg(RSIvalue, RSIMovAvg);
def RSI = if RSIvalue > RSIAvg then  1 else
          if RSIvalue < RSIAvg then -1 else na;

##### TDFI
def mma  = ExpAverage(Cl * 1000, TDFIPeriod);
def smma = ExpAverage(mma, TDFIPeriod);
def impetmma  = mma - mma[1];
def impetsmma = smma - smma[1];
def divma = AbsValue(mma - smma);
def averimpet = (impetmma + impetsmma) / 2;
def tdf  = Power(divma, 1) * Power(averimpet, 3);
def TDFIvalue = tdf / Highest(AbsValue(tdf), TDFIPeriod * 3);
def TDFI = if TDFIvalue > TDFIAbove then  1 else
           if TDFIvalue < TDFIBelow then -1 else na;

###### ADX Filter
def ADXvalue = DMI(ADXLength, AverageType.WILDERS).ADX;
def ADX      = if ADXvalue >= ADXlimit then 1 else na;

###### Range Indicator
def data = TrueRange(Hi, Cl, Lo) / if Cl > Cl[1] then (Cl - Cl[1]) else 1;
def hData = Highest(data, RILength);
def lData = Lowest(data, RILength);
def range = 100 * (data - lData) / if hData > lData then (hData - lData) else 1;
def RIvalue = ExpAverage(range, RangeSmoothing);
def RI = if RIvalue >= Rangelimit then 1 else na;

### Signal###
def UpOpen = if CandleOpen < CandleClose then CandleClose else CandleOpen;
def UpHigh = if CandleHigh > CandleClose then CandleClose else CandleHigh;
def UpLow  = if CandleLow  < CandleOpen  then CandleOpen  else CandleLow;
def UpClose= if CandleOpen < CandleClose then CandleOpen  else CandleClose;

def DnOpen = if CandleOpen < CandleClose then CandleClose else CandleOpen;
def DnHigh = if CandleHigh > CandleOpen then CandleOpen else CandleHigh;
def DnLow  = if CandleLow  < CandleClose then CandleClose else CandleLow;
def DnClose= if CandleOpen < CandleClose then CandleOpen else CandleClose;

def HAMAHigh = Cl > CandleLow;
def HAMALow  = Lo < DnLow;

def SigUp    = if TDFIFilter then (SSLBull and Cl > MAValue and HAMAHigh and TDFI > 0)
                             else (SSLBull and Cl > MAValue and HAMAHigh);
def SigUp1   = if ADXFilter then SigUp and ADX else SigUp;
def SigUp2   = if RangeIndicatorFilter then SigUp1 and RI else SigUp1;
def SignalUp = if RSIFilter then SigUp2 and RSI > 0 else SigUp2;

def SigDN = if TDFIFilter then (SSLBear and Cl < MAValue and HAMALow and TDFI < 0)
                          else (SSLBear and Cl < MAValue and HAMALow);
def SigDn1 = if ADXFilter then SigDn and ADX else SigDn;
def SigDn2 = if RangeIndicatorFilter then SigDn1 and RI else SigDn1;
def SignalDn = if RSIFilter then SigDn2 and RSI < 0 else SigDn2;

plot Arrow_Up = if showArrow and SignalUp then Lo  else na;
plot Arrow_Dn = if showArrow and SignalDn then Hi else na;

Arrow_Up.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
Arrow_Up.SetDefaultColor(Color.WHITE);
Arrow_Up.SetLineWeight(3);

Arrow_Dn.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
Arrow_Dn.SetDefaultColor(Color.YELLOW);
Arrow_Dn.SetLineWeight(3);

##### Background & Price Color
AssignPriceColor(if ColorBar  then
                  if Neutral  then GlobalColor("NeutralBar")  else
                  if StrongUP and Cl < UpHigh then GlobalColor("WeakBullBar") else
                  if StrongUP and Cl > UpHigh then GlobalColor("BullBar")     else
                  if StrongDN and Cl < DnLow  then GlobalColor("BearBar")     else
                  if StrongDN and Cl > DnLow then GlobalColor("WeakBearBar")  else
                                                 Color.DARK_ORANGE else Color.CURRENT);

AssignBackgroundColor(if BackgroundColor then
                  if StrongUP and Cl > UpHigh then GlobalColor("BGBull") else
                  if StrongDN and Cl < DnLow  then GlobalColor("BGBear") else
                    Color.CURRENT else Color.CURRENT);

### ENd ####
@samer800, Is there a way to extract the ma line that is a part of this strategy and have it as a separate study?
 

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

Thread starter Similar threads Forum Replies Date
C Confirmation Candles Indicator For ThinkorSwim Strategies & Chart Setups 2607

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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