I want a custom watch list script for think or swim that will search the top 20 tradable symbols for the trading sectors: Industrials, Energy, Information Tech, Financials, Health Care, Materials, Consumer Discretionary, communications services, utilities, consumer staples, real estate, after putting these equities in their related sector, then have these sectors in the watch list display their ordered rank by showing the cumulative dollar change during the market day trading.
I script would just list the sectors with the generic name and show the $ rank. It would give a quick generic named sector rank to see where that sector is trading.
google ai Worte this:
thinkscript
ANY IDEAS, THANKS
I script would just list the sectors with the generic name and show the $ rank. It would give a quick generic named sector rank to see where that sector is trading.
google ai Worte this:
thinkscript
Code:
# Title: Cumulative Dollar Change Column
# Place this in a Custom Watchlist Column set to a Daily (D) timeframe
def marketOpen = SecondsFromTime(0930) >= 0;
def currentPrice = close;
def openPrice = open(period = PriceType.LAST);
# Calculate the net dollar change since the market opened
plot DollarChange = currentPrice - openPrice;
# Color coding: Green for positive dollar gain, Red for a loss
DollarChange.AssignValueColor(if DollarChange >= 0 then Color.GREEN else Color.RED);
# Ensure the column background changes slightly for fast scanning
AssignBackgroundColor(if DollarChange >= 0 then Color.DARK_GREEN else Color.DARK_RED);
ANY IDEAS, THANKS