OPEN-SOURCE SCRIPT
MTF EMA Directional Bias -1hr and 4hr

A compact, fixed-position table (bottom-right corner) that shows the current slope direction of two higher-timeframe EMAs:
4H EMA 50 → direction over the last 2 bars (UP ↑, DOWN ↓, or FLAT ⏸)
1H EMA 21 → direction over the last 2 bars (UP ↑, DOWN ↓, or FLAT ⏸)
Background color logic:
Green → both 4H and 1H EMAs are sloping upward
Red → both 4H and 1H EMAs are sloping downward
Gray → mixed or flat directions (no confluence)
Additionally draws the actual 1H EMA-21 (purple) and 4H EMA-50 (red) as step-lines on the chart.
4H EMA 50 → direction over the last 2 bars (UP ↑, DOWN ↓, or FLAT ⏸)
1H EMA 21 → direction over the last 2 bars (UP ↑, DOWN ↓, or FLAT ⏸)
Background color logic:
Green → both 4H and 1H EMAs are sloping upward
Red → both 4H and 1H EMAs are sloping downward
Gray → mixed or flat directions (no confluence)
Additionally draws the actual 1H EMA-21 (purple) and 4H EMA-50 (red) as step-lines on the chart.
开源脚本
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
免责声明
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
开源脚本
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
免责声明
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.