What it does
This is a TradingView Strategy (not an Indicator) — it generates simulated entries and exits you can backtest against any symbol and any base timeframe. The rule: enter long only when the slope-unanimity condition from JalenPaint fires across ALL 6 selected timeframes simultaneously (1m / 5m / 15m / 1h / 4h / D, individually toggleable). Exit when the chart's own timeframe rolls into downtrend.
Why it exists
JalenPaint tells you the trend regime on the chart you're looking at. The strategy version asks the harder question: is the trend regime aligned across multiple timeframes at once? A 5-min uptrend with a daily downtrend is the most common false signal — this script makes that filter explicit and backtestable.
How to read it
- Bar color: green when the chart's own timeframe is in slope-unanimity uptrend; red when downtrend; uncolored otherwise.
- Triangles: green up-triangle marks an entry signal (all selected timeframes agree); red down-triangle marks the exit (current timeframe rolled).
- Top-right table: live status of each timeframe — UP / DOWN / OFF. Watch this to see which timeframe broke first when the trend faded.
Read this BEFORE running the backtester
This is a research tool, not a profitable system as-shipped. The defaults bake in 100%-of-equity sizing, no stop-loss, no slippage, and no commissions — TradingView's strategy defaults. Real-money use requires (a) a stop-loss tied to structure (per Layer 2 of the 5-layer framework — see Module 1), (b) realistic commissions for your broker, (c) realistic slippage for your instrument's liquidity, (d) a sizing rule that survives 5+ consecutive losses. The backtester here surfaces alignment edge; it doesn't manage risk.
Source
Full Pine Script v5 source — copy into TradingView's Pine Editor and add to chart, OR download the .pine file:
Download jalen-multi-timeframe-strategy.pine →
Show inline source (~120 lines)
//@version=5
strategy("JalenMultiTimeframeStrategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// Input parameters
i = input.int(defval=9, title="EMA Period")
use_1min = input.bool(true, title="Use 1 Minute Timeframe")
use_5min = input.bool(true, title="Use 5 Minute Timeframe")
use_15min = input.bool(true, title="Use 15 Minute Timeframe")
use_1hour = input.bool(true, title="Use 1 Hour Timeframe")
use_4hour = input.bool(true, title="Use 4 Hour Timeframe")
use_daily = input.bool(true, title="Use Daily Timeframe")
// Function to check trend on a specific timeframe
check_trend(timeframe) =>
[ema1, ema2, ema3, ema4, ema5, ema6, ema7, ema8, ema9] = request.security(syminfo.tickerid, timeframe, [ta.ema(close, 1), ta.ema(close, 2), ta.ema(close, 3), ta.ema(close, 4), ta.ema(close, 5), ta.ema(close, 6), ta.ema(close, 7), ta.ema(close, 8), ta.ema(close, i)])
[prev_ema1, prev_ema2, prev_ema3, prev_ema4, prev_ema5, prev_ema6, prev_ema7, prev_ema8, prev_ema9] = request.security(syminfo.tickerid, timeframe, [ta.ema(close, 1)[1], ta.ema(close, 2)[1], ta.ema(close, 3)[1], ta.ema(close, 4)[1], ta.ema(close, 5)[1], ta.ema(close, 6)[1], ta.ema(close, 7)[1], ta.ema(close, 8)[1], ta.ema(close, i)[1]])
[prev_close, prev_open] = request.security(syminfo.tickerid, timeframe, [close[1], open[1]])
uptrend = ema1 > prev_ema1 and ema2 > prev_ema2 and ema3 > prev_ema3 and ema4 > prev_ema4 and ema5 > prev_ema5 and ema6 > prev_ema6 and ema7 > prev_ema7 and ema8 > prev_ema8 and ema9 > prev_ema9 and close > prev_open
downtrend = ema1 < prev_ema1 and ema2 < prev_ema2 and ema3 < prev_ema3 and ema4 < prev_ema4 and ema5 < prev_ema5 and ema6 < prev_ema6 and ema7 < prev_ema7 and ema8 < prev_ema8 and ema9 < prev_ema9 and close < prev_open
[uptrend, downtrend]
// Per-timeframe checks (1m / 5m / 15m / 1h / 4h / D), toggleable via inputs
[uptrend_1min_temp, downtrend_1min_temp] = check_trend("1")
uptrend_1min = use_1min ? uptrend_1min_temp : false
downtrend_1min = use_1min ? downtrend_1min_temp : false
// ... 5min / 15min / 1hour / 4hour / daily follow the same shape ...
// (full source in the .pine download — same pattern across 6 timeframes plus the chart's own)
[uptrend_current, downtrend_current] = check_trend(timeframe.period)
all_uptrend = (not use_1min or uptrend_1min) and (not use_5min or uptrend_5min) and (not use_15min or uptrend_15min) and (not use_1hour or uptrend_1hour) and (not use_4hour or uptrend_4hour) and (not use_daily or uptrend_daily)
exit_signal = downtrend_current
if all_uptrend and strategy.position_size == 0
strategy.entry("Long", strategy.long)
if exit_signal and strategy.position_size > 0
strategy.close("Long")
barcolor = uptrend_current ? color.green : downtrend_current ? color.red : na
barcolor(barcolor)
plotshape(all_uptrend and strategy.position_size == 0, title="Entry", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(exit_signal and strategy.position_size > 0, title="Exit", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
// Top-right status table also drawn — see full source for the table.cell calls.