program for week line high and low below it 's display 5min and up BUT it's not showing (display) in 2 min and 1 min.
please help to adjust it. Thank You!
input ShowPrevweekH = yes;
input ShowPrevWeekL = yes;
input ShowHCRBubble = yes;
input UseWicksForHCR = yes;
input ExtendHCRPlotTo = 2359;
input BlockAllChartBubblesAtOrAbove = AggregationPeriod.DAY;
input BlockAllChartBubblesAtOrAbove2 = AggregationPeriod.WEEK;
def PlotTime = SecondsFromTime(0100) >= 0 and SecondsTillTime(ExtendHCRPlotTo) > 0;
input ShowTodayOnly = {"No", default "Yes"};
def Today = if GetLastDay() == GetDay() then 1 else 0;
input afterbegin = 0000;
input afterend = 2200;
def aftermarket = SecondsFromTime(afterbegin) >= 0 and SecondsTillTime(afterend) >= 0;
def bars = 2000;
def hd = if showtodayonly and today then high(period=aggregationPeriod.DAY)else double.nan;
def ld = if ShowTodayOnly and Today then low(period = AggregationPeriod.DAY) else Double.NaN;
def mp = (hd + ld) / 2;
plot M2 = if ShowTodayOnly and Today then mp else Double.NaN;
M2.SetDefaultColor(Color.YELLOW);
M2.SetStyle(Curve.SHORT_DASH);
def Day = GetDay();
def LDay = GetLastDay();
def CTDay = Day == LDay;
def NewDay = CTDay and !CTDay[1];
def week = GetWeek();
def LWeek = GetLastWeek();
def CTWeek = week == LWeek;
def Newweek = CTWeek and !CTWeek[1];
#def Today = if Getweek() == GetLastweek() then 1 else 0;
#Show Chart Bubbles Code
def BAOA = if GetAggregationPeriod() >= BlockAllChartBubblesAtOrAbove then no else yes;
def BAOA2 = if GetAggregationPeriod() >= BlockAllChartBubblesAtOrAbove2 then no else yes;
#Half Candle Retrace Code
#data.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
def PWH = if !week then Double.NaN else high (period = "week")[1];
def PWL = if !week then Double.NaN else low (period = "week")[1];
plot wh = if ShowPrevweekH and CTWeek and PlotTime then PWH else Double.NaN;
plot wl = if ShowPrevWeekL and CTWeek and PlotTime then PWL else Double.NaN;
wh.SetDefaultColor(Color.GREEN);
wh.SetStyle(Curve.SHORT_DASH);
wl.SetDefaultColor(Color.RED);
wl.SetStyle(Curve.SHORT_DASH);
def ShowHcrB = ShowHCRBubble and BAOA;
def ShowHcrB2 = ShowHCRBubble and BAOA2;
AddChartBubble(ShowHcrB2 and NewDay , Round(wh, 2), "W", Color.GREEN, yes);
AddChartBubble(ShowHcrB2 and NewDay , Round(wl, 2), "W", Color.ORANGE, yes);
AddChartBubble(ShowHcrB2 and Newweek , Round(wh, 2), "W", Color.GREEN, yes);
AddChartBubble(ShowHcrB2 and Newweek , Round(wl, 2), "W", Color.ORANGE, yes);
please help to adjust it. Thank You!
input ShowPrevweekH = yes;
input ShowPrevWeekL = yes;
input ShowHCRBubble = yes;
input UseWicksForHCR = yes;
input ExtendHCRPlotTo = 2359;
input BlockAllChartBubblesAtOrAbove = AggregationPeriod.DAY;
input BlockAllChartBubblesAtOrAbove2 = AggregationPeriod.WEEK;
def PlotTime = SecondsFromTime(0100) >= 0 and SecondsTillTime(ExtendHCRPlotTo) > 0;
input ShowTodayOnly = {"No", default "Yes"};
def Today = if GetLastDay() == GetDay() then 1 else 0;
input afterbegin = 0000;
input afterend = 2200;
def aftermarket = SecondsFromTime(afterbegin) >= 0 and SecondsTillTime(afterend) >= 0;
def bars = 2000;
def hd = if showtodayonly and today then high(period=aggregationPeriod.DAY)else double.nan;
def ld = if ShowTodayOnly and Today then low(period = AggregationPeriod.DAY) else Double.NaN;
def mp = (hd + ld) / 2;
plot M2 = if ShowTodayOnly and Today then mp else Double.NaN;
M2.SetDefaultColor(Color.YELLOW);
M2.SetStyle(Curve.SHORT_DASH);
def Day = GetDay();
def LDay = GetLastDay();
def CTDay = Day == LDay;
def NewDay = CTDay and !CTDay[1];
def week = GetWeek();
def LWeek = GetLastWeek();
def CTWeek = week == LWeek;
def Newweek = CTWeek and !CTWeek[1];
#def Today = if Getweek() == GetLastweek() then 1 else 0;
#Show Chart Bubbles Code
def BAOA = if GetAggregationPeriod() >= BlockAllChartBubblesAtOrAbove then no else yes;
def BAOA2 = if GetAggregationPeriod() >= BlockAllChartBubblesAtOrAbove2 then no else yes;
#Half Candle Retrace Code
#data.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
def PWH = if !week then Double.NaN else high (period = "week")[1];
def PWL = if !week then Double.NaN else low (period = "week")[1];
plot wh = if ShowPrevweekH and CTWeek and PlotTime then PWH else Double.NaN;
plot wl = if ShowPrevWeekL and CTWeek and PlotTime then PWL else Double.NaN;
wh.SetDefaultColor(Color.GREEN);
wh.SetStyle(Curve.SHORT_DASH);
wl.SetDefaultColor(Color.RED);
wl.SetStyle(Curve.SHORT_DASH);
def ShowHcrB = ShowHCRBubble and BAOA;
def ShowHcrB2 = ShowHCRBubble and BAOA2;
AddChartBubble(ShowHcrB2 and NewDay , Round(wh, 2), "W", Color.GREEN, yes);
AddChartBubble(ShowHcrB2 and NewDay , Round(wl, 2), "W", Color.ORANGE, yes);
AddChartBubble(ShowHcrB2 and Newweek , Round(wh, 2), "W", Color.GREEN, yes);
AddChartBubble(ShowHcrB2 and Newweek , Round(wl, 2), "W", Color.ORANGE, yes);