//@version=4
study("Signalhunts.com CryptoTrader", overlay = true)
// EMA Trend Bars
ema1 = input(34, minval=1, maxval=300, title="EMA UpTrend")
shema = input(true, title="Show EMA Trend ?")
usedEma = ema(close, ema1)
emaUpColor() => hlc3 >= usedEma
emaDownColor() => hlc3 < usedEma
col = hlc3 >= usedEma ? color.lime : hlc3 < usedEma ? color.red : color.white
Change_Bars = input(true, title= "Change Bars Color With Trend")
barcolor(Change_Bars and emaUpColor() ? color.lime: Change_Bars and emaDownColor() ? color.red : na)
plot(shema and usedEma ? usedEma : na, title="EMA", style=plot.style_line, linewidth=3, color=col)
// Daily Open Levels
inputMax = input(1, title= "ORB total time (minutes)")
sess = input("0000-0001", type=input.session, title="Session Time")
t = time(timeframe.period, sess + ":1234567")
show = timeframe.isintraday
is_newbar(res) => change(time(res)) != 0
in_session = not na(t)
is_first = in_session and not in_session[1]
day_open = float(na)
if is_first
day_open := open
else
day_open := day_open[1]
if high > day_open and in_session
day_open := open
plot(show ? day_open : na , style=plot.style_line, color=day_open[1] != day_open ? na : color.black, title="Day Open", linewidth=2)
// Show Last 2 Days Levels
Width = input(2, minval=1)
SelectPeriod = input("D", defval="D", type=input.string)
ShowLast = input(true, title= "Show Last 2 Days Levels")
LookBackPeriods1 = input(1, minval=0)
xOpen = security(syminfo.tickerid, SelectPeriod, open[LookBackPeriods1])
plot(ShowLast ? xOpen : na, color=#ff0000, title="S1", style=plot.style_circles, linewidth=Width, trackprice=true, show_last=1)
LookBackPeriods2 = input(2, minval=0)
xxOpen = security(syminfo.tickerid, SelectPeriod, open[LookBackPeriods2])
plot(ShowLast ? xxOpen : na, color=#ff0000, title="S2", style=plot.style_circles, linewidth=Width, trackprice=true, show_last=1)
//@version=5
indicator("Time Trend", "{Ʌ} - Time Trend V3", false, timeframe = "", timeframe_gaps = true)
f_kama(src, len, kamaf, kamas) =>
white = math.abs(src - src[1])
ama = 0.0
nsignal = math.abs(src - src[len])
nnoise = math.sum(white, len)
nefratio = nnoise != 0 ? nsignal / nnoise : 0
nsmooth = math.pow(nefratio * (kamaf - kamas) + kamas, 2)
ama := nz(ama[1]) + nsmooth * (src - nz(ama[1]))
ama
f_t3(src, len) =>
x1 = ta.ema(src, len)
x2 = ta.ema(x1, len)
x3 = ta.ema(x2, len)
x4 = ta.ema(x3, len)
x5 = ta.ema(x4, len)
x6 = ta.ema(x5, len)
b = 0.7
c1 = - math.pow(b, 3)
c2 = 3 * math.pow(b, 2) + 3 * math.pow(b, 3)
c3 = -6 * math.pow(b, 2) - 3 * b - 3 * math.pow(b, 3)
c4 = 1 + 3 * b + math.pow(b, 3) + 3 * math.pow(b, 2)
c1 * x6 + c2 * x5 + c3 * x4 + c4 * x3
f_ehma(src, length) =>
ta.ema(2 * ta.ema(src, length / 2) - ta.ema(src, length), math.round(math.sqrt(length)))
f_thma(src, length) =>
ta.wma(ta.wma(src, length / 3) * 3 - ta.wma(src, length / 2) - ta.wma(src, length), length)
f_tema(src, len) =>
x = ta.ema(src, len)
y = ta.ema(x, len)
z = ta.ema(y, len)
3 * x - 3 * y + z
f_dema(src, len) =>
x = ta.ema(src, len)
y = ta.ema(x, len)
2 * x - y
f_ma(src, len, type, kamaf, kamas, offset, sigma) =>
x = switch type
"SMA" => ta.sma(src, len)
"EMA" => ta.ema(src, len)
"HMA" => ta.hma(src, len)
"RMA" => ta.rma(src, len)
"WMA" => ta.wma(src, len)
"VWMA" => ta.vwma(src, len)
"ALMA" => ta.alma(src, len, offset, sigma)
"DEMA" => f_dema(src, len)
"TEMA" => f_tema(src, len)
"EHMA" => f_ehma(src, len)
"THMA" => f_thma(src, len)
"T3" => f_t3(src, len)
"KAMA" => f_kama(src, len, kamaf, kamas)
x
matype = input.string("EMA", "Type", ["SMA", "EMA", "DEMA", "TEMA", "HMA", "EHMA", "THMA", "RMA", "WMA", "VWMA", "T3", "KAMA", "ALMA"], group = "MA Settings")
src = input.source(close, "Source", inline = "1", group = "MA Settings")
len = input.int(14, "MA Length", inline = "1", group = "MA Settings")
kamaf = input.float(0.666, "Kaufman Fast", group = "MA Settings")
kamas = input.float(0.0645, "Kaufman Slow", group = "MA Settings")
offset = input.float(0.85, "ALMA Offset", group = "MA Settings")
sigma = input.int(6, "ALMA Sigma", group = "MA Settings")
norm = input.int(30, "Regularize Length", group = "Oscillator Settings")
revt = input.int(3, "Reversion Threshold", options = [1, 2, 3], group = "Oscillator Settings")
revshow = input.bool(true, "Show Reversal Signals", group = "UI Options")
colbar = input.string("None", "Bar Coloring", ["None", "Trend", "Extremeties", "Reversions", "Slope"], group = "UI Options")
ma = f_ma(src, len, matype, kamaf, kamas, offset, sigma)
mean = ta.sma(ma, norm)
dev = ta.stdev(ma, norm)
zmean = (ma - mean) / dev
hline(0, "Mid Line", #ffffff80, hline.style_solid)
max = hline(4, display = display.none)
hh = hline(3, display = display.none)
lh = hline(2, display = display.none)
fill(lh, hh, color = #bb001028)
fill(hh, max, color = #bb00104d)
min = hline(-4, display = display.none)
ll = hline(-3, display = display.none)
hl = hline(-2, display = display.none)
fill(ll, hl, color = #00b35128)
fill(ll, min, color = #00b35144)
z = plot(zmean, "Z", zmean > 0 ? #00b350 : #bb0010)
mid = plot(0, display = display.none, editable = false)
fill(z, mid, zmean > 0 ? zmean : 0, zmean > 0 ? 0 : zmean, zmean > 0 ? #00b351a1 : #00000000, zmean > 0 ? #00000000 : #bb0010b9)
plotchar(revshow ? zmean > revt and zmean < zmean[1] and not (zmean[1] < zmean[2]) ? zmean + 0.5 : na : na, "OB", "⚬", location.absolute, #bb0010, size = size.tiny)
plotchar(revshow ? zmean < -revt and zmean > zmean[1] and not (zmean[1] > zmean[2]) ? zmean - 0.5 : na : na, "OS", "⚬", location.absolute, #00b350, size = size.tiny)
color col = switch colbar
"None" => na
"Trend" => zmean > 0 ? #00b350 : #bb0010
"Extremeties" => zmean > 2 ? #00b350 : zmean < -2 ? #bb0010 : #b3b3b3c2
"Reversions" => zmean > revt and zmean < zmean[1] and not (zmean[1] < zmean[2]) ? #bb0010 : zmean < -revt and zmean > zmean[1] and not (zmean[1] > zmean[2]) ? #00b350 : #b3b3b3c2
"Slope" => zmean > zmean[1] ? #00b350 : #bb0010
barcolor(col)
//@version=4
study("F.B_DI+ DI- CrossOver", shorttitle="CrossOver 🔔 tradecleverly.com", overlay=false)
len = input(21, title="Length")
timeframe = input("", title="Timeframe", type=input.resolution)
// Get data from another timeframe
TrueRange = security(syminfo.tickerid, timeframe, max(max(high-low, abs(high-nz(close[1]))), abs(low-nz(close[1]))))
DirectionalMovementPlus = security(syminfo.tickerid, timeframe, high-nz(high[1]) > nz(low[1])-low ? max(high-nz(high[1]), 0): 0)
DirectionalMovementMinus = security(syminfo.tickerid, timeframe, nz(low[1])-low > high-nz(high[1]) ? max(nz(low[1])-low, 0): 0)
SmoothedTrueRange = 0.0
SmoothedTrueRange := nz(SmoothedTrueRange[1]) - (nz(SmoothedTrueRange[1])/len) + TrueRange
SmoothedDirectionalMovementPlus = 0.0
SmoothedDirectionalMovementPlus := nz(SmoothedDirectionalMovementPlus[1]) - (nz(SmoothedDirectionalMovementPlus[1])/len) + DirectionalMovementPlus
SmoothedDirectionalMovementMinus = 0.0
SmoothedDirectionalMovementMinus := nz(SmoothedDirectionalMovementMinus[1]) - (nz(SmoothedDirectionalMovementMinus[1])/len) + DirectionalMovementMinus
DIPlus = SmoothedDirectionalMovementPlus / SmoothedTrueRange * 100
DIMinus = SmoothedDirectionalMovementMinus / SmoothedTrueRange * 100
DX = abs(DIPlus-DIMinus) / (DIPlus+DIMinus)*100
ADX = sma(DX, len)
// The first derivative of DI+
DIPlus_1st_derivative = DIPlus - DIPlus[1]
// The first derivative of DI-
DIMinus_1st_derivative = DIMinus - DIMinus[1]
// Smoothing of the derivatives of DI+ and DI-
Smoothed_DIPlus_1st_derivative = sma(DIPlus_1st_derivative, len)
Smoothed_DIMinus_1st_derivative = sma(DIMinus_1st_derivative, len)
// Plot of the smoothed derivatives of DI+ and DI-
Smoothed_DIPlus_1st_derivative_plot = plot(Smoothed_DIPlus_1st_derivative, color=color.blue, linewidth=2, title="Smoothed DI+ derivative")
Smoothed_DIMinus_1st_derivative_plot = plot(Smoothed_DIMinus_1st_derivative, color=color.orange, linewidth=2, title="Smoothed DI- derivative")
hline(0, "Zero Line", color=color.gray, linestyle=hline.style_dotted)
// Color the area between the smoothed DI+ and DI- derivative lines
fillColorBackground = (Smoothed_DIPlus_1st_derivative > Smoothed_DIMinus_1st_derivative) ? color.new(color.blue, 72) : color.new(color.orange, 72)
fill(Smoothed_DIPlus_1st_derivative_plot, Smoothed_DIMinus_1st_derivative_plot, color=fillColorBackground)
// Coloring the background and candle bodies according to the conditions
barcolor(Smoothed_DIPlus_1st_derivative > Smoothed_DIMinus_1st_derivative ? color.blue : color.rgb(255, 152, 0))
//@version=5
indicator("PulsePro by Tradecleverly.com", overlay=true)
// Input for selecting the timeframe equivalent of a 5-day SMA
timeframeEquivalent = input.string("1D", title="Choose Timeframe", options=["1D", "10", "30", "65"])
// Calculate the SMA period based on the selected timeframe
smaPeriod = switch timeframeEquivalent
"10" => 195 // 195 periods of 10 minutes = 1 trading day (1950 minutes)
"30" => 65 // 65 periods of 30 minutes = 1 trading day (1950 minutes)
"65" => 30 // 30 periods of 65 minutes = 1 trading day (1950 minutes)
=> 5 // Default to 5-day SMA for 1D (Daily)
// Calculate the SMA
sma_custom = ta.sma(close, smaPeriod)
// Determine the color based on whether the price is above or below the SMA
color_above = color.new(color.green, 70) // Green shading for price above the SMA
color_below = color.new(color.red, 70) // Red shading for price below the SMA
// Plot the SMA line
plot(sma_custom, color=color.blue, linewidth=2)
// Shade the area between the price and the custom SMA
plot_fill = plot(close, color=color.new(color.blue, 0), linewidth=2)
fill(plot_fill, plot(sma_custom), color = close > sma_custom ? color_above : color_below)
Coin
Network
Payment
Confirm Email