Hello thinkscript friends,
I've been working on a new study that plots the previous month/week/daily volume POCs to future sessions. This makes it easier to look for 'naked' points of control that have not been visited since they were 'formed'. The theory is that a POC from the previous week or day that price has not returned to will be revisited sooner or later. NPOCs are tested much like open "Gaps" and are sooner or later filled. NPOCs act very much like magnets drawing price to them. That is why most days the POC of the previous day is visited.
A few important points on this study. It will automatically plot the POC/VAH/VAL for the previous sessions (ie. for monthly, weekly and daily timeframes). If you turn on the 'showAll' options, it will also plot the POC only for previous sessions (again, monthly, weekly, daily). It is important to note that this study will act EXACTLY as if you have the TOS built-in VolumeProfile study on your charts. If you only have 5 days of data on your chart, it CANNOT obtain the previous month POC. Please keep this in mind if you are a shorter-term trader as you will likely want to hide the monthly POCs (or even better, manually draw them from a larger study and hide on this study).
Another thing that I have to note. I've received many questions about strategies and how to use pivots, profiles or other indicators. The indicators I am providing here are intended to help find areas of CONFLUENCE on larger timeframes. Each individual trader will need to determine the appropriate triggers for themselves to enter a trade if price moves a certain way when we approach one of these levels. That can be candlestick reversal patterns, larger structural patterns (eg. head and shoulders OR quasimodo) or some other trigger. These areas are difficult to trade by themselves because their invalidation areas are very far away. But if you can take a 5 minute pattern at a weekly level, your risk to reward will be massively asymmetrical. I hope some of you find this helpful.
I've been working on a new study that plots the previous month/week/daily volume POCs to future sessions. This makes it easier to look for 'naked' points of control that have not been visited since they were 'formed'. The theory is that a POC from the previous week or day that price has not returned to will be revisited sooner or later. NPOCs are tested much like open "Gaps" and are sooner or later filled. NPOCs act very much like magnets drawing price to them. That is why most days the POC of the previous day is visited.
A few important points on this study. It will automatically plot the POC/VAH/VAL for the previous sessions (ie. for monthly, weekly and daily timeframes). If you turn on the 'showAll' options, it will also plot the POC only for previous sessions (again, monthly, weekly, daily). It is important to note that this study will act EXACTLY as if you have the TOS built-in VolumeProfile study on your charts. If you only have 5 days of data on your chart, it CANNOT obtain the previous month POC. Please keep this in mind if you are a shorter-term trader as you will likely want to hide the monthly POCs (or even better, manually draw them from a larger study and hide on this study).
Another thing that I have to note. I've received many questions about strategies and how to use pivots, profiles or other indicators. The indicators I am providing here are intended to help find areas of CONFLUENCE on larger timeframes. Each individual trader will need to determine the appropriate triggers for themselves to enter a trade if price moves a certain way when we approach one of these levels. That can be candlestick reversal patterns, larger structural patterns (eg. head and shoulders OR quasimodo) or some other trigger. These areas are difficult to trade by themselves because their invalidation areas are very far away. But if you can take a 5 minute pattern at a weekly level, your risk to reward will be massively asymmetrical. I hope some of you find this helpful.
Ruby:
# VolumeProfile focused on prior day/week/month levels to help find "naked" POCs
# created by tony_futures
# setup Colors
DefineGlobalColor("lowColor", CreateColor(109, 59, 81));
DefineGlobalColor("highColor", CreateColor(59, 109, 88));
DefineGlobalColor("midColor", CreateColor(94, 110, 59));
def yyyymmdd = GetYYYYMMDD();
def day_number = DaysFromDate(First(yyyymmdd)) + GetDayOfWeek(First(yyyymmdd));
def month = getYear() * 12 + getMonth();
def weekPeriod = Floor(day_number / 7);
def dayPeriod = CountTradingDays(Min(First(yyyymmdd), yyyymmdd), yyyymmdd) - 1;
def monthPeriod = Floor(month - First(month));
#Prior Day Profile
rec ctr1 = CompoundValue(1, if !(dayPeriod != dayPeriod[1]) then ctr1[1] + 1 else 1, 1);
def priorperiod = if IsNaN(ctr1[1]) then 1 else Max(ctr1, ctr1[1]);
profile volprofile1 = VolumeProfile("startNewProfile" = dayPeriod != dayPeriod[1], "onExpansion" = no);
def vahprior = volprofile1.GetHighestValueArea();
def pocprior = volprofile1.GetPointOfControl();
def valprior = volprofile1.GetLowestValueArea();
def Today = GetLastDay() == GetDay();
input showDaily = yes;
input showAllDailies = no;
plot vahprev = if showDaily and Today then GetValue(vahprior, priorperiod) else Double.NaN;
vahprev.SetDefaultColor(GlobalColor("midColor"));
vahprev.SetPaintingStrategy(paintingStrategy = PaintingStrategy.HORIZONTAL);
vahprev.HideBubble();
plot pocprev = if showDaily and (Today or showAllDailies) then GetValue(pocprior, priorperiod) else Double.NaN;
pocprev.SetDefaultColor(GlobalColor("lowColor"));
pocprev.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
pocprev.HideBubble();
plot valprev = if showDaily and Today then GetValue(valprior, priorperiod) else Double.NaN;
valprev.SetDefaultColor(GlobalColor("midColor"));
valprev.SetPaintingStrategy(paintingStrategy = PaintingStrategy.HORIZONTAL);
valprev.HideBubble();
#Prior Week Profile
rec ctr2 = CompoundValue(1, if !(weekPeriod != weekPeriod[1]) then ctr2[1] + 1 else 1, 1);
def priorperiod2 = if IsNaN(ctr2[1]) then 1 else Max(ctr2, ctr2[1]);
profile volprofile2 = VolumeProfile("startNewProfile" = weekPeriod != weekPeriod[1], "onExpansion" = no);
def vahprior2 = volprofile2.GetHighestValueArea();
def pocprior2 = volprofile2.GetPointOfControl();
def valprior2 = volprofile2.GetLowestValueArea();
def ThisWeek = GetLastWeek() == GetWeek();
input showWeekly = yes;
input showAllWeeks = yes;
plot vahprevweek = if showWeekly and ThisWeek then GetValue(vahprior2, priorperiod2) else Double.NaN;
vahprevweek.SetDefaultColor(GlobalColor("highColor"));
vahprevweek.SetPaintingStrategy(paintingStrategy = PaintingStrategy.HORIZONTAL);
vahprevweek.HideBubble();
plot pocprevweek = if showWeekly and (ThisWeek or showAllWeeks) then GetValue(pocprior2, priorperiod2) else Double.NaN;
pocprevweek.SetDefaultColor(GlobalColor("lowColor"));
pocprevweek.SetPaintingStrategy(PaintingStrategy.DASHES);
pocprevweek.HideBubble();
plot valprevweek = if showWeekly and ThisWeek then GetValue(valprior2, priorperiod2) else Double.NaN;
valprevweek.SetDefaultColor(GlobalColor("highColor"));
valprevweek.SetPaintingStrategy(paintingStrategy = PaintingStrategy.HORIZONTAL);
valprevweek.HideBubble();
#Prior Month Profile
rec ctr3 = CompoundValue(1, if !(monthPeriod != monthPeriod[1]) then ctr3[1] + 1 else 1, 1);
def priorperiod3 = if IsNaN(ctr3[1]) then 1 else Max(ctr3, ctr3[1]);
profile volprofile3 = VolumeProfile("startNewProfile" = monthPeriod != monthPeriod[1], "onExpansion" = no);
def vahprior3 = volprofile3.GetHighestValueArea();
def pocprior3 = volprofile3.GetPointOfControl();
def valprior3 = volprofile3.GetLowestValueArea();
def ThisMonth = GetLastMonth() == GetMonth();
input showMonthly = no;
plot vahprevmonth = if showMonthly and ThisMonth then GetValue(vahprior3, priorperiod3) else Double.NaN;
vahprevmonth.SetDefaultColor(GlobalColor("highColor"));
vahprevmonth.SetPaintingStrategy(paintingStrategy = PaintingStrategy.HORIZONTAL);
vahprevmonth.HideBubble();
plot pocprevmonth = if showMonthly and ThisMonth then GetValue(pocprior3, priorperiod3) else Double.NaN;
pocprevmonth.SetDefaultColor(GlobalColor("lowColor"));
pocprevmonth.SetPaintingStrategy(PaintingStrategy.DASHES);
pocprevmonth.HideBubble();
plot valprevmonth = if showMonthly and ThisMonth then GetValue(valprior3, priorperiod3) else Double.NaN;
valprevmonth.SetDefaultColor(GlobalColor("highColor"));
valprevmonth.SetPaintingStrategy(paintingStrategy = PaintingStrategy.HORIZONTAL);
valprevmonth.HideBubble();
def showBubbleNow = !IsNaN(close) and IsNaN(close[-1]);
input showBubbles = yes;
AddChartBubble(showBubbles and showMonthly and showBubbleNow[1], pocprevmonth[1], "Monthly POC", Color.GRAY, yes);
AddChartBubble(showBubbles and showWeekly and !showAllWeeks and showBubbleNow[1], pocprevweek[1], "Weekly POC", Color.GRAY, yes);
AddChartBubble(showBubbles and showDaily and showBubbleNow[1], pocprev[1], "Yday POC", Color.GRAY, no);
AddChartBubble(showBubbles and showWeekly and showAllWeeks and pocprevweek != pocprevweek[1], pocprevweek, "Weekly POC", Color.GRAY, no);