Multi-Timeframe Trend Table

Multi-Timeframe Trend Table is an indicator drawn over the price chart.

other bar sizestables and dashboards

multi-timeframe-trend-table.abx
1indicator "Multi-Timeframe Trend Table"
2pane: price
3
4h1 = bars(bars: 1h)
5h4 = bars(bars: 4h)
6d1 = bars(bars: 1d)
7
8h1_up = h1.close > ema(h1.close, 50)
9h4_up = h4.close > ema(h4.close, 50)
10d1_up = d1.close > ema(d1.close, 50)
11score = (if h1_up then 1 else 0) + (if h4_up then 1 else 0) + (if d1_up then 1 else 0)
12
13table 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"]]
14bar_color if score == 3 then green else if score == 0 then red else gray
What this script says

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.

Try this in the Terminal. AlgoBars is free: $0 a month, no card needed.

Create my free account