OPEN-SOURCE SCRIPT
Phân tích Đa Khung Thời gian

//version=5
indicator("Phân tích Đa Khung Thời gian", shorttitle="Manual Analysis", overlay=true)
// ============== INPUTS CHO BẢNG PHÂN TÍCH XU HƯỚNG ==============
monthlyTrend = input.string("Bullish", title="Xu hướng Monthly", options=["Bullish", "Bearish"])
weeklyTrend = input.string("Bullish", title="Xu hướng Weekly", options=["Bullish", "Bearish"])
dailyTrend = input.string("Bullish", title="Xu hướng Daily", options=["Bullish", "Bearish"])
h4Trend = input.string("Bullish", title="Xu hướng H4", options=["Bullish", "Bearish"])
h1Trend = input.string("Bullish", title="Xu hướng H1", options=["Bullish", "Bearish"])
m30Trend = input.string("Bullish", title="Xu hướng M30", options=["Bullish", "Bearish"])
m15Trend = input.string("Bullish", title="Xu hướng M15", options=["Bullish", "Bearish"])
m5Trend = input.string("Bullish", title="Xu hướng M5", options=["Bullish", "Bearish"])
m1Trend = input.string("Bullish", title="Xu hướng M1", options=["Bullish", "Bearish"])
// Mảng chứa nhãn và xu hướng
labels = array.from("Mn", "W", "D", "H4", "H1", "M30", "M15", "M5", "M1")
trends = array.from(monthlyTrend, weeklyTrend, dailyTrend, h4Trend, h1Trend, m30Trend, m15Trend, m5Trend, m1Trend)
// ============== TẠO VÀ CẬP NHẬT BẢNG DUY NHẤT ==============
// Sắp xếp bảng nằm ngang
var table manual_analysis_table = table.new(position.top_right, array.size(labels), 2, bgcolor=color.new(color.black, 80), border_width=1)
if barstate.islast
// TIÊU ĐỀ HÀNG ĐẦU TIÊN (Nhãn khung thời gian)
for i = 0 to array.size(labels) - 1
table.cell(manual_analysis_table, i, 0, array.get(labels, i), text_color=color.white, bgcolor=color.new(color.blue, 50), text_size=size.small)
// ĐỔ DỮ LIỆU XU HƯỚNG VÀO HÀNG THỨ HAI
for i = 0 to array.size(trends) - 1
trendStatus = array.get(trends, i)
trendColor = trendStatus == "Bullish" ? color.green : color.red
trendSymbol = trendStatus == "Bullish" ? "▲" : "▼"
table.cell(manual_analysis_table, i, 1, trendSymbol, text_color=trendColor)
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.