Thanks Bob, appreciate it. Hopefully someone will be able to do this for me. I'll make a post soon
#Day Lines##############################
def AP = AggregationPeriod.DAY;
plot D_Open = open(period = AP);
D_Open.SetDefaultColor(color.yellow);
D_Open.SetPaintingStrategy(PaintingStrategy.POINTS);
D_Open.SetLineWeight(2);
D_Open.HideTitle();
plot D_High = high(period = AP);
D_High.SetDefaultColor(color.green)...
Hi. Your indicators are AWESOME. I was wondering if there is an indicator that shows the Daily ATR levels as 2 lines but on all timeframes that adjust as the day goes? I havent been able to find this. But I only want the daily ATR levels. Is this possible?
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
OK...how about this. Shows 3 min chart of NVDA with open, 14 day period of atr above and below open, and vwap. And here is the link to the chart: http://tos.mx/!l0MAhNx0Hi Guys,
What I am really wanting is just the daily ATR to appear on my chart as 2 lines that adjust as day goes based on the Open price not the previous day close. so if the daily ATR for last 14 days is 5.50 id like that to display on any timeframe from opening price and adjust. I see some similar things but not this. Does anyone have a script for this? Thank you!
please elaborate, your request is incomplete.Hi Guys,
What I am really wanting is just the daily ATR to appear on my chart as 2 lines that adjust as day goes based on the Open price not the previous day close. so if the daily ATR for last 14 days is 5.50 id like that to display on any timeframe from opening price and adjust. I see some similar things but not this. Does anyone have a script for this? Thank you!
Hi Guys,
What I am really wanting is just the daily ATR to appear on my chart as 2 lines that adjust as day goes based on the Open price not the previous day close. so if the daily ATR for last 14 days is 5.50 id like that to display on any timeframe from opening price and adjust. I see some similar things but not this. Does anyone have a script for this? Thank you!
based on the Open price not the previous day close
So if the Daily ATR is 5.00 wherever the days price opens is where the 5 dollar spread starts and the lines adjust and maintain a 5.00 spread between until the price actually does get to a 5.00 gap in which case the lines stay there for rest of day because ATR was fulfilled. If price opened at 100.00 the 2 lines would be 102.50 and 97.50. From there the lines based on the high or low swing intraday. Like if it went up to 104 and is now going downtown the max bottom line would be 99.please elaborate, your request is incomplete.
#ATR Lines##############################
def AP = AggregationPeriod.DAY;
plot D_Open = open(period = AP);
D_Open.SetDefaultColor(CreateColor(209, 255, 3));
D_Open.SetPaintingStrategy(PaintingStrategy.POINTS);
D_Open.SetLineWeight(2);
D_Open.HideTitle();
input AtrLngth = 14;
def tr = TrueRange (high(period = ap), close(period = ap), low(period = ap));
def AtrA = Round(ExpAverage(tr, AtrLngth), 2);
def Atr = atra[1];
plot D_atru = open(period = AP)+ atr;
D_atru.SetDefaultColor(CreateColor(209, 255, 3));
D_atru.SetPaintingStrategy(PaintingStrategy.DASHES);
D_atru.SetLineWeight(3);
D_atru.HideTitle();
plot D_atrd = open(period = AP)- atr;
D_atrd.SetDefaultColor(CreateColor(209, 255, 3));
D_atrd.SetPaintingStrategy(PaintingStrategy.DASHES);
D_atrd.SetLineWeight(3);
D_atrd.HideTitle();
Addlabel(yes,"ATR_Length: " + ATRLngth + " ATR: " + atr,color.yellow);
Sounds like you want to simply determine if the atr range has been met during the days action. You could do that simply by modifying the label so you can directly compare at a glance without referring to the chart whether todays range is equal to, less than, or greater and than the atr. Switch the following code for the one in the code above which would give you this visual comparison.It's just whatever the 14 day ATR was before market open added to the low and subtracted from the high
Until the range is met at which point the lines don't adjust anymore
Well actually I like to see how much more room it has in the direction it's going if it were to keep trending intraday that direction. Also of course to see if atr has been hit already too. But off the days opening price not the previous days close. I've found it good to exclude the gap up or down and calculate the potential days range off high and low of day.Sounds like you want to simply determine if the atr range has been met during the days action. You could do that simply by modifying the label so you can directly compare at a glance without referring to the chart whether todays range is equal to, less than, or greater and than the atr. Switch the following code for the one in the code above which would give you this visual comparison.
Addlabel(yes,"ATR_Length: " + ATRLngth + " ATR: " + atr + " TR: " + tr ,color.yellow);
You are asking that the atr keep being added or subtracted from todays High or Low "as it develops". This doesn't make sense, since you are simply extending the atr artificially so that it is no longer representative of the atr. I believe what you mean is that the remainder of the atr as the price action evolves is either added to today's high or subtracted from today's low with the starting point being todays open, where they are both equidistant from the open. If price action continues to move toward the high, the atr line above the high would remain the same as the atr line below the low would move upward. When todays high reaches the atr line above, the calculations stop for both the higher atr line as well as the lower one.Well actually I like to see how much more room it has in the direction it's going if it were to keep trending intraday that direction. Also of course to see if atr has been hit already too. But off the days opening price not the previous days close. I've found it good to exclude the gap up or down and calculate the potential days range off high and low of day.
Hi. Yes! That's exactly what I'm wanting!You are asking that the atr keep being added or subtracted from todays High or Low "as it develops". This doesn't make sense, since you are simply extending the atr artificially so that it is no longer representative of the atr. I believe what you mean is that the remainder of the atr as the price action evolves is either added to today's high or subtracted from today's low with the starting point being todays open, where they are both equidistant from the open. If price action continues to move toward the high, the atr line above the high would remain the same as the atr line below the low would move upward. When todays high reaches the atr line above, the calculations stop for both the higher atr line as well as the lower one.
If price moved upward from the open and never looked back, the lower atr line would actually stop around the open as the above atr line was reached by the high of the day.
I actually did this for the Average Daily Range for my intraday charts and did not find it useful as a trading tool, however that is just me. Some coders more proficient than myself could help code this more easily than I could and I am not oriented toward revisiting this indicator. If my restatement of what you mean coincides with what you want you could use that to seek assistance.
Regards,
Bob
Thanks Bob, appreciate it. Hopefully someone will be able to do this for me. I'll make a post soonOK, good. Send this out as a request. Make sure you indicate the starting point is todays open, and the atr calc starts with the previous days trading range, NOT TODAY'S, plus the number of previous days you want so that the results are not skewed by todays minimal starting range (see my code for todays range).
Good luck
Bob
Thanks Bob, appreciate it. Hopefully someone will be able to do this for me. I'll make a post soon
#Day Lines##############################
def AP = AggregationPeriod.DAY;
plot D_Open = open(period = AP);
D_Open.SetDefaultColor(color.yellow);
D_Open.SetPaintingStrategy(PaintingStrategy.POINTS);
D_Open.SetLineWeight(2);
D_Open.HideTitle();
plot D_High = high(period = AP);
D_High.SetDefaultColor(color.green);
D_High.SetPaintingStrategy(PaintingStrategy.POINTS);
D_High.SetLineWeight(2);
D_High.HideTitle();
plot D_Low = low(period = AP);
D_Low.SetDefaultColor(color.red);
D_Low.SetPaintingStrategy(PaintingStrategy.POINTS);
D_Low.SetLineWeight(2);
D_Low.HideTitle();
input AtrLngth = 14;
def tr = TrueRange (high(period = ap), close(period = ap), low(period = ap));
def AtrA = Round(ExpAverage(tr, AtrLngth), 2);
def Atr = atra[1];
def uatr = high(period = AP)+ (atr-tr);
def datr = low(period = AP)- (atr-tr);
plot atru = (if uatr <= D_open then double.nan else uatr);
atru.SetDefaultColor(color.yellow);
atru.SetPaintingStrategy(PaintingStrategy.DASHES);
atru.SetLineWeight(3);
atru.HideTitle();
plot atrd = (if datr >= D_Open then double.nan else datr);
atrd.SetDefaultColor(color.yellow);
atrd.SetPaintingStrategy(PaintingStrategy.DASHES);
atrd.SetLineWeight(3);
atrd.HideTitle();
Addlabel(yes,"ATR_Length:" + ATRLngth + " ATR: " + atr + " TR: " + tr + " Remainder: " + round((atr-tr),2),color.yellow);
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
T | How to remove predicted levels on the right of indicator | Questions | 1 | |
R | Missing Keltner Levels | Questions | 2 | |
![]() |
Option Price Levels Indicator for TOS | Questions | 1 | |
D | Script for 4 hour candle high/low price levels | Questions | 1 | |
R | Plot Support & Resistance Levels based on inputs | Questions | 4 |
Start a new thread and receive assistance from our community.
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.
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.