// PARAMETERS { // RSI+MFI rsiMFIShow = input(true, title = 'Show MFI', type = input.bool) rsiMFIperiod = input(60,title = 'MFI Period', type = input.integer) rsiMFIMultiplier = input(175, title = 'MFI Area multiplier', type = input.float) rsiMFIPosY = input(2.5, title = 'MFI Area Y Pos', type = input.float) // } PARAMETERS // FUNCTIONS { // RSI+MFI f_rsimfi(_period, _multiplier, _tf) => security(syminfo.tickerid, _tf, sma(((close - open) / (high - low)) * _multiplier, _period) - rsiMFIPosY) // } FUNCTIONS // CALCULATE INDICATORS { // RSI + MFI Area rsiMFI = f_rsimfi(rsiMFIperiod, rsiMFIMultiplier, timeframe.period) rsiMFIColor = rsiMFI > 0 ? #3ee145 : #ff3d2e // } CALCULATE INDICATORS // DRAW { bgcolor(darkMode ? color.new(#000000, 80) : na) zLine = plot(0, color = color.new(colorWhite, 50)) // MFI BAR rsiMfiBarTopLine = plot(rsiMFIShow ? -95 : na, title = 'MFI Bar TOP Line', transp = 100) rsiMfiBarBottomLine = plot(rsiMFIShow ? -99 : na, title = 'MFI Bar BOTTOM Line', transp = 100) fill(rsiMfiBarTopLine, rsiMfiBarBottomLine, title = 'MFI Bar Colors', color = rsiMFIColor, transp = 75) // MFI AREA rsiMFIplot = plot(rsiMFIShow ? rsiMFI: na, title = 'RSI+MFI Area', color = rsiMFIColor, transp = 20) fill(rsiMFIplot, zLine, rsiMFIColor, transp = 40) // } DRAW