mod note:
MTF Execution Dashboard
The 1-Hour Frame (Macro Structure): Tracks recent higher highs and higher lows to ensure you are strictly trading in the direction of the dominant market structure.
The 30-Minute Frame (Trend & Anti-Chase Engine): Measures true trend strength to filter out low-volume chop. Crucially, giving you an immediate warning so you never buy the top of an overextended move.
The 15-Minute Frame (Location & Reward/Risk): Determines if you actually have room to make money. It maps local support and resistance to calculate your real-time reward-to-risk ratio, ensuring you only take pullbacks with edge or fresh, unextended breakouts.
The 5-Minute Frame (Execution Readiness): Scores the actual trigger candle across 5 strict metrics—relative volume, displacement, path efficiency, close location, and ATR volatility expansion—rating the setup quality from 0 to 5.
MTF Execution Dashboard
The 1-Hour Frame (Macro Structure): Tracks recent higher highs and higher lows to ensure you are strictly trading in the direction of the dominant market structure.
The 30-Minute Frame (Trend & Anti-Chase Engine): Measures true trend strength to filter out low-volume chop. Crucially, giving you an immediate warning so you never buy the top of an overextended move.
The 15-Minute Frame (Location & Reward/Risk): Determines if you actually have room to make money. It maps local support and resistance to calculate your real-time reward-to-risk ratio, ensuring you only take pullbacks with edge or fresh, unextended breakouts.
The 5-Minute Frame (Execution Readiness): Scores the actual trigger candle across 5 strict metrics—relative volume, displacement, path efficiency, close location, and ATR volatility expansion—rating the setup quality from 0 to 5.
Code:
# ================================================================
# MTF EXECUTION DASHBOARD V1.3
# ThinkOrSwim lower study
#
# Intended chart: 5 minutes
# Decision chain:
# 1 hour = market-structure permission
# 30 min = established trend / chop filter
# 15 min = pullback location OR confirmed breakout path
# 5 min = participation, displacement, efficiency,
# candle conviction, and volatility
#
# Green = supports a long
# Red = supports a short
# Yellow = neutral / condition not ready
# ================================================================
declare lower;
# ---------------------------
# DISPLAY AND SIGNAL INPUTS
# ---------------------------
input showLabels = yes;
input showMatrix = yes;
input showSignalArrows = yes;
input enableAlerts = no;
input useClosedHigherTimeframeBars = yes;
input useConfirmedExecutionBar = yes;
input requireOppositeSignalToRearm = yes;
input restrictSignalsToRTH = no;
# ---------------------------
# 1-HOUR STRUCTURE INPUTS
# ---------------------------
input structureWindow = 3;
# ---------------------------
# 30-MINUTE TREND INPUTS
# ---------------------------
input trendFastLength = 8;
input trendSlowLength = 21;
input trendSlopeBars = 2;
input minimumTrendSeparationATR = 0.08;
# ---------------------------
# 15-MINUTE LOCATION INPUTS
# ---------------------------
input locationLookback = 20;
input locationATRLength = 14;
input locationEdgePercent = 40.0;
input minimumRewardRisk = 1.50;
input allowBreakoutEntries = yes;
input minimumBreakoutCloseATR = 0.05;
input maximumBreakoutExtensionATR = 0.35;
input useBreakoutChaseFilter = yes;
input maximumBarsSinceTrendMeanTouch = 18;
# ---------------------------
# 5-MINUTE EXECUTION INPUTS
# ---------------------------
input volumeLength = 20;
input minimumRelativeVolume = 1.20;
input atrLength = 14;
input minimumRangeATR = 1.10;
input maximumRangeATR = 2.00;
input efficiencyLength = 10;
input minimumEfficiency = 0.30;
input minimumCloseLocation = 0.70;
input minimumBodyToRange = 0.60;
input shortATRLength = 5;
input longATRLength = 20;
input minimumATRExpansion = 1.00;
input minimumExecutionChecks = 4;
# ================================================================
# CHART AND SESSION CONTROL
# ================================================================
def chartIsFiveMinute = GetAggregationPeriod() == AggregationPeriod.FIVE_MIN;
def isRTH = SecondsFromTime(0930) >= 0 and SecondsTillTime(1600) > 0;
def sessionOK = !restrictSignalsToRTH or isRTH;
# ================================================================
# CONFIRMED 5-MINUTE EXECUTION DATA
# ================================================================
def xOpen = if useConfirmedExecutionBar then open[1] else open;
def xHigh = if useConfirmedExecutionBar then high[1] else high;
def xLow = if useConfirmedExecutionBar then low[1] else low;
def xClose = if useConfirmedExecutionBar then close[1] else close;
def xVolume = if useConfirmedExecutionBar then volume[1] else volume;
# ================================================================
# 1-HOUR STRUCTURE: RECENT WINDOW VERSUS PRIOR WINDOW
# ================================================================
def h1HighRaw = high(period = AggregationPeriod.HOUR);
def h1LowRaw = low(period = AggregationPeriod.HOUR);
def h1High = if useClosedHigherTimeframeBars then h1HighRaw[1] else h1HighRaw;
def h1Low = if useClosedHigherTimeframeBars then h1LowRaw[1] else h1LowRaw;
def h1RecentHigh = Highest(h1High, structureWindow);
def h1PriorHigh = Highest(h1High[structureWindow], structureWindow);
def h1RecentLow = Lowest(h1Low, structureWindow);
def h1PriorLow = Lowest(h1Low[structureWindow], structureWindow);
def h1BullStructure = h1RecentHigh > h1PriorHigh and
h1RecentLow > h1PriorLow;
def h1BearStructure = h1RecentHigh < h1PriorHigh and
h1RecentLow < h1PriorLow;
# ================================================================
# 30-MINUTE TREND: EMA ORDER, SLOPE, AND SEPARATION
# ================================================================
def m30HighRaw = high(period = AggregationPeriod.THIRTY_MIN);
def m30LowRaw = low(period = AggregationPeriod.THIRTY_MIN);
def m30CloseRaw = close(period = AggregationPeriod.THIRTY_MIN);
def m30High = if useClosedHigherTimeframeBars then m30HighRaw[1] else m30HighRaw;
def m30Low = if useClosedHigherTimeframeBars then m30LowRaw[1] else m30LowRaw;
def m30Close = if useClosedHigherTimeframeBars then m30CloseRaw[1] else m30CloseRaw;
def m30Fast = ExpAverage(m30Close, trendFastLength);
def m30Slow = ExpAverage(m30Close, trendSlowLength);
def m30TR = TrueRange(m30High, m30Close, m30Low);
def m30ATR = Average(m30TR, atrLength);
def m30SeparationATR = if m30ATR > 0
then AbsValue(m30Fast - m30Slow) / m30ATR
else 0;
def m30BullTrend = m30Close > m30Fast and
m30Fast > m30Slow and
m30Fast > m30Fast[trendSlopeBars] and
m30SeparationATR >= minimumTrendSeparationATR;
def m30BearTrend = m30Close < m30Fast and
m30Fast < m30Slow and
m30Fast < m30Fast[trendSlopeBars] and
m30SeparationATR >= minimumTrendSeparationATR;
# ================================================================
# BREAKOUT FRESHNESS / CHASE FILTER
# The trend itself may remain healthy for hours. What matters for a
# NEW breakout entry is how long price has gone without pulling back
# to the 30-minute fast EMA. A touch resets the entry clock.
# On a 5-minute chart, the default 18 bars = 90 minutes.
# ================================================================
def longTrendMeanTouch = xLow <= m30Fast;
def shortTrendMeanTouch = xHigh >= m30Fast;
rec longBarsSinceTrendMeanTouch = CompoundValue(1,
if !m30BullTrend or longTrendMeanTouch then 0
else if xClose > m30Fast then longBarsSinceTrendMeanTouch[1] + 1
else 0,
0);
rec shortBarsSinceTrendMeanTouch = CompoundValue(1,
if !m30BearTrend or shortTrendMeanTouch then 0
else if xClose < m30Fast then shortBarsSinceTrendMeanTouch[1] + 1
else 0,
0);
def longTrendMeanDistanceATR = if m30ATR > 0
then Max(0, xClose - m30Fast) / m30ATR
else 0;
def shortTrendMeanDistanceATR = if m30ATR > 0
then Max(0, m30Fast - xClose) / m30ATR
else 0;
def longBreakoutTooOld = useBreakoutChaseFilter and
longBarsSinceTrendMeanTouch > maximumBarsSinceTrendMeanTouch;
def shortBreakoutTooOld = useBreakoutChaseFilter and
shortBarsSinceTrendMeanTouch > maximumBarsSinceTrendMeanTouch;
# ================================================================
# 15-MINUTE LOCATION: RANGE POSITION AND REWARD/RISK PROXY
# ================================================================
def m15HighRaw = high(period = AggregationPeriod.FIFTEEN_MIN);
def m15LowRaw = low(period = AggregationPeriod.FIFTEEN_MIN);
def m15CloseRaw = close(period = AggregationPeriod.FIFTEEN_MIN);
def m15High = if useClosedHigherTimeframeBars then m15HighRaw[1] else m15HighRaw;
def m15Low = if useClosedHigherTimeframeBars then m15LowRaw[1] else m15LowRaw;
def m15Close = if useClosedHigherTimeframeBars then m15CloseRaw[1] else m15CloseRaw;
def m15Support = Lowest(m15Low, locationLookback);
def m15Resistance = Highest(m15High, locationLookback);
def m15Range = m15Resistance - m15Support;
def m15RangePosition = if m15Range > 0
then (xClose - m15Support) / m15Range
else 0.50;
def m15LongRisk = xClose - m15Support;
def m15LongReward = m15Resistance - xClose;
def m15ShortRisk = m15Resistance - xClose;
def m15ShortReward = xClose - m15Support;
def m15LongRR = if m15LongRisk > 0
then m15LongReward / m15LongRisk
else 0;
def m15ShortRR = if m15ShortRisk > 0
then m15ShortReward / m15ShortRisk
else 0;
def m15LongLocation = m15RangePosition >= 0 and
m15RangePosition <= locationEdgePercent / 100 and
m15LongRR >= minimumRewardRisk;
def m15ShortLocation = m15RangePosition <= 1 and
m15RangePosition >= 1 - locationEdgePercent / 100 and
m15ShortRR >= minimumRewardRisk;
# A 15-minute ATR is retained for the dashboard readout and diagnostics.
def m15TR = TrueRange(m15High, m15Close, m15Low);
def m15ATR = Average(m15TR, locationATRLength);
# ================================================================
# 15-MINUTE BREAKOUT PATH
# A breakout is acceptable only after the confirmed 5-minute close is
# outside the prior 15-minute range. The ATR extension cap prevents
# the dashboard from calling a late, overextended candle an entry.
# ================================================================
def longBreakoutDistance = xClose - m15Resistance;
def shortBreakoutDistance = m15Support - xClose;
def m15LongBreakoutRaw = allowBreakoutEntries and
m15ATR > 0 and
longBreakoutDistance >= m15ATR * minimumBreakoutCloseATR and
longBreakoutDistance <= m15ATR * maximumBreakoutExtensionATR and
xClose > xOpen;
def m15ShortBreakoutRaw = allowBreakoutEntries and
m15ATR > 0 and
shortBreakoutDistance >= m15ATR * minimumBreakoutCloseATR and
shortBreakoutDistance <= m15ATR * maximumBreakoutExtensionATR and
xClose < xOpen;
def m15LongChaseWarning = m15LongBreakoutRaw and longBreakoutTooOld;
def m15ShortChaseWarning = m15ShortBreakoutRaw and shortBreakoutTooOld;
def m15LongBreakout = m15LongBreakoutRaw and !longBreakoutTooOld;
def m15ShortBreakout = m15ShortBreakoutRaw and !shortBreakoutTooOld;
def m15LongPath = m15LongLocation or m15LongBreakout;
def m15ShortPath = m15ShortLocation or m15ShortBreakout;
# ================================================================
# 5-MINUTE CHECK 1: DIRECTIONAL PARTICIPATION
# ================================================================
def priorVolumeAverage = Average(xVolume[1], volumeLength);
def relativeVolume = if priorVolumeAverage > 0
then xVolume / priorVolumeAverage
else 0;
def participationPass = relativeVolume >= minimumRelativeVolume;
def participationLong = participationPass and xClose > xClose[1];
def participationShort = participationPass and xClose < xClose[1];
# ================================================================
# 5-MINUTE CHECK 2: DIRECTIONAL RANGE DISPLACEMENT
# ================================================================
def xTrueRange = Max(xHigh - xLow,
Max(AbsValue(xHigh - xClose[1]),
AbsValue(xLow - xClose[1])));
def priorATR = Average(xTrueRange[1], atrLength);
def rangeATR = if priorATR > 0 then xTrueRange / priorATR else 0;
def unusualRangePass = rangeATR >= minimumRangeATR and
rangeATR <= maximumRangeATR;
def unusualLong = unusualRangePass and xClose > xOpen;
def unusualShort = unusualRangePass and xClose < xOpen;
# ================================================================
# 5-MINUTE CHECK 3: DIRECTIONAL EFFICIENCY
# ================================================================
def pathDistance = Sum(AbsValue(xClose - xClose[1]), efficiencyLength);
def netDistance = AbsValue(xClose - xClose[efficiencyLength]);
def efficiencyRatio = if pathDistance > 0
then netDistance / pathDistance
else 0;
def efficiencyPass = efficiencyRatio >= minimumEfficiency;
def efficiencyLong = efficiencyPass and xClose > xClose[efficiencyLength];
def efficiencyShort = efficiencyPass and xClose < xClose[efficiencyLength];
# ================================================================
# 5-MINUTE CHECK 4: CANDLE CONVICTION
# ================================================================
def candleRange = xHigh - xLow;
def candleBody = AbsValue(xClose - xOpen);
def closeLocation = if candleRange > 0
then (xClose - xLow) / candleRange
else 0.50;
def bodyToRange = if candleRange > 0
then candleBody / candleRange
else 0;
def convictionLong = xClose > xOpen and
closeLocation >= minimumCloseLocation and
bodyToRange >= minimumBodyToRange;
def convictionShort = xClose < xOpen and
closeLocation <= 1 - minimumCloseLocation and
bodyToRange >= minimumBodyToRange;
# ================================================================
# 5-MINUTE CHECK 5: DIRECTIONAL VOLATILITY EXPANSION
# ================================================================
def shortATR = Average(xTrueRange, shortATRLength);
def longATR = Average(xTrueRange, longATRLength);
def atrExpansionRatio = if longATR > 0 then shortATR / longATR else 0;
def volatilityPass = atrExpansionRatio >= minimumATRExpansion;
def volatilityLong = volatilityPass and xClose > xClose[efficiencyLength];
def volatilityShort = volatilityPass and xClose < xClose[efficiencyLength];
# ================================================================
# EXECUTION SCORES
# ================================================================
def longExecutionScore =
(if participationLong then 1 else 0) +
(if unusualLong then 1 else 0) +
(if efficiencyLong then 1 else 0) +
(if convictionLong then 1 else 0) +
(if volatilityLong then 1 else 0);
def shortExecutionScore =
(if participationShort then 1 else 0) +
(if unusualShort then 1 else 0) +
(if efficiencyShort then 1 else 0) +
(if convictionShort then 1 else 0) +
(if volatilityShort then 1 else 0);
def longContextReady = h1BullStructure and
m30BullTrend and
m15LongPath;
def shortContextReady = h1BearStructure and
m30BearTrend and
m15ShortPath;
# ================================================================
# MASTER SIGNALS
# All three context layers must agree. The execution layer must meet
# the user-selected minimum number of directional checks.
# ================================================================
def rawBuy = chartIsFiveMinute and sessionOK and
longContextReady and
longExecutionScore >= minimumExecutionChecks;
def rawSell = chartIsFiveMinute and sessionOK and
shortContextReady and
shortExecutionScore >= minimumExecutionChecks;
# 1 = most recent signal was BUY; -1 = most recent signal was SELL.
rec lastSignalDirection = CompoundValue(1,
if rawBuy and lastSignalDirection[1] != 1 then 1
else if rawSell and lastSignalDirection[1] != -1 then -1
else lastSignalDirection[1],
0);
def freshBuy = rawBuy and
(if requireOppositeSignalToRearm
then lastSignalDirection[1] != 1
else !rawBuy[1]);
def freshSell = rawSell and
(if requireOppositeSignalToRearm
then lastSignalDirection[1] != -1
else !rawSell[1]);
# ================================================================
# MATRIX ROWS
# ================================================================
plot Row1_Structure = if showMatrix and !IsNaN(close) then 800 else Double.NaN;
plot Row2_Trend = if showMatrix and !IsNaN(close) then 700 else Double.NaN;
plot Row3_Location = if showMatrix and !IsNaN(close) then 600 else Double.NaN;
plot Row4_Participation = if showMatrix and !IsNaN(close) then 500 else Double.NaN;
plot Row5_Unusual = if showMatrix and !IsNaN(close) then 400 else Double.NaN;
plot Row6_Efficiency = if showMatrix and !IsNaN(close) then 300 else Double.NaN;
plot Row7_Conviction = if showMatrix and !IsNaN(close) then 200 else Double.NaN;
plot Row8_Volatility = if showMatrix and !IsNaN(close) then 100 else Double.NaN;
Row1_Structure.SetPaintingStrategy(PaintingStrategy.POINTS);
Row2_Trend.SetPaintingStrategy(PaintingStrategy.POINTS);
Row3_Location.SetPaintingStrategy(PaintingStrategy.POINTS);
Row4_Participation.SetPaintingStrategy(PaintingStrategy.POINTS);
Row5_Unusual.SetPaintingStrategy(PaintingStrategy.POINTS);
Row6_Efficiency.SetPaintingStrategy(PaintingStrategy.POINTS);
Row7_Conviction.SetPaintingStrategy(PaintingStrategy.POINTS);
Row8_Volatility.SetPaintingStrategy(PaintingStrategy.POINTS);
Row1_Structure.SetLineWeight(5);
Row2_Trend.SetLineWeight(5);
Row3_Location.SetLineWeight(5);
Row4_Participation.SetLineWeight(5);
Row5_Unusual.SetLineWeight(5);
Row6_Efficiency.SetLineWeight(5);
Row7_Conviction.SetLineWeight(5);
Row8_Volatility.SetLineWeight(5);
Row1_Structure.AssignValueColor(
if h1BullStructure then Color.GREEN
else if h1BearStructure then Color.RED
else Color.YELLOW);
Row2_Trend.AssignValueColor(
if m30BullTrend then Color.GREEN
else if m30BearTrend then Color.RED
else Color.YELLOW);
Row3_Location.AssignValueColor(
if m15LongPath then Color.GREEN
else if m15ShortPath then Color.RED
else Color.YELLOW);
Row4_Participation.AssignValueColor(
if participationLong then Color.GREEN
else if participationShort then Color.RED
else Color.YELLOW);
Row5_Unusual.AssignValueColor(
if unusualLong then Color.GREEN
else if unusualShort then Color.RED
else Color.YELLOW);
Row6_Efficiency.AssignValueColor(
if efficiencyLong then Color.GREEN
else if efficiencyShort then Color.RED
else Color.YELLOW);
Row7_Conviction.AssignValueColor(
if convictionLong then Color.GREEN
else if convictionShort then Color.RED
else Color.YELLOW);
Row8_Volatility.AssignValueColor(
if volatilityLong then Color.GREEN
else if volatilityShort then Color.RED
else Color.YELLOW);
# ================================================================
# SIGNAL ARROWS
# ================================================================
plot BuySignal = if showSignalArrows and freshBuy then 875 else Double.NaN;
BuySignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
BuySignal.SetDefaultColor(Color.GREEN);
BuySignal.SetLineWeight(4);
plot SellSignal = if showSignalArrows and freshSell then 875 else Double.NaN;
SellSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
SellSignal.SetDefaultColor(Color.RED);
SellSignal.SetLineWeight(4);
# ================================================================
# PLAIN-ENGLISH LABELS
# ================================================================
AddLabel(showLabels,
if chartIsFiveMinute
then "TIMEFRAME: 5M CORRECT"
else "TIMEFRAME: USE A 5-MINUTE CHART",
if chartIsFiveMinute then Color.GREEN else Color.RED);
AddLabel(showLabels,
if !chartIsFiveMinute then
"BIAS: N/A | ACTION: USE A 5-MINUTE CHART"
else if !sessionOK then
"BIAS: PAUSED | ACTION: OUTSIDE THE SELECTED TRADING SESSION"
else if h1BullStructure and m30BullTrend and m15LongChaseWarning then
"BIAS: BULLISH | ACTION: HOLD LONG IF IN - EXTENDED / DON'T CHASE | " +
longBarsSinceTrendMeanTouch * 5 + " MIN SINCE 30M EMA TOUCH"
else if h1BearStructure and m30BearTrend and m15ShortChaseWarning then
"BIAS: BEARISH | ACTION: HOLD SHORT IF IN - EXTENDED / DON'T CHASE | " +
shortBarsSinceTrendMeanTouch * 5 + " MIN SINCE 30M EMA TOUCH"
else if freshBuy and m15LongBreakout then
"BIAS: BULLISH | ACTION: BUY BREAKOUT NOW | QUALITY " + longExecutionScore + "/5"
else if freshBuy then
"BIAS: BULLISH | ACTION: BUY PULLBACK NOW | QUALITY " + longExecutionScore + "/5"
else if freshSell and m15ShortBreakout then
"BIAS: BEARISH | ACTION: SELL BREAKDOWN NOW | QUALITY " + shortExecutionScore + "/5"
else if freshSell then
"BIAS: BEARISH | ACTION: SELL PULLBACK NOW | QUALITY " + shortExecutionScore + "/5"
else if rawBuy then
"BIAS: BULLISH | ACTION: HOLD LONG IF IN - CONDITIONS REMAIN ALIGNED | QUALITY " + longExecutionScore + "/5"
else if rawSell then
"BIAS: BEARISH | ACTION: HOLD SHORT IF IN - CONDITIONS REMAIN ALIGNED | QUALITY " + shortExecutionScore + "/5"
else if longContextReady then
"BIAS: BULLISH | ACTION: HOLD LONG IF IN - WAIT TO ENTER OR ADD | QUALITY " + longExecutionScore + "/5"
else if shortContextReady then
"BIAS: BEARISH | ACTION: HOLD SHORT IF IN - WAIT TO ENTER OR ADD | QUALITY " + shortExecutionScore + "/5"
else if h1BullStructure and m30BullTrend then
"BIAS: BULLISH | ACTION: HOLD LONG IF IN - WAIT FOR 15M LOCATION"
else if h1BearStructure and m30BearTrend then
"BIAS: BEARISH | ACTION: HOLD SHORT IF IN - WAIT FOR 15M LOCATION"
else if h1BullStructure then
"BIAS: EARLY BULLISH | ACTION: STAND ASIDE - WAIT FOR 30M CONFIRMATION"
else if h1BearStructure then
"BIAS: EARLY BEARISH | ACTION: STAND ASIDE - WAIT FOR 30M CONFIRMATION"
else "BIAS: MIXED | ACTION: STAND ASIDE",
if !chartIsFiveMinute or !sessionOK then Color.GRAY
else if h1BullStructure and m30BullTrend and m15LongChaseWarning then Color.YELLOW
else if h1BearStructure and m30BearTrend and m15ShortChaseWarning then Color.YELLOW
else if freshBuy then Color.GREEN
else if freshSell then Color.RED
else if rawBuy then Color.DARK_GREEN
else if rawSell then Color.DARK_RED
else if longContextReady then Color.LIGHT_GREEN
else if shortContextReady then Color.LIGHT_RED
else Color.YELLOW);
AddLabel(showLabels,
"1H STRUCTURE: " +
(if h1BullStructure then "HIGHER HIGHS / HIGHER LOWS"
else if h1BearStructure then "LOWER HIGHS / LOWER LOWS"
else "MIXED"),
if h1BullStructure then Color.GREEN
else if h1BearStructure then Color.RED
else Color.YELLOW);
AddLabel(showLabels,
"30M TREND: " +
(if m30BullTrend then "ESTABLISHED UP"
else if m30BearTrend then "ESTABLISHED DOWN"
else "CHOP / NOT ESTABLISHED"),
if m30BullTrend then Color.GREEN
else if m30BearTrend then Color.RED
else Color.YELLOW);
AddLabel(showLabels,
"15M LOCATION: " +
(if m15LongChaseWarning then
"EXTENDED HIGH - DON'T CHASE | " + longBarsSinceTrendMeanTouch * 5 +
" MIN FROM 30M EMA TOUCH | " + Round(longTrendMeanDistanceATR, 2) + " ATR FROM TREND MEAN"
else if m15ShortChaseWarning then
"EXTENDED LOW - DON'T CHASE | " + shortBarsSinceTrendMeanTouch * 5 +
" MIN FROM 30M EMA TOUCH | " + Round(shortTrendMeanDistanceATR, 2) + " ATR FROM TREND MEAN"
else if m15LongBreakout then "CONFIRMED BREAKOUT - " + Round(longBreakoutDistance / m15ATR, 2) + " ATR ABOVE"
else if m15ShortBreakout then "CONFIRMED BREAKDOWN - " + Round(shortBreakoutDistance / m15ATR, 2) + " ATR BELOW"
else if m15LongLocation then "SUPPORT SIDE - LONG ROOM " + Round(m15LongRR, 1) + "R"
else if m15ShortLocation then "RESISTANCE SIDE - SHORT ROOM " + Round(m15ShortRR, 1) + "R"
else "MIDDLE / POOR REWARD-RISK") +
" | RANGE " + Round(m15RangePosition * 100, 0) + "%",
if m15LongChaseWarning or m15ShortChaseWarning then Color.YELLOW
else if m15LongPath then Color.GREEN
else if m15ShortPath then Color.RED
else Color.YELLOW);
AddLabel(showLabels,
"5M ENTRY QUALITY: LONG " + longExecutionScore + "/5 | SHORT " + shortExecutionScore + "/5",
if longExecutionScore >= minimumExecutionChecks then Color.GREEN
else if shortExecutionScore >= minimumExecutionChecks then Color.RED
else Color.YELLOW);
AddLabel(showLabels,
"PARTICIPATION: " + Round(relativeVolume, 2) + "x average",
if participationLong then Color.GREEN
else if participationShort then Color.RED
else Color.YELLOW);
AddLabel(showLabels,
"DISPLACEMENT: " + Round(rangeATR, 2) + " ATR",
if unusualLong then Color.GREEN
else if unusualShort then Color.RED
else Color.YELLOW);
AddLabel(showLabels,
"EFFICIENCY: " + Round(efficiencyRatio * 100, 0) + "%",
if efficiencyLong then Color.GREEN
else if efficiencyShort then Color.RED
else Color.YELLOW);
AddLabel(showLabels,
"CANDLE: CLV " + Round(closeLocation * 100, 0) +
"% | BODY " + Round(bodyToRange * 100, 0) + "%",
if convictionLong then Color.GREEN
else if convictionShort then Color.RED
else Color.YELLOW);
AddLabel(showLabels,
"VOLATILITY: ATR5/ATR20 " + Round(atrExpansionRatio, 2),
if volatilityLong then Color.GREEN
else if volatilityShort then Color.RED
else Color.YELLOW);
AddLabel(showLabels and restrictSignalsToRTH and !isRTH,
"SIGNALS PAUSED: OUTSIDE REGULAR SESSION",
Color.GRAY);
AddLabel(showLabels,
if useConfirmedExecutionBar
then "EXECUTION: PRIOR 5M BAR CONFIRMED"
else "EXECUTION: LIVE BAR - MAY CHANGE BEFORE CLOSE",
if useConfirmedExecutionBar then Color.WHITE else Color.MAGENTA);
# ================================================================
# ALERTS
# ================================================================
Alert(enableAlerts and freshBuy,
"MTF EXECUTION DASHBOARD: BUY",
Alert.BAR,
Sound.Ding);
Alert(enableAlerts and freshSell,
"MTF EXECUTION DASHBOARD: SELL",
Alert.BAR,
Sound.Ding);
Last edited by a moderator: