• Get $40 off VIP by signing up for a free account! Sign Up

Volume Profile POC Plotted Forward ThinkOrSwim

germanburrito

Active member
Volume Profile POC Plotted Forward ThinkOrSwim
I like this idea so here is this, I took a code I found in house and I added standard deviations to it, the problem is that is using the deviation from the whole chart not just the previous day, which I think might work better from experience. usually I would look at a weekly chart, for intraday movement, for weekly movement I would look at maybe a 20 day or 30 day that way you have a better idea of how much it has "deviated" thru out the month. let me know if you like this.

Code:
#VolumeProfile_PreviousDay_displayed_NextDay
#20190426 Sleepyz
#20210712 Sleepyz - revised to add option for pricePerRowHeightMode rather than just automatic

input pricePerRowHeightMode = {default AUTOMATIC, TICKSIZE, CUSTOM};
input customRowHeight = 1.0;
def height;
switch (pricePerRowHeightMode) {
case AUTOMATIC:
    height = PricePerRow.AUTOMATIC;
case TICKSIZE:
    height = PricePerRow.TICKSIZE;
case CUSTOM:
    height = customRowHeight;
}
input timePerProfile = {CHART, MINUTE, HOUR, default DAY, WEEK, MONTH, "OPT EXP", BAR};
input multiplier = 1;
input profiles = 1000;
input valueAreaPercent = 70;

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];
profile vol = VolumeProfile("startNewProfile" = cond, "numberOfProfiles" = profiles, "pricePerRow" = height, "value area percent" = valueAreaPercent, onExpansion = no);

#Prior Day High/Low ValueAreas
def HVA = if IsNaN(vol.GetHighestValueArea()) then HVA[1] else vol.GetHighestValueArea();
def pHVA = CompoundValue(1, if cond then HVA[1] else pHVA[1], Double.NaN);
def LVA = if IsNaN(vol.GetLowestValueArea()) then LVA[1] else vol.GetLowestValueArea();
def pLVA = CompoundValue(1, if cond then LVA[1] else pLVA[1], Double.NaN);

plot PrevHVA = pHVA;
plot PrevLVA = pLVA;
PrevHVA.SetDefaultColor(Color.YELLOW);
PrevLVA.SetDefaultColor(Color.YELLOW);
PrevHVA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PrevLVA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

#Prior Day POC Calculated
def POC = if IsNaN(vol.GetPointOfControl()) and cond then POC[1] else vol.GetPointOfControl();
def pPOC = CompoundValue (1, if cond then POC[1] else pPOC[1], Double.NaN);

plot PrevPOC = pPOC;
PrevPOC.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PrevPOC.SetDefaultColor(Color.MAGENTA);

def dev = StDevall(close);
plot dev1 =  pPOC + dev * 1;
plot dev2 = pPOC - (dev * 1);
plot dev3 = pPOC + (dev * 2);
plot devN1 =  pPOC - dev * 2;
plot devN2 = pPOC + (dev * 3);
plot devN3 = pPOC - (dev * 3);


dev1.SetDefaultColor(Color.WHITE);
dev2.SetDefaultColor(Color.WHITE);
dev3.SetDefaultColor(Color.WHITE);
devN1.SetDefaultColor(Color.WHITE);
devN2.SetDefaultColor(Color.WHITE);
devN3.SetDefaultColor(Color.WHITE);

addcloud(PrevHVA , PrevlVA , color.LIGHT_GRAY);
VcAmbkt.png
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

This is really nice. Thanks. I was a programmer a lont time ago, but I can't seem to follow thinkscripts logic, some things are invisible to me.

I've been tryin to get a volume profile to work this way;
Set up a normal volume profile with the following;
Chart is set up with aggregation period of 30 minutes with a 10 day time interval
'time per profile' = Day
'onexpansion' = no
multiplier = 1

This gives me 'almost' what I want. It draws a proflie with POC an value areas every day.
What I want however is that the drawn profile, VAs and POC are calculated for the previous 10 DAYS!
If I put 10 in the multiplier it gives me a profile, VAs and POC every ten days.
I'd just like to intercept that calculation and have it calculate for a time interval of 10 days, but plot every day.

The reason I'd like to do this is I'd like to backtest a strategy based on where the price was compared to the VAs historically, I'm not so much interested in the profile plot as I am the VAs and POC plots.

Could you point me in the right direction, if you could. I'd appreciate it!

Regards,

Edgardo Montero
 
This is really nice. Thanks. I was a programmer a lont time ago, but I can't seem to follow thinkscripts logic, some things are invisible to me.

I've been tryin to get a volume profile to work this way;
Set up a normal volume profile with the following;
Chart is set up with aggregation period of 30 minutes with a 10 day time interval
'time per profile' = Day
'onexpansion' = no
multiplier = 1

This gives me 'almost' what I want. It draws a proflie with POC an value areas every day.
What I want however is that the drawn profile, VAs and POC are calculated for the previous 10 DAYS!
If I put 10 in the multiplier it gives me a profile, VAs and POC every ten days.
I'd just like to intercept that calculation and have it calculate for a time interval of 10 days, but plot every day.

The reason I'd like to do this is I'd like to backtest a strategy based on where the price was compared to the VAs historically, I'm not so much interested in the profile plot as I am the VAs and POC plots.

Could you point me in the right direction, if you could. I'd appreciate it!

Regards,

Edgardo Montero
i think i figuere it out, all you had to do is check where it says timeframe week and see how it was calculating it, because a week is 5 trading days so you adjust the math from 7 to 14, anyways blahblahblah, this plots two weeks back which should 10 trading days, you cant choose where it starts itll just do the half of the month forward i believe.


Code:
#VolumeProfile_PreviousDay_displayed_NextDay
#20190426 Sleepyz
#20210712 Sleepyz - revised to add option for pricePerRowHeightMode rather than just automatic

input pricePerRowHeightMode = {default AUTOMATIC, TICKSIZE, CUSTOM};
input customRowHeight = 1.0;
def height;
switch (pricePerRowHeightMode) {
case AUTOMATIC:
    height = PricePerRow.AUTOMATIC;
case TICKSIZE:
    height = PricePerRow.TICKSIZE;
case CUSTOM:
    height = customRowHeight;
}
input timePerProfile = {CHART, MINUTE, HOUR, default DAY, WEEK, MONTH, "OPT EXP", BAR};
input multiplier = 1;
input profiles = 1000;
input valueAreaPercent = 70;

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 / 14);
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];
profile vol = VolumeProfile("startNewProfile" = cond, "numberOfProfiles" = profiles, "pricePerRow" = height, "value area percent" = valueAreaPercent, onExpansion = no);

#Prior Day High/Low ValueAreas
def HVA = if IsNaN(vol.GetHighestValueArea()) then HVA[1] else vol.GetHighestValueArea();
def pHVA = CompoundValue(1, if cond then HVA[1] else pHVA[1], Double.NaN);
def LVA = if IsNaN(vol.GetLowestValueArea()) then LVA[1] else vol.GetLowestValueArea();
def pLVA = CompoundValue(1, if cond then LVA[1] else pLVA[1], Double.NaN);

plot PrevHVA = pHVA;
plot PrevLVA = pLVA;
PrevHVA.SetDefaultColor(Color.YELLOW);
PrevLVA.SetDefaultColor(Color.YELLOW);
PrevHVA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PrevLVA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

#Prior Day POC Calculated
def POC = if IsNaN(vol.GetPointOfControl()) and cond then POC[1] else vol.GetPointOfControl();
def pPOC = CompoundValue (1, if cond then POC[1] else pPOC[1], Double.NaN);

plot PrevPOC = pPOC;
PrevPOC.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PrevPOC.SetDefaultColor(Color.MAGENTA);

