shakib3585
Active member
Hello All,
Borrowing from @FutureTony's
https://usethinkscript.com/threads/naked-poc-finder-for-thinkorswim.8215/
I am trying to work with a label on a 3-minute aggregation period that shows the active closing price of the current day has crossed the Value Area High of the previous day. I have tried to create a label, as attached, but seems not working correctly even though I see the close price has already crossed the previous day Value Area High. Please help.
Thanks
Borrowing from @FutureTony's
https://usethinkscript.com/threads/naked-poc-finder-for-thinkorswim.8215/
I am trying to work with a label on a 3-minute aggregation period that shows the active closing price of the current day has crossed the Value Area High of the previous day. I have tried to create a label, as attached, but seems not working correctly even though I see the close price has already crossed the previous day Value Area High. Please help.
Thanks
Code:
rec count1 = CompoundValue(1, if !(GetDay() != GetDay()[1]) then count1[1] + 1 else 1, 1);
def priorperiod = if IsNaN(count1[1]) then 1 else Max(count1, count1[1]);
profile vol1 = volumeProfile("startNewProfile" = GetDay()!= GetDay()[1], "onExpansion" = no);
def vahprior = vol1.GetHighestValueArea();
def pocprior = vol1.GetPointOfControl();
def valprior = vol1.GetLowestValueArea();
def cl =close(period=aggregationperiod.day);
AddLabel(yes,"PVAH", if cl>vahprior then color.green else color.red);
AddLabel(yes,"PPOC", if cl>pocprior then color.green else color.red);
AddLabel(yes,"PVAL", if cl>valprior then color.green else color.red);
Last edited by a moderator: