Multi-Timeframe Trend Table
Multi-Timeframe Trend Table is an indicator drawn over the price chart.
other bar sizestables and dashboards
indicator "Multi-Timeframe Trend Table"pane: priceh1 = bars(bars: 1h)h4 = bars(bars: 4h)d1 = bars(bars: 1d)h1_up = h1.close > ema(h1.close, 50)h4_up = h4.close > ema(h4.close, 50)d1_up = d1.close > ema(d1.close, 50)score = (if h1_up then 1 else 0) + (if h4_up then 1 else 0) + (if d1_up then 1 else 0)table position: bottom_right, rows: [["1h", if h1_up then "up" else "down"], ["4h", if h4_up then "up" else "down"], ["1d", if d1_up then "up" else "down"], ["Score", "{score}/3"]]bar_color if score == 3 then green else if score == 0 then red else gray| 1h | down |
| 4h | down |
| 1d | down |
| Score | 0/3 |
Sample data. Not a result. The real AlgoBarsX engine ran this exact script on made-up bars, and this replays what it drew and did. It shows no profit or loss, and it says nothing about how the script would do in a real market.
Replay of this script on 150 sample bars: 0 lines drawn.
Multi-Timeframe Trend Table is an indicator drawn over the price chart.
It calculates h1 as 1-hour bars, h4 as 4-hour bars, d1 as daily bars, h1_up as whether h1.close is above the 50-bar EMA of h1.close, h4_up as whether h4.close is above the 50-bar EMA of h4.close, d1_up as whether d1.close is above the 50-bar EMA of d1.close and score as 1 when h1_up, otherwise 0 plus 1 when h4_up, otherwise 0 plus 1 when d1_up, otherwise 0.
On the chart, it shows a table and colors the bars.