def dev = StDevall(close);
plot dev1 =  pPOC + dev * 1;
plot dev2 = pPOC - (dev * 1);
plot dev3 = pPOC + (dev * 2);
plot devN1 =  pPOC - dev * 2;
plot devN2 = pPOC + (dev * 3);
plot devN3 = pPOC - (dev * 3);


dev1.SetDefaultColor(Color.WHITE);
dev2.SetDefaultColor(Color.WHITE);
dev3.SetDefaultColor(Color.WHITE);
devN1.SetDefaultColor(Color.WHITE);
devN2.SetDefaultColor(Color.WHITE);
devN3.SetDefaultColor(Color.WHITE);

addcloud(PrevHVA , PrevlVA , color.LIGHT_GRAY);
 
Is there a way to move forward the actual volume profile (volume profile bars), not only the levels/lines, but have the actually volume from previous day show in todays trading day?
 
Last edited:
Volume Profile POC Plotted Forward ThinkOrSwim
I like this idea so here is this, I took a code I found in house and I added standard deviations to it, the problem is that is using the deviation from the whole chart not just the previous day, which I think might work better from experience. usually I would look at a weekly chart, for intraday movement, for weekly movement I would look at maybe a 20 day or 30 day that way you have a better idea of how much it has "deviated" thru out the month. let me know if you like this.

Code:
#VolumeProfile_PreviousDay_displayed_NextDay
#20190426 Sleepyz
#20210712 Sleepyz - revised to add option for pricePerRowHeightMode rather than just automatic

input pricePerRowHeightMode = {default AUTOMATIC, TICKSIZE, CUSTOM};
input customRowHeight = 1.0;
def height;
switch (pricePerRowHeightMode) {
case AUTOMATIC:
    height = PricePerRow.AUTOMATIC;
case TICKSIZE:
    height = PricePerRow.TICKSIZE;
case CUSTOM:
    height = customRowHeight;
}
input timePerProfile = {CHART, MINUTE, HOUR, default DAY, WEEK, MONTH, "OPT EXP", BAR};
input multiplier = 1;
input profiles = 1000;
input valueAreaPercent = 70;

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];
profile vol = VolumeProfile("startNewProfile" = cond, "numberOfProfiles" = profiles, "pricePerRow" = height, "value area percent" = valueAreaPercent, onExpansion = no);

#Prior Day High/Low ValueAreas
def HVA = if IsNaN(vol.GetHighestValueArea()) then HVA[1] else vol.GetHighestValueArea();
def pHVA = CompoundValue(1, if cond then HVA[1] else pHVA[1], Double.NaN);
def LVA = if IsNaN(vol.GetLowestValueArea()) then LVA[1] else vol.GetLowestValueArea();
def pLVA = CompoundValue(1, if cond then LVA[1] else pLVA[1], Double.NaN);

plot PrevHVA = pHVA;
plot PrevLVA = pLVA;
PrevHVA.SetDefaultColor(Color.YELLOW);
PrevLVA.SetDefaultColor(Color.YELLOW);
PrevHVA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PrevLVA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

#Prior Day POC Calculated
def POC = if IsNaN(vol.GetPointOfControl()) and cond then POC[1] else vol.GetPointOfControl();
def pPOC = CompoundValue (1, if cond then POC[1] else pPOC[1], Double.NaN);

plot PrevPOC = pPOC;
PrevPOC.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PrevPOC.SetDefaultColor(Color.MAGENTA);

def dev = StDevall(close);
plot dev1 =  pPOC + dev * 1;
plot dev2 = pPOC - (dev * 1);
plot dev3 = pPOC + (dev * 2);
plot devN1 =  pPOC - dev * 2;
plot devN2 = pPOC + (dev * 3);
plot devN3 = pPOC - (dev * 3);


dev1.SetDefaultColor(Color.WHITE);
dev2.SetDefaultColor(Color.WHITE);
dev3.SetDefaultColor(Color.WHITE);
devN1.SetDefaultColor(Color.WHITE);
devN2.SetDefaultColor(Color.WHITE);
devN3.SetDefaultColor(Color.WHITE);

