need help to adjust timeframe 2min

shih90

Member
VIP
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);
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
345 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