Banner
Your banner contains a hero image with text overlay. You can also add call to action buttons.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © ZenAndTheArtOfTrading / www.PineScriptMastery.com // @version=5 indicator("Regime Filter") // Get user input res = input.timeframe(title="Timeframe", defval="D") len = input.int(title="EMA Length", defval=20) market = input.symbol(title="Market", defval="NASDAQ:NDX") // Define custom security function f_sec(_market, _res, _exp) => request.security(_market, _res, _exp[barstate.isconfirmed ? 0 : 1]) // Get EMA value ema = ta.ema(close, len) emaValue = f_sec(market, res, ema) // Check if price is above or below EMA filter marketPrice = f_sec(market, res, close) regimeFilter = marketPrice > emaValue or marketPrice[1] > emaValue[1] // Change background color bgcolor(regimeFilter ? color.green : color.red)
<div class="card-deck"> <div class="d-flex align-items-stretch"> <div class="card flex-fill"> <div class="card-body"> <!-- card content here --> </div> </div> <div class="card flex-fill"> <div class="card-body"> <!-- card content here --> </div> </div> <div class="card flex-fill"> <div class="card-body"> <!-- card content here --> </div> </div> </div> </div>