addcloud(PrevHVA , PrevlVA , color.LIGHT_GRAY);
View attachment 11998
Yes, what are those 3 white and red lines?
 
Yes, what are those 3 white and red lines?

The magenta line is the previous point of control
The longest row of the Volume Profile defines the price level at which the highest number of real transactions were made during the specified time period; this level is called Point Of Control (POC).
https://tlc.thinkorswim.com/center/reference/Tech-Indicators/studies-library/V-Z/VolumeProfile
The white lines are the standard deviations from POC

The textbook usage: looks for pullbacks to fall below the previous POC before applying your strategy.
 
Last edited:
Thanks to @SleepyZ for writing this script. I use it on daily and weekly time frames and would really appreciate it if he could add a user defined input that I could select to plot only the value area lines for the current period selected in the script (today when daily is selected or this week if weekly is selected) so that my chart can be cleaner.
 
Last edited by a moderator:
I played with @SleepyZ original code and merged it with a similar code that gives Point of Control. I use them both on a 1Hr chart because they display differently. My intent is to merge them so I have the original code set to Week and the similar code set to day and have it send an audible alert when the daily POC moves above or below the weekly Value Pivot of the original code. Unfortunately, I don't know how to differentiate the original code periods in the switch command from the daily periods in the POC switch command below it. This also gives me a related error code in the profile prf = VolumeProfile command. I have highlighted this line with a row of # just above it.


#VolumeProfile_PreviousDay_displayed_NextDay
#20190426 Sleepyz
#20210712 Sleepyz - revised to add option for pricePerRowHeightMode rather than just automatic

input ShowOnlyToday = yes;
input pricePerRowHeightMode = {default AUTOMATIC, TICKSIZE, CUSTOM};
input customRowHeight = 1.0;
def height;
switch (pricePerRowHeightMode) {
case AUTOMATIC:
height = PricePerRow.AUTOMATIC;
case TICKSIZE:
height = PricePerRow.TICKSIZE;
case CUSTOM:
height = customRowHeight;
}
#input TimePerProfile = {CHART, MINUTE, HOUR, default DAY, WEEK, MONTH, "OPT EXP", BAR};
input PivotTimePerProfile = {HOUR, DAY, default WEEK, MONTH};
input multiplier = 1;
input Pivotprofiles = 1000;
input valueAreaPercent = 70;

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 (PivotTimePerProfile) {
#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;
}

# taken from WeeklyMonthlyPivots_TS
def H = high(period = PivotTimePerProfile)[1];
def L = low(period = PivotTimePerProfile)[1];
def C = close(period = PivotTimePerProfile)[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];
profile vol = VolumeProfile("startNewProfile" = cond, "numberOfProfiles" = Pivotprofiles, "pricePerRow" = height, "value area percent" = valueAreaPercent, onExpansion = no);

#Prior Day High/Low ValueAreas
def HVA = if IsNaN(vol.GetHighestValueArea()) then HVA[1] else vol.GetHighestValueArea();
def pHVA = CompoundValue(1, if cond then HVA[1] else pHVA[1], Double.NaN);
def LVA = if IsNaN(vol.GetLowestValueArea()) then LVA[1] else vol.GetLowestValueArea();
def pLVA = CompoundValue(1, if cond then LVA[1] else pLVA[1], Double.NaN);

plot PrevHVA;
plot PrevLVA;

#Prior Day POC Calculated
def Pivot = if IsNaN(vol.GetPointOfControl()) and cond then Pivot[1] else vol.GetPointOfControl();
def pPOC = CompoundValue (1, if cond then Pivot[1] else pPOC[1], Double.NaN);

plot PrevPOC;
plot dev1;
plot dev2;
plot dev3;
#plot devN1;
#plot devN2;
#plot devN3;

def dev = StDevAll(close);

