Dashboard 123456789
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © duthuan244

//@version=5
indicator("Dashboard", overlay = true)
//Data for Dashboard
volumeDash = volume
rsiDash = ta.rsi(close, 14)
mfiDash = ta.mfi(hlc3, 14)
momDash = (close / close[10]) * 100

buyingPressure = volume * (close - low) / (high - low)
sellingPressure = volume * (high - close) / (high - low)

percentSellingVol = math.round((sellingPressure / volume) * 100, 0)
percentBuyingVol = 100 - percentSellingVol


//Defines Each Timeframe for Trend Panel
sma = ta.sma(close, 50)
oneH = request.security(syminfo.tickerid, "60", sma, barmerge.gaps_off, barmerge.lookahead_off)
twoH = request.security(syminfo.tickerid, "120", sma, barmerge.gaps_off, barmerge.lookahead_off)
fourH = request.security(syminfo.tickerid, "240", sma, barmerge.gaps_off, barmerge.lookahead_off)
daily = request.security(syminfo.tickerid, "D", sma, barmerge.gaps_off, barmerge.lookahead_off)
weekly = request.security(syminfo.tickerid, "W", sma, barmerge.gaps_off, barmerge.lookahead_off)
monthly = request.security(syminfo.tickerid, "M", sma, barmerge.gaps_off, barmerge.lookahead_off)


//Defines An Uptrend for Trend Panel
oneHUp = oneH > oneH[1]
twoHUp = twoH > twoH[1]
fourHUp = fourH > fourH[1]
dailyUp = daily > daily[1]
weeklyUp = weekly > weekly[1]
monthlyUp = monthly > monthly[1]
rsiDashUp = rsiDash > rsiDash[1]
mfiDashUp = mfiDash > mfiDash[1]
momDashUp = momDash > momDash[1]

//Checks if the Current State is an Uptrend or Downtrend for the Trend Panel
up = "📈"
down = "📉"
oneHTrend = oneHUp ? up : down
twoHTrend = twoHUp ? up : down
fourHTrend = fourHUp ? up : down
dailyTrend = dailyUp ? up : down
weeklyTrend = weeklyUp ? up : down
monthlyTrend = monthlyUp ? up : down
rsiTrend = rsiDashUp ? up : down
mfiTrend = mfiDashUp ? up : down
momTrend = momDashUp ? up : down

dashOn = input(true, "Dashboard On / Off")
dashDist = input(38, "Dashboard Distance")
dashColor = input(color.new(#696969, 80), "Dashboard Color", inline="Dash Line")
dashTextColor = input(color.new(#ffffff, 0), "Text Color", inline="Dash Line")
if dashOn
    label Label = label.new(time, close,
     text="      👑 Du Thuan 0795332997 👑"
     + "\n━━━━━━━━━━━━━━━━━"
     + "\n              Market Information"
     + "\n━━━━━━━━━━━━━━━━━"
     + "\n  🚀 Volume                         | " + str.tostring(volume, "##.##" )
     + "\n  🚀 RSI                                         | " + str.tostring(rsiDash, "##.##") + rsiTrend
     + "\n  🚀 MFI                                       | " + str.tostring(mfiDash, "##.##") + mfiTrend
     + "\n  🚀 Momentum          | " + str.tostring(momDash, "##.##") + momTrend
     + "\n  🚀 % Buy                            | " + str.tostring(percentBuyingVol, "##.##" )
     + "\n  🚀 % Sell                            | " + str.tostring(percentSellingVol, "##.##" )
     + "\n━━━━━━━━━━━━━━━━━"
     + "\n                   Trend Panel"
     + "\n━━━━━━━━━━━━━━━━━"
     + "\n       1 Hour | " + oneHTrend + "     Daily     | " + dailyTrend
     + "\n       2 Hour | " + twoHTrend + "     Weekly  | " + weeklyTrend
     + "\n       4 Hour | " + fourHTrend + "     Monthly | " + monthlyTrend
     + "\n━━━━━━━━━━━━━━━━━"
     + "\n        💎High Risk High Return💎",
     color=dashColor, xloc= xloc.bar_time, style=label.style_label_left, textcolor=dashTextColor, textalign=text.align_left)
    label.set_x(Label, label.get_x(Label) + math.round(ta.change(time)*dashDist))
    label.delete(Label[1])
