Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Thank you but I stated I had already accomplished the watchlist part. What I want is to show a specific POC, say 15 day 1 hr POC and show that on any other chart regardless of time or days. Change the chart to a 1Y1D chart? No problem, it should still show the POC from the 15d1hr chart. I'm sure you're aware just changing the time from say 15 days to 10 days gives a different result and for consistency I want to use the same time always. I've manually done this for a long time, manually drawine price lines on the POC/VAH/VAL always on the same number of days and time aggregation so it'll show up on any timeframe...at that price. Just gets tiring doing it every day so would like to automate it more.If you are asking how to change your watchlist column into a Multi Time Frame Indicator, you can find a tutorial here:
https://usethinkscript.com/threads/converting-indicator-to-multi-timeframe-mtf-in-thinkorswim.8050/
Higher aggregations cannot be plotted on lower aggregations on the ToS platformThank you but I stated I had already accomplished the watchlist part. What I want is to show a specific POC, say 15 day 1 hr POC and show that on any other chart regardless of time or days. Change the chart to a 1Y1D chart? No problem, it should still show the POC from the 15d1hr chart. I'm sure you're aware just changing the time from say 15 days to 10 days gives a different result and for consistency I want to use the same time always. I've manually done this for a long time, manually drawine price lines on the POC/VAH/VAL always on the same number of days and time aggregation so it'll show up on any timeframe...at that price. Just gets tiring doing it every day so would like to automate it more.
I found the script for anyone that wants itis there a volume profile that will show the extended market then show the market as its open separately?
# Volume Profile for User Set Time
# Mobius
# Chat Room Discussion 03.26.2018
input pricePerRowHeightMode = {AUTOMATIC, TICKSIZE, default CUSTOM};
input customRowHeight = 1.0;
input onExpansion = no;
input profiles = 5; #Hint profiles: for just RTH 1 for GlobeX and RTH 2
input showPointOfControl = yes;
input showValueArea = yes;
input valueAreaPercent = 68;
input opacity = 5;
input Begin = 0930;
def TS = TickSize();
def Active = SecondsTillTime(Begin) == 0;
def cond = Active;
def height;
switch (pricePerRowHeightMode) {
case AUTOMATIC:
height = PricePerRow.AUTOMATIC;
case TICKSIZE:
height = PricePerRow.TICKSIZE;
case CUSTOM:
height = customRowHeight;
}
profile vol = VolumeProfile("startNewProfile" = cond, "onExpansion" = onExpansion, "numberOfProfiles" = profiles, "pricePerRow" = height, "value area percent" = valueAreaPercent);
def con = CompoundValue(1, onExpansion, no);
def pc = if IsNaN(vol.GetPointOfControl()) and con
then pc[1]
else vol.GetPointOfControl();
def hVA = if IsNaN(vol.GetHighestValueArea()) and con
then hVA[1]
else Round(vol.GetHighestValueArea(), 0);
def lVA = if IsNaN(vol.GetLowestValueArea()) and con
then lVA[1]
else vol.GetLowestValueArea();
def hProfile = if IsNaN(vol.GetHighest()) and con
then hProfile[1]
else vol.GetHighest();
def lProfile = if IsNaN(vol.GetLowest()) and con
then lProfile[1]
else vol.GetLowest();
def plotsDomain = IsNaN(close) == onExpansion;
plot POC = if plotsDomain
then Round(pc / TS, 0) * TS
else Double.NaN;
plot ProfileHigh = if plotsDomain
then Round(hProfile / TS, 0) * TS
else Double.NaN;
plot ProfileLow = if plotsDomain
then Round(lProfile / TS, 0) * TS
else Double.NaN;
plot VAHigh = if plotsDomain
then Round(hVA / TS, 0) * TS
else Double.NaN;
plot VALow = if plotsDomain
then Round(lVA / TS, 0) * TS
else Double.NaN;
DefineGlobalColor("Profile", GetColor(1));
DefineGlobalColor("Point Of Control", GetColor(5));
DefineGlobalColor("Value Area", GetColor(8));
vol.Show(GlobalColor("Profile"), if showPointOfControl then GlobalColor("Point Of Control") else Color.CURRENT, if showValueArea then GlobalColor("Value Area") else Color.CURRENT, opacity);
POC.SetDefaultColor(GlobalColor("Point Of Control"));
POC.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
VAHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
VAHigh.HideBubble();
VAHigh.HideTitle();
VALow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
VALow.HideBubble();
VALow.HideTitle();
VAHigh.SetDefaultColor(GlobalColor("Value Area"));
VALow.SetDefaultColor(GlobalColor("Value Area"));
ProfileHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
ProfileLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
ProfileHigh.SetDefaultColor(GetColor(3));
ProfileLow.SetDefaultColor(GetColor(3));
ProfileHigh.Hide();
ProfileLow.Hide();
def bubble = isNaN(close[2]) and !isNaN(close[3]);
Hello everyone, most of us are using VAH and VAL at 68% or 1 STD Dev. How about constructing a Volume Profile where you can do multiple areas...Example: 17%; 34%; 68%; 95%. This is a phenomenal strategy when you place the Volume Profile and select Chart. You will see how price gravites back and forth between these boundaries as you day trade. Anyone up to challenge? I am sure we can construct said volume profile. Looking forward to hear from the entire Community!
Code:# # Charles Schwab & Co. (c) 2010-2024 # input pricePerRowHeightMode = {default AUTOMATIC, TICKSIZE, CUSTOM}; input customRowHeight = 1.0; input timePerProfile = {default CHART, MINUTE, HOUR, DAY, WEEK, MONTH, "OPT EXP", BAR}; input multiplier = 1; input onExpansion = yes; input profiles = 1000; input showPointOfControl = yes; input showValueArea = yes; input valueAreaPercent = 68; input valueAreaPercent1 = 17; input valueAreaPercent2 = 34; input valueAreaPercent3 = 95; input opacity = 50; def period; def yyyymmdd = GetYYYYMMDD(); def seconds = SecondsFromTime(0); def month = GetYear() * 12 + GetMonth(); def day_number = DaysFromDate(First(yyyymmdd)) + GetDayOfWeek(First(yyyymmdd)); def dom = GetDayOfMonth(yyyymmdd); def dow = GetDayOfWeek(yyyymmdd - dom + 1); def expthismonth = (if dow > 5 then 27 else 20) - dow; def exp_opt = month + (dom > expthismonth); switch (timePerProfile) { case CHART: period = 0; case MINUTE: period = Floor(seconds / 60 + day_number * 24 * 60); case HOUR: period = Floor(seconds / 3600 + day_number * 24); case DAY: period = CountTradingDays(Min(First(yyyymmdd), yyyymmdd), yyyymmdd) - 1; case WEEK: period = Floor(day_number / 7); case MONTH: period = Floor(month - First(month)); case "OPT EXP": period = exp_opt - First(exp_opt); case BAR: period = BarNumber() - 1; } def count = CompoundValue(1, if period != period[1] then (count[1] + period - period[1]) % multiplier else count[1], 0); def cond = count < count[1] + period - period[1]; def height; switch (pricePerRowHeightMode) { case AUTOMATIC: height = PricePerRow.AUTOMATIC; case TICKSIZE: height = PricePerRow.TICKSIZE; case CUSTOM: height = customRowHeight; } profile vol = VolumeProfile("startNewProfile" = cond, "onExpansion" = onExpansion, "numberOfProfiles" = profiles, "pricePerRow" = height, "value area percent" = valueAreaPercent); def con = CompoundValue(1, onExpansion, no); def pc = if IsNaN(vol.GetPointOfControl()) and con then pc[1] else vol.GetPointOfControl(); def hVA = if IsNaN(vol.GetHighestValueArea()) and con then hVA[1] else vol.GetHighestValueArea(); def lVA = if IsNaN(vol.GetLowestValueArea()) and con then lVA[1] else vol.GetLowestValueArea(); def hProfile = if IsNaN(vol.GetHighest()) and con then hProfile[1] else vol.GetHighest(); def lProfile = if IsNaN(vol.GetLowest()) and con then lProfile[1] else vol.GetLowest(); def plotsDomain = IsNaN(close) == onExpansion; plot POC = if plotsDomain then pc else Double.NaN; plot ProfileHigh = if plotsDomain then hProfile else Double.NaN; plot ProfileLow = if plotsDomain then lProfile else Double.NaN; plot VAHigh = if plotsDomain then hVA else Double.NaN; plot VALow = if plotsDomain then lVA else Double.NaN; DefineGlobalColor("Profile", GetColor(1)); DefineGlobalColor("Point Of Control", GetColor(5)); DefineGlobalColor("Value Area", GetColor(8)); vol.Show(GlobalColor("Profile"), if showPointOfControl then GlobalColor("Point Of Control") else Color.CURRENT, if showValueArea then GlobalColor("Value Area") else Color.CURRENT, opacity); POC.SetDefaultColor(GlobalColor("Point Of Control")); POC.SetPaintingStrategy(PaintingStrategy.HORIZONTAL); VAHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL); VALow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL); VAHigh.SetDefaultColor(GlobalColor("Value Area")); VALow.SetDefaultColor(GlobalColor("Value Area")); ProfileHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL); ProfileLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL); ProfileHigh.SetDefaultColor(GetColor(3)); ProfileLow.SetDefaultColor(GetColor(3)); ProfileHigh.Hide(); ProfileLow.Hide(); #Value Area 1 DefineGlobalColor("VA1", Color.WHITE); profile vol1 = VolumeProfile("startNewProfile" = cond, "onExpansion" = onExpansion, "numberOfProfiles" = profiles, "pricePerRow" = height, "value area percent" = valueAreaPercent1); def hVA1 = if IsNaN(vol.GetHighestValueArea()) and con then hVA1[1] else vol1.GetHighestValueArea(); def lVA1 = if IsNaN(vol.GetLowestValueArea()) and con then lVA1[1] else vol1.GetLowestValueArea(); plot VAHigh1 = if plotsDomain then hVA1 else Double.NaN; plot VALow1 = if plotsDomain then lVA1 else Double.NaN; VAHigh1.SetDefaultColor(GlobalColor("VA1")); VALow1.SetDefaultColor(GlobalColor("VA1")); #Value Area 2 DefineGlobalColor("VA2", Color.WHITE); profile vol2 = VolumeProfile("startNewProfile" = cond, "onExpansion" = onExpansion, "numberOfProfiles" = profiles, "pricePerRow" = height, "value area percent" = valueAreaPercent2); def hVA2 = if IsNaN(vol2.GetHighestValueArea()) and con then hVA2[1] else vol2.GetHighestValueArea(); def lVA2 = if IsNaN(vol2.GetLowestValueArea()) and con then lVA2[1] else vol2.GetLowestValueArea(); plot VAHigh2 = if plotsDomain then hVA2 else Double.NaN; plot VALow2 = if plotsDomain then lVA2 else Double.NaN; VAHigh2.SetDefaultColor(GlobalColor("VA2")); VALow2.SetDefaultColor(GlobalColor("VA2")); #Value Area 3 DefineGlobalColor("VA3", Color.WHITE); profile vol3 = VolumeProfile("startNewProfile" = cond, "onExpansion" = onExpansion, "numberOfProfiles" = profiles, "pricePerRow" = height, "value area percent" = valueAreaPercent3); def hVA3 = if IsNaN(vol3.GetHighestValueArea()) and con then hVA3[1] else vol3.GetHighestValueArea(); def lVA3 = if IsNaN(vol3.GetLowestValueArea()) and con then lVA3[1] else vol3.GetLowestValueArea(); plot VAHigh3 = if plotsDomain then hVA3 else Double.NaN; plot VALow3 = if plotsDomain then lVA3 else Double.NaN; VAHigh3.SetDefaultColor(GlobalColor("VA3")); VALow3.SetDefaultColor(GlobalColor("VA3")); #Value Area Bubbles input showBubbles = yes; input bubblemover = 4; def mover = showBubbles and IsNaN(close[bubblemover]) and !IsNaN(close[bubblemover + 1]); AddChartBubble(mover, VAHigh[bubblemover + 1], "VH " + valueAreaPercent, VAHigh.TakeValueColor()); AddChartBubble(mover, VAHigh1[bubblemover + 1], "VH " + valueAreaPercent1, VAHigh1.TakeValueColor()); AddChartBubble(mover, VAHigh2[bubblemover + 1], "VH " + valueAreaPercent2, VAHigh2.TakeValueColor()); AddChartBubble(mover, VAHigh3[bubblemover + 1], "VH " + valueAreaPercent3, VAHigh3.TakeValueColor()); AddChartBubble(mover, VALow[bubblemover + 1], "VL " + valueAreaPercent, VALow.TakeValueColor(), no); AddChartBubble(mover, VALow1[bubblemover + 1], "VL " + valueAreaPercent1, VALow1.TakeValueColor(), no); AddChartBubble(mover, VALow2[bubblemover + 1], "VL " + valueAreaPercent2, VALow2.TakeValueColor(), no); AddChartBubble(mover, VALow3[bubblemover + 1], "VL " + valueAreaPercent3, VALow3.TakeValueColor(), no); #
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
D | Volume Profile Custom Value Area | Questions | 1 | |
![]() |
Bubbles not posting on Volume Profile? | Questions | 2 | |
R | Daily Volume Profile | Questions | 1 | |
R | Volume Profile Scan | Questions | 1 | |
![]() |
Volume Profile for 1st hour only | Questions | 5 |
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.