//@version=5 indicator("Simple Market Metrics v4",max_lines_count=500,max_bars_back=500,max_labels_count=500) // SMM v4 import TradingView/ta/8 // ________ All Inputs Here ___________________________ //Signals Inputs var signalsGroupName = '----- Signal Settings -----' enableBuySellSignals = input.bool(true,title='Enable Buy & Sell Signals', group=signalsGroupName) buySignalColor = input.color(color.new(#4caf50, 0),'Buy Signal Color', group=signalsGroupName) sellSignalColor = input.color(color.new(#b22833, 0), 'Sell Signal Color', group=signalsGroupName) enableBuySellPrice = input.bool(true,title='Enable Buy & Sell Price', group=signalsGroupName) enableChopFilter = input.bool(true, title='Enable Chop Filter', group=signalsGroupName, tooltip='This helps to reduce signals during choppy markets, and will produce less signals overall when enabled.') // Profit Inputs var profitWaveGroupName = '----- Profit Settings -----' enableProfitLines = input.bool(true, title='Enable Profit Target Lines', group=profitWaveGroupName) profitTarget = input.int(40, title='Profit Target (Ticks/Pips/Cents)', group=profitWaveGroupName, tooltip='Profit target value is based on the minimum move of the instrument. For Futures that is ticks, FX is pips, Stocks are cents, etc.') profitTargetMaxLines = input.int(10, title='Max Profit Target Lines', group=profitWaveGroupName, tooltip='Maximum amount of profit target lines to display on your chart.') profitTargetColor = input.color(color.new(color.yellow, 0),'Profit Target Lines Color', group=profitWaveGroupName) enableProfitWave = input.bool(true, "Enable Profit Wave", group=profitWaveGroupName) profitWaveUpperBullishColor = input.color(color.new(#00ff8480, 50),'Profit Wave Bullish Top Color', group=profitWaveGroupName) profitWaveLowerBullishColor = input.color(color.new(color.green, 50), 'Profit Wave Bullish Bottom Color', group=profitWaveGroupName) profitWaveLowerBearishColor = input.color(color.new(#8c0000, 50), 'Profit Wave Bearish Top Color', group=profitWaveGroupName) profitWaveUpperBearishColor = input.color(color.new(#ff0000, 50),'Profit Wave Bearish Bottom Color', group=profitWaveGroupName) // Background trendSwitch Inputs var backgroundTrendGroupName = '----- Background trendSwitch Settings -----' enableBgColor = input.bool(true, "Enable Background trendSwitch Color", group=backgroundTrendGroupName) bgTrendBullishCol = input.color(color.new(#66ff00, 70),'Bullish Background Color', group=backgroundTrendGroupName) bgTrendBearishCol = input.color(color.new(#ff0000, 70), 'Bearish Background Color', group=backgroundTrendGroupName) // Candle Coloring Inputs var candleSettings = "----- Candle Settings -----" bullishCandleColor = input.color(color.new(#089981, 0),'Bullish Candle Color', group=candleSettings) bearishCandleColor = input.color(color.new(#f23645, 0), 'Bearish Candle Color', group=candleSettings) enableTrendCandleColoring = input.bool(true,title='Enable Candle Color Matching', group=candleSettings) candleColoringType = input.string("Profit Wave",title='Match Candle Colors To', options=["Profit Wave","Trend"], group=candleSettings) // Support / Resistance Inputs var sdGroupName = '----- Support & Resistance Settings -----' ensr = input.bool(true,title='Enable Support & Resistance Lines', group=sdGroupName) resistanceColor = input.color(#ff0000,'Resistance Lines Color', group=sdGroupName) supportColor = input.color(#66ff00,'Support Lines Color', group=sdGroupName) srStyle = input.string("Dotted", options=["Dashed", "Dotted", "Solid"], title="Support & Resistance Lines Style", group=sdGroupName) srLineWidth = input.int(2, "Support & Resistance Lines Width", minval=1, maxval=5, step=1, group=sdGroupName) extendLinesType = input.string('Close', title='Extend Lines Until', options=['Touch', 'Close'], group=sdGroupName, tooltip='Extend the lines until price touches them or a candle closes beyond them.') pivotchopSensitivity = 20 maxSrLines = 50 // Real Price Inputs var rplGroupName = '----- Real Price Settings -----' showrealprice = input(false, title="Enable Real Price Line", group=rplGroupName) extendLine = input(false, title="Extend Real Price Line", group=rplGroupName) showrealpricelinecolor = input(color.new(color.white, 0), title="Real Price Line Color", group=rplGroupName) realpricewidth = input.string("Thin", options=["Thin", "Thick"], title="Real Price Line Width", group=rplGroupName) realpricestyle = input.string("Dotted", options=["Dotted", "Solid", "Dashed"], title="Real Price Line Style", group=rplGroupName) plotrealsrcClosedots = input(true, title="Enable Real Close Price Dots", group=rplGroupName) realsrcClosecolour = input(color.new(color.white, 0), title="Real Close Price Dot Color", group=rplGroupName) size = input.string("Small", options=["Auto", "Small", "Large"], title="Real Close Price Dot Size", group=rplGroupName) // Linear Regression Channel Inputs var channelGroupName = '----- Price Channel Settings -----' enableChannel = input.bool(false, "Enable Price Channel", group=channelGroupName) dn_col = input.color(color.green,'Bottom Price Channel Color', group=channelGroupName) up_col = input.color(#ff0000,'Top Price Channel Color', group=channelGroupName) extendLeftInput = input.bool(false, "Extend Lines Left", group=channelGroupName) extendRightInput = input.bool(false, "Extend Lines Right", group=channelGroupName) // Dashboard Inputs var dashboardSettings = "----- Dashboard Settings -----" enableDashboardBuySellSignals = input.bool(true,title='Enable Buy & Sell Signals on Dashboard', group=dashboardSettings) showInsideLines = input.bool(false, "Enable Level Lines", group=dashboardSettings) levelLinesStyle = input.string("Solid", options=["Solid", "Dotted", "Dashed"], title="Level Lines Style", group=dashboardSettings) trendDotsSize = input.int(1, "trendSwitch Dots Size", minval=1, maxval=10, step=1, group=dashboardSettings) crossoverDotsSize = input.int(3, "Signal Dots Size", minval=3, maxval=10, step=1, group=dashboardSettings) mfiBullishColor = input.color(color.lime,'Money Flow Bullish Color', group=dashboardSettings) mfiBearishColor = input.color(color.red,'Money Flow Bearish Color', group=dashboardSettings) // ---------------------------------------------------------------------------------------------------------------------------------- // ________ Price & Candle Logic ___________________________ srcHlc3 = hlc3 srcOpen = open srcHigh = high srcLow = low srcClose = close real_price = ticker.new(prefix=syminfo.prefix, ticker=syminfo.ticker) real_close = request.security(symbol=real_price, timeframe='', expression=close, gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off) profitWaveEmaFast = ta.ema(srcClose, 8) profitWaveEmaMedium = ta.ema(srcClose, 13) profitWaveEmaSlow = ta.ema(srcClose, 21) chopSensitivity = 1 trueRange = math.max(math.max(high-low, math.abs(high-nz(close[1]))), math.abs(low-nz(close[1]))) diPlusCalculation = high-nz(high[1]) > nz(low[1])-low ? math.max(high-nz(high[1]), 0): 0 diMinusCalculation = nz(low[1])-low > high-nz(high[1]) ? math.max(nz(low[1])-low, 0): 0 smoothedTrueRange = 0.0 smoothedTrueRange := nz(smoothedTrueRange[1]) - (nz(smoothedTrueRange[1])/chopSensitivity) + trueRange smoothedDiPlus = 0.0 smoothedDiPlus := nz(smoothedDiPlus[1]) - (nz(smoothedDiPlus[1])/chopSensitivity) + diPlusCalculation smoothedDiMinus = 0.0 smoothedDiMinus := nz(smoothedDiMinus[1]) - (nz(smoothedDiMinus[1])/chopSensitivity) + diMinusCalculation diPlus = smoothedDiPlus / smoothedTrueRange * 100 diMinus = smoothedDiMinus / smoothedTrueRange * 100 Up = (srcHigh + srcLow) / 2 - (1.3 * ta.atr(8)) Dn = (srcHigh + srcLow) / 2 + (1.3 * ta.atr(8)) float trendUp = na float trendDown = na trendSwitch = 0 trendUp := srcClose[1] > trendUp[1] ? math.max(Up,trendUp[1]) : Up trendDown := srcClose[1] < trendDown[1] ? math.min(Dn,trendDown[1]) : Dn trendSwitch := srcClose > trendDown[1] ? 1: srcClose < trendUp[1]? -1: nz(trendSwitch[1],1) trendDirection = trendSwitch == 1 ? trendUp : trendDown bullishTrend = trendDirection == trendUp bearishTrend = trendDirection == trendDown // Base Candle coloring candleColor = color.gray candleColor := if (srcClose > srcOpen) bullishCandleColor else if (srcClose < srcOpen) bearishCandleColor else candleColor[1] if (enableTrendCandleColoring and candleColoringType == "Trend") candleColor := if (bullishTrend) bullishCandleColor else if (bearishTrend) bearishCandleColor else candleColor[1] else if (enableTrendCandleColoring and candleColoringType == "Profit Wave") candleColor := if (srcClose > profitWaveEmaSlow) bullishCandleColor else if (srcClose < profitWaveEmaSlow) bearishCandleColor else candleColor[1] plotcandle(srcOpen, srcHigh, srcLow, srcClose, "SMM Candles", color=candleColor, wickcolor=candleColor, bordercolor=candleColor, force_overlay=true) // ________ Background trendSwitch Logic ___________________________ backgroundTrendColor = color.white // backgroundTrendColor = bullishTrend ? bgTrendBullishCol : bgTrendBearishCol if (bullishTrend) backgroundTrendColor := bgTrendBullishCol else if (bearishTrend) backgroundTrendColor := bgTrendBearishCol else backgroundTrendColor := backgroundTrendColor[1] bgcolor(enableBgColor ? backgroundTrendColor : na, force_overlay = true) // ________ Signals Logic ___________________________ var bool buySignal = false var bool sellSignal = false buySignal := trendDirection == trendUp sellSignal := trendDirection == trendDown mfl = ta.mfi(srcHlc3, 10) enum Mode buy = "Buy Mode" sell = "Sell Mode" none = "none" var Mode currentMode = Mode.none if (backgroundTrendColor != backgroundTrendColor[1]) currentMode := Mode.none strongBullishCandle = srcClose > srcOpen and srcOpen == srcLow and real_close > profitWaveEmaFast and real_close > profitWaveEmaSlow strongBearishCandle = srcClose < srcOpen and srcOpen == srcHigh and real_close < profitWaveEmaFast and real_close < profitWaveEmaSlow realClosePriceText = enableBuySellPrice ? "\n$" + str.tostring(real_close, format.mintick) : "" bool canBuy = true bool canSell = true if (enableChopFilter) canBuy := math.floor(diPlus) > math.floor(diMinus) and math.floor(diPlus) >= 45 canSell := math.floor(diMinus) > math.floor(diPlus) and math.floor(diMinus) >= 45 else canBuy := true canSell := true // Bullish signals mfiBuy = enableChopFilter ? mfl > 52 : true buy_con = buySignal and bullishTrend and strongBullishCandle and currentMode != Mode.buy and mfiBuy and canBuy if (buy_con and enableBuySellSignals) currentMode := Mode.buy label.new(bar_index, low, style=label.style_label_up, color=buySignalColor, size=size.normal, yloc=yloc.belowbar, text="Buy"+realClosePriceText, textcolor=color.white, force_overlay=true) // plotshape(buy_con and enableBuySellSignals ? srcLow : na,title='Buy Signal',style=shape.labelup, size=size.auto, location=location.belowbar, text='Buy' ,textcolor=color.white,color=buySignalColor, force_overlay = true) // Bearish signals mfiSell = enableChopFilter ? mfl < 48 : true sell_con = sellSignal and bearishTrend and strongBearishCandle and currentMode != Mode.sell and mfiSell and canSell if (sell_con and enableBuySellSignals) currentMode := Mode.sell label.new(bar_index, high, style=label.style_label_down, color=sellSignalColor, size=size.normal, yloc=yloc.abovebar, text="Sell"+realClosePriceText, textcolor=color.white, force_overlay=true) // plotshape(sell_con and enableBuySellSignals ? srcHigh : na,title='Sell Signal',style=shape.labeldown, size=size.auto, location=location.abovebar,text='Sell',textcolor=color.white,color=sellSignalColor, force_overlay = true) // Profit Target lines var line[] targetLines = array.new_line(0) var label[] targetLabels = array.new_label(0) if ((buy_con or sell_con) and enableBuySellSignals and enableProfitLines) if array.size(targetLines) >= profitTargetMaxLines oldestLine = array.get(targetLines, 0) oldestLabel = array.get(targetLabels, 0) line.delete(oldestLine) label.delete(oldestLabel) array.remove(targetLines, 0) array.remove(targetLabels, 0) targetPrice = buy_con ? real_close + (profitTarget * syminfo.mintick) : sell_con ? real_close - (profitTarget * syminfo.mintick) : na newLine = line.new(bar_index-7, targetPrice, bar_index + 5, targetPrice, color=profitTargetColor, width=2, force_overlay=true) array.push(targetLines, newLine) newLabel = label.new(bar_index-3, targetPrice, text="$"+str.tostring(targetPrice, format.mintick), style=label.style_none, textcolor=profitTargetColor, force_overlay=true) array.push(targetLabels, newLabel) // Reset for more signals within continuous trend if (currentMode == Mode.buy and real_close < profitWaveEmaSlow and srcClose < profitWaveEmaSlow) currentMode := Mode.none if (currentMode == Mode.sell and real_close > profitWaveEmaSlow and srcClose > profitWaveEmaSlow) currentMode := Mode.none // Signal Alerts alertcondition(condition=buy_con and canBuy,title='Buy alert', message='Buy') alertcondition(condition=sell_con and canSell,title='Sell alert', message='Sell') // ________ Profit Wave Logic ___________________________ pwPlot1 = plot(enableProfitWave ? profitWaveEmaFast : na, title="Profit Wave Line 1", color=color.new(color.white, 100), linewidth=1, force_overlay = true) pwPlot2 = plot(enableProfitWave ? profitWaveEmaMedium : na, title="Profit Wave Line 2", color=color.new(color.white, 100), linewidth=1, force_overlay = true) pwPlot3 = plot(enableProfitWave ? profitWaveEmaSlow : na, title="Profit Wave Line 3", color=color.new(color.white, 100), linewidth=1, force_overlay = true) pwUpperBullishColor = real_close > profitWaveEmaSlow ? profitWaveUpperBullishColor : color.new(color.lime, 100) pwLowerBullishColor = real_close > profitWaveEmaSlow ? profitWaveLowerBullishColor : color.new(color.green, 100) fill(pwPlot1, pwPlot2, pwUpperBullishColor) fill(pwPlot2, pwPlot3, pwLowerBullishColor) pwUpperBearishColor = real_close < profitWaveEmaSlow ? profitWaveUpperBearishColor : color.new(#ff0000, 100) pwLowerBearishColor = real_close < profitWaveEmaSlow ? profitWaveLowerBearishColor : color.new(#8c0000, 100) fill(pwPlot1, pwPlot2, pwUpperBearishColor) fill(pwPlot2, pwPlot3, pwLowerBearishColor) // ________ Support / Resistance Logic ___________________________ srLineStyle = switch srStyle "Solid" => line.style_solid "Dotted" => line.style_dotted "Dashed" => line.style_dashed // Identify pivot highs and pivot lows pivotHigh = ta.pivothigh(srcHigh, pivotchopSensitivity, pivotchopSensitivity) pivotLow = ta.pivotlow(srcLow, pivotchopSensitivity, pivotchopSensitivity) // Initialize arrays to store the lines var line[] resistanceLines = array.new_line(0) var line[] supportLines = array.new_line(0) var int[] resistanceTouchBars = array.new_int(0) var int[] supportTouchBars = array.new_int(0) lookbackchopSensitivity = 500 // Function to manage line limits (removing the oldest line if limit is exceeded) f_manage_line_limit(array linesArray, array touchBarsArray) => if array.size(linesArray) > maxSrLines // Delete the first (oldest) line line.delete(array.shift(linesArray)) // Remove the first touch bar value array.shift(touchBarsArray) // Draw new resistance line if a new pivot high is detected if (ensr and not na(pivotHigh) and bar_index[pivotchopSensitivity] >= bar_index - lookbackchopSensitivity) pivotHighPrice = srcHigh[pivotchopSensitivity] pivotHighBar = bar_index[pivotchopSensitivity] resistanceLine = line.new(pivotHighBar, pivotHighPrice, bar_index + 1, pivotHighPrice, style=srLineStyle, width=srLineWidth, color=resistanceColor, extend=extend.right, force_overlay=true) array.push(resistanceLines, resistanceLine) array.push(resistanceTouchBars, na) // No touch yet f_manage_line_limit(resistanceLines, resistanceTouchBars) // Manage the line limit // Draw new support line if a new pivot low is detected if (ensr and not na(pivotLow) and bar_index[pivotchopSensitivity] >= bar_index - lookbackchopSensitivity) pivotLowPrice = srcLow[pivotchopSensitivity] pivotLowBar = bar_index[pivotchopSensitivity] supportLine = line.new(pivotLowBar, pivotLowPrice, bar_index + 1, pivotLowPrice, style=srLineStyle, width=srLineWidth, color=supportColor, extend=extend.right, force_overlay=true) array.push(supportLines, supportLine) array.push(supportTouchBars, na) // No touch yet f_manage_line_limit(supportLines, supportTouchBars) // Manage the line limit // Loop through the resistance lines and stop their extension if the price touches them if array.size(resistanceLines) > 0 resLineStop = extendLinesType == 'Close' ? srcClose : srcHigh for i = 0 to array.size(resistanceLines) - 1 line currentResistanceLine = array.get(resistanceLines, i) resistancePrice = line.get_y1(currentResistanceLine) touchBar = array.get(resistanceTouchBars, i) // Update the line to the current candle unless already touched if na(touchBar) line.set_x2(currentResistanceLine, bar_index) line.set_extend(currentResistanceLine, extend.none) // Check if the price touches the resistance and we haven't already stopped the line if na(touchBar) and resLineStop >= resistancePrice line.set_x2(currentResistanceLine, bar_index) line.set_extend(currentResistanceLine, extend.none) array.set(resistanceTouchBars, i, bar_index) // Store the bar where the price touched // Loop through the support lines and stop their extension if the price touches them if array.size(supportLines) > 0 supLineStop = extendLinesType == 'Close' ? srcClose : srcLow for i = 0 to array.size(supportLines) - 1 line currentSupportLine = array.get(supportLines, i) supportPrice = line.get_y1(currentSupportLine) touchBar = array.get(supportTouchBars, i) // Update the line to the current candle unless already touched if na(touchBar) line.set_x2(currentSupportLine, bar_index) line.set_extend(currentSupportLine, extend.none) // Check if the price touches the support and we haven't already stopped the line if na(touchBar) and supLineStop <= supportPrice line.set_x2(currentSupportLine, bar_index) line.set_extend(currentSupportLine, extend.none) array.set(supportTouchBars, i, bar_index) // Store the bar where the price touched // ________ Real Price Logic ___________________________Original open source code from Real Price + Dots by PHVNTOM_TRADER showrealpricemicrodotsauto = (plotrealsrcClosedots and size=="Auto" ? display.all : display.none) showrealpricemicrodotssmall = (plotrealsrcClosedots and size=="Small" ? display.all : display.none) showrealpricedotslarge = (plotrealsrcClosedots and size=="Large" ? display.all : display.none) _width = switch realpricewidth "Thin" => 1 "Thick" => 2 // Real Price Line if(showrealprice and (realpricestyle == "Solid")) real_price_line = line.new(bar_index[1], real_close, bar_index, real_close, xloc.bar_index, (extendLine ? extend.both : extend.right), showrealpricelinecolor, line.style_solid, _width, force_overlay = true) line.delete(real_price_line[1]) if(showrealprice and (realpricestyle == "Dotted")) real_price_line = line.new(bar_index[1], real_close, bar_index, real_close, xloc.bar_index, (extendLine ? extend.both : extend.right), showrealpricelinecolor, line.style_dotted, _width, force_overlay = true) line.delete(real_price_line[1]) if(showrealprice and (realpricestyle == "Dashed")) real_price_line = line.new(bar_index[1], real_close, bar_index, real_close, xloc.bar_index, (extendLine ? extend.both : extend.right), showrealpricelinecolor, line.style_dashed, _width, force_overlay = true) line.delete(real_price_line[1]) // Real Price srcClose Dots plotchar(series=real_close, title="Real Close dots", location=location.absolute, color=realsrcClosecolour, editable=false, char="•", size=size.auto, display=showrealpricemicrodotsauto, force_overlay = true) plotchar(series=real_close, title="Real Close dots", location=location.absolute, color=realsrcClosecolour, editable=false, char="•", size=size.tiny, display=showrealpricemicrodotssmall, force_overlay = true) plotshape(series=real_close, title="Real Close dots", location=location.absolute, color=realsrcClosecolour, editable=false, style=shape.circle, size=size.auto, display=showrealpricedotslarge, force_overlay = true) // ________ Channel Logic ___________________________ bins = 9 mult = 2.0 channelSensitivity = 100 extendStyle = switch extendLeftInput and extendRightInput => extend.both extendLeftInput => extend.left extendRightInput => extend.right => extend.none //---- var l_reg = array.new_line(0) var l_hist = array.new_line(0) lset(l,x1,y1,x2,y2,col,isit)=> line.set_xy1(l,x1,y1) line.set_xy2(l,x2,y2) line.set_color(l,col) line.set_style(l,isit ? line.style_dotted : line.style_solid) if enableChannel if barstate.isfirst for i = 1 to bins array.push(l_reg,line.new(na,na,na,na,extend = extendStyle, force_overlay = true)) array.push(l_hist,line.new(na,na,na,na,extend = extendStyle, force_overlay = true)) //---- n = bar_index v = ta.variance(srcClose,channelSensitivity) r = ta.correlation(srcClose,n,channelSensitivity) alpha = r*(math.sqrt(v)/ta.stdev(n,channelSensitivity)) beta = ta.sma(srcClose,channelSensitivity) - alpha*ta.sma(n,channelSensitivity) mad = math.sqrt(v - v*math.pow(r,2))*mult //---- if barstate.islast a = alpha*(n-channelSensitivity+1) + beta - mad b = alpha*n + beta - mad isit = false for i = 0 to bins-2 k = i/(bins-1) wmad = k*mad*2 cssDn = color.from_gradient(k,0,0.5,color.new(dn_col,00),color.new(dn_col,75)) cssUp = color.from_gradient(k,0.5,1,color.new(up_col,60),color.new(up_col,25)) css = color.white if (k == 0.5) css := color.white isit:=true if k < 0.5 css := cssDn if k > 0.5 css := cssUp lset(array.get(l_reg,i),n-channelSensitivity+1,a+wmad,n,b+wmad,css,isit) isit := false lset(array.get(l_reg,bins-1),n-channelSensitivity+1,a+mad*2,n,b+mad*2,up_col,isit) mad_1 = math.sqrt(v - v*math.pow(r,2))*1 // ________ Dashboard Oscillator Logic ___________________________ hlineStyle = switch levelLinesStyle "Solid" => hline.style_solid "Dotted" => hline.style_dotted "Dashed" => hline.style_dashed top_1 = hline(100,color=color.new(#ff1b1b,50),linestyle=hline.style_solid) top_2 = hline(90,color=color.new(#ff2626,50),linestyle=hline.style_solid) top_3 = hline(80,color=color.new(#ff3f3f,50),linestyle=hline.style_solid) top_4 = hline(showInsideLines ? 70 : na,color=color.new(#ff5050,50),linestyle=hlineStyle) top_5 = hline(showInsideLines ? 60 : na,color=color.new(#ff6464,50),linestyle=hlineStyle) top_6 = hline(showInsideLines ? 50 : na,color=color.new(#ff6464,100),linestyle=hlineStyle) bottom_1 = hline(0,color=color.new(#047200,50),linestyle=hline.style_solid) bottom_2 = hline(10,color=color.new(#047e00,50),linestyle=hline.style_solid) bottom_3 = hline(20,color=color.new(#048900,50),linestyle=hline.style_solid) bottom_4 = hline(showInsideLines ? 30 : na,color=color.new(#059f00,50),linestyle=hlineStyle) bottom_5 = hline(showInsideLines ? 40 : na,color=color.new(#06b200,50),linestyle=hlineStyle) bottom_6 = hline(showInsideLines ? 50 : na,color=color.new(#06b200,100),linestyle=hlineStyle) fill(top_1, top_2, color=color.new(#ff1b1b,20), title="Overbought Extreme Background") fill(top_2, top_3, color=color.new(#ff2626,40), title="Overbought Start Background") // fill(top_4, top_3, color=color.new(#ff3f3f,100), title="Background") // fill(top_4, top_5, color=color.new(#ff5050,100), title="Background") // fill(top_6, top_5, color=color.new(#ff6464,100), title="Background") fill(bottom_1, bottom_2, color=color.new(#047200,10), title="Oversold Start Background") fill(bottom_3, bottom_2, color=color.new(#047e00,40), title="Oversold Extreme Background") // fill(bottom_3, bottom_4, color=color.new(#048900,100), title="Background") // fill(bottom_5, bottom_4, color=color.new(#059f00,100), title="Background") // fill(bottom_5, bottom_6, color=color.new(#06b200,100), title="Background") dotsColor = bullishTrend ? #66ff00 : #ff0000 plot(50,color=dotsColor,style= plot.style_circles, title="Dashboard Center Line trendSwitch Dots", linewidth=trendDotsSize) plotshape(buy_con and enableDashboardBuySellSignals and canBuy ? 10 : na,title='Dashboard Buy Signal',style=shape.labelup,location=location.absolute,text='Buy',textcolor=color.white,color=buySignalColor) plotshape(sell_con and enableDashboardBuySellSignals and canSell ? 90 : na,title='Dashboard Sell Signal',style=shape.labeldown,location=location.absolute,text='Sell',textcolor=color.white,color=sellSignalColor) mfiTrendColor = if (mfl > 50) mfiBullishColor else if (mfl < 50) mfiBearishColor else color.white plot(mfl, "Dashboard Money Flow Line", color=mfiTrendColor, style=plot.style_stepline) plot(buy_con ? 50 : na, color=#66ff00, style=plot.style_circles,linewidth=crossoverDotsSize,title='Dashboard Crossover Up Dots') plot(sell_con ? 50 : na, color=#ff0000, style=plot.style_circles,linewidth=crossoverDotsSize,title='Dashboard Crossover Down Dots')