Vyrexxa :
//@version=6
indicator("Situational Awareness Dashboard", overlay = true)
//====================================================
// USER SETTINGS
//====================================================
trendLength = input.int(50, "Trend EMA Length", minval = 1)
majorTrendLength = input.int(200, "Daily Major Trend EMA", minval = 1)
dailyTimeframe = input.timeframe("D", "Daily Timeframe")
fourHourTF = input.timeframe("240", "4-Hour Timeframe")
oneHourTF = input.timeframe("60", "1-Hour Timeframe")
vixSymbol = input.symbol("CBOE:VIX", "VIX Symbol")
vixEmaLength = input.int(20, "VIX EMA Length", minval = 1)
greenThreshold = input.int(3, "Green Threshold", minval = 1, maxval = 5)
redThreshold = input.int(-3, "Red Threshold", minval = -5, maxval = -1)
showBackground = input.bool(true, "Colour Chart Background")
showTrendEMA = input.bool(true, "Show Chart EMA")
//====================================================
// CONFIRMED HIGHER-TIMEFRAME DATA
// Uses the previous completed candle to reduce repainting.
//====================================================
getTrendData(string tf, int emaLength) =>
tfClose = request.security(
syminfo.tickerid,
tf,
close[1],
lookahead = barmerge.lookahead_on)
tfEMA = request.security(
syminfo.tickerid,
tf,
ta.ema(close, emaLength)[1],
lookahead = barmerge.lookahead_on)
tfPreviousEMA = request.security(
syminfo.tickerid,
tf,
ta.ema(close, emaLength)[2],
lookahead = barmerge.lookahead_on)
bullish = tfClose > tfEMA and tfEMA > tfPreviousEMA
bearish = tfClose < tfEMA and tfEMA < tfPreviousEMA
score = bullish ? 1 : bearish ? -1 : 0
[score, bullish, bearish, tfClose, tfEMA]
//====================================================
// TIMEFRAME CONDITIONS
//====================================================
[dailyScore, dailyBull, dailyBear, dailyClose, dailyEMA] =
getTrendData(dailyTimeframe, trendLength)
[fourHourScore, fourHourBull, fourHourBear, fourHourClose, fourHourEMA] =
getTrendData(fourHourTF, trendLength)
[oneHourScore, oneHourBull, oneHo
2026-07-22 01:05:02