Panel Indicator Help!

EventHorizon

New member
Hi all,

I had a panel indicator that has suddenly stopped working in the past two weeks, and I can't figure out why. Prior to this, it displayed without issue and now I cannot get it to show. Please help!

Here is the full code broken down into sections:

Code:
# Daily Range / ATR
input ATRLength = 20;
def averagetype = AverageType.SIMPLE;
def showlabel = yes;

def ATR = MovingAverage (averagetype, TrueRange(high(period = AggregationPeriod.DAY)[1], close(period = AggregationPeriod.DAY)[1], low(period = AggregationPeriod.DAY)[1]), ATRLength);

def Today_High = Highest(high(period = AggregationPeriod.DAY)[0], 1);
def Today_Low = Lowest(low(period =AggregationPeriod.DAY)[0], 1);
def DR = Today_High - Today_Low;
def DTR_Pct = Round((DR / ATR) * 100, 0);

AddLabel (yes, "Daily Range: " + Round (DR, 2) + " vs. ATR: " + round (ATR, 2)+ " (" + round (DTR_Pct, 0) + "%)", (if DTR_Pct <= 70 then Color.GREEN else if DTR_Pct >= 90 then Color.RED else Color.YELLOW));

def n2 = (((ATR * 19) + DR) / 20) * 2;
def Quantity = ((getNetLiq()) / n2) * .01;

AddLabel(yes, "Position Size (Stock): " + Round(Quantity, 0), color.WHITE);

# Price Delta Aggregation
def yearstart = getyear() * 10000 + 101;
def tradedays = countTradingDays(yearstart, GetYYYYMMDD());
def closeEOY = getvalue(close, tradedays, 252);
def YTDnetchange = ((close - closeEOY)/closeEOY) * 100;
def value = round(YTDnetchange, 2);

AddLabel(yes, "YTD: " + value + "%", if value == 0
     then Color.LIGHT_GRAY
     else if value > 0
     then CreateColor(51,204,0)
     else color.RED);

def MonthClose = if GetLastMonth() == GetMonth() then close(period = aggregationPeriod.Month)[1] else Double.NaN;
def MTDnetchange = ((close - MonthClose) / MonthClose) * 100;
def valueMTD = round(MTDnetchange, 2);

AddLabel(yes, "MTD: " + valueMTD + "%", if valueMTD == 0
     then Color.LIGHT_GRAY
     else if valueMTD > 0
     then CreateColor(51,204,0)
     else color.RED);

def WeekClose = if GetLastWeek() == GetWeek() then close(period = aggregationPeriod.Week)[1] else Double.NaN;
def WTDnetchange = ((close - WeekClose) / WeekClose) * 100;
def valueWTD = round(WTDnetchange, 2);

AddLabel(yes, "WTD: " + valueWTD + "%", if valueWTD == 0
     then Color.LIGHT_GRAY
     else if valueWTD > 0
     then CreateColor(51,204,0)
     else color.RED);

# Volatility and Implied Move Approximation Label
def histvol = reference historicalvolatility;

AddLabel(1, "HV = " + AsPercent(histvol) , color.GRAY);

def IV = if IsNaN(Imp_Volatility(period = AggregationPeriod.DAY))
         then IV[1]
         else Imp_Volatility(period = AggregationPeriod.DAY);
def ImpliedMove = (open * IV) / Sqrt(365);

AddLabel(1, "IV = " + AsPercent(IV) + "  Implied Move = " + AsDollars(ImpliedMove), color.GRAY);

# End

AS OF RIGHT NOW, it shows that it is added to my indicators, but it will not show on my charts at all - regardless if trying on volume, upper, or any lower panel.
 
When there is an exclamation mark in the top right-hand corner of the chart that is an indication that the chart contains an error or a conflict.
Clicking on the exclamation mark on my chart containing your indicator gave this explanation:

F5qybuV.png
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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