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)
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。