if (ShowOnlyToday and !IsNaN(close(period = PivotTimePerProfile)[-1])) or
(GetAggregationPeriod() > if PivotTimePerProfile == PivotTimePerProfile.HOUR then AggregationPeriod.HOUR else if PivotTimePerProfile == PivotTimePerProfile.DAY then AggregationPeriod.DAY else if PivotTimePerProfile == PivotTimePerProfile.WEEK then AggregationPeriod.WEEK else AggregationPeriod.MONTH)

then {

PrevHVA = Double.NaN;
PrevLVA = Double.NaN;
PrevPOC = Double.NaN;
dev1 = Double.NaN;
dev2 = Double.NaN;
dev3 = Double.NaN;
# devN1 = Double.NaN;
# devN2 = Double.NaN;
# devN3 = Double.NaN;

}
else {

PrevHVA = pHVA;
PrevLVA = pLVA;
PrevPOC = pPOC;
dev1 = pPOC + dev * 1;
dev2 = pPOC + (dev * 1.5);
dev3 = pPOC + (dev * 3);
# devN1 = pPOC - (dev * 1);
# devN2 = pPOC - (dev * 2);
# devN3 = pPOC - (dev * 3);

}

PrevHVA.SetDefaultColor(Color.YELLOW);
PrevLVA.SetDefaultColor(Color.YELLOW);
PrevPOC.SetDefaultColor(Color.DARK_ORANGE);
PrevHVA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PrevHVA.SetLineWeight(2);
PrevLVA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PrevLVA.SetLineWeight(2);
PrevPOC.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PrevPOC.SetLineWeight(4);
dev1.SetDefaultColor(Color.WHITE);
dev2.SetDefaultColor(Color.WHITE);
dev3.SetDefaultColor(Color.WHITE);
# devN1.SetDefaultColor(Color.WHITE);
# devN2.SetDefaultColor(Color.WHITE);
# devN3.SetDefaultColor(Color.WHITE);
dev1.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
dev2.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
dev3.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
# devN1.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
# devN2.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
# devN3.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

AddCloud(PrevPOC , PrevLVA , Color.LIGHT_GRAY);

#### Point of Control with Volume Profile
# TD Ameritrade IP Company, Inc. (c) 2010-2021
#Modified by @rlohmeyer


input POCTimePerProfile = {CHART, MINUTE, HOUR, default DAY, WEEK, MONTH, BAR};
input POCprofiles = 2;
input POCAreaPercent = 70;
input opacity = 50;
def onExpansion = no;
def showPointOfControl = no;



def showValueArea = no;
switch (POCTimePerProfile) {
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 BAR:
period = BarNumber() - 1;
}


def POCheight = .01;
###############################################
profile prf = VolumeProfile("startNewProfile" = cond, "onExpansion" = onExpansion, "numberOfProfiles" = POCprofiles, "pricePerRow" = POCheight, "POC area percent" = POCAreaPercent);


plot POC = prf.GetPointOfControl();
DefineGlobalColor("Profile", CreateColor(32, 51, 250));#Volume Profile in dark blue CreateColor(44, 44, 46));#44, 44, 46 32, 51, 250

prf.Show(GlobalColor("Profile"), if showPointOfControl then Color.CYAN else Color.CURRENT, if showValueArea then Color.CYAN else Color.CURRENT, opacity);
POC.SetDefaultColor(Color.CYAN);
POC.SetPaintingStrategy(PaintingStrategy.SQUARES);
POC.SetLineWeight(2);
POC.HideBubble();
POC.HideTitle();

#end of code
 
Last edited:
The magenta line is the previous point of control

https://tlc.thinkorswim.com/center/reference/Tech-Indicators/studies-library/V-Z/VolumeProfile
The white lines are the standard deviations from POC

The textbook usage: looks for pullbacks to fall below the previous POC before applying your strategy.
Could you please help me differentiate the two switch commands above?

I know what they do, but I don't know how to differentiate them so that I can have both a day and a week selected in one script without error messages.

I went to the latest link you posted but still don't understand.
 
Last edited by a moderator:
Last edited by a moderator:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
374 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

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.

How do I get started?

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.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top