High Low Lookback for ThinkorSwim

Hi @Rome,

What particular bar? I use a couple indicators to show high low of the 'x' days with highest volume... Very useful. Or high / low of yesterdays high and low is useful too as it sometimes works as support / resistance.

Thanks,

Chad
nashtech.xyz
 
Here is an example charting the bar with highest volume within 'x' bars.

Code:
# Plots High/Low Price at Highest Volume

input barsago =60;

def Volbar = BarNumber();
def HighVolBar = if ((volume - Lowest(volume, barsago)) /
                     (Highest(volume, barsago) - Lowest(volume, barsago))) >= 1
                 then Volbar
                 else Double.NaN;
def VolHighLevel = if !IsNaN(HighVolBar) then high else VolHighLevel[1];
def VolLowLevel = if !IsNaN(HighVolBar) then low else VolLowLevel[1];

plot HighLine = if Volbar >= HighestAll(HighVolBar) then VolHighLevel else Double.NaN;
plot LowLine = if Volbar >= HighestAll(HighVolBar) then VolLowLevel else Double.NaN;

HighLine.SetDefaultColor(Color.CYAN);
HighLine.SetLineWeight(2);
LowLine.SetDefaultColor(Color.Red);
LowLine.SetLineWeight(2);
# End Plots High/Low Price at Highest Volume

Thanks,

Chad
nashtech.xyz
 
Hi @Rome,

What particular bar? I use a couple indicators to show high low of the 'x' days with highest volume... Very useful. Or high / low of yesterdays high and low is useful too as it sometimes works as support / resistance.

Thanks,

Chad
nashtech.xyz
Hi Chad


First of all, thank you for replying to my request. I should have been more specific. I'm not looking for Hi-Lo off yesterday or today or whatever time frame is on the chart, I want to know what is the low or the high for one bar, any bar. For example, if I pick one bar I want to add to that bar either the high or the low for that bar….. When you right-click on the bar you can see the high the low etcetera but you can't see them on the chart, you have to right click on the Bar and then something pops up and than ,you can see the high-low etcetera for that Bar. Do you think you write an indicator like that?I'll pay you
 
If there are multiple stocks in your Watchlist how would you know if a stock high a low or high price? Alerts can be preset/hardcoded for any time duration. example: 3D 15m
 
Hi All ,

I need a script to display the current candle high and low on a 1 minute timeframe , i know TOS will display that in the top of the screen but having difficulty to read that . It would helpful if i can get the previous candle High and Low . Thanks for the help guys !!
 
Please help me to make an indicator for high/low of a certain date. For example, I need the high level on January 4, 2021 on all charts.In order not to put it manually on each chart. Please help me!!
 
@Armageddon Welcome to the usethinkscript forums... How far have you gotten in your attempt...??? We're willing to help you learn if you're willing to invest some effort... We shouldn't be expected to simply write code to suit your needs without you attempting to learn the Thinkscript that you expect to help you make money... Our purpose here isn't to simply make your visions become reality... Post what you've come up with to date and we'll go from there... If you haven't started, do research here in the forums to locate code that can be modified to your needs, unless you find something that works as-is...

I understand that you are a new member but you might as well get started out on the right foot...
 
@Armageddon Welcome to the usethinkscript forums... How far have you gotten in your attempt...??? We're willing to help you learn if you're willing to invest some effort... We shouldn't be expected to simply write code to suit your needs without you attempting to learn the Thinkscript that you expect to help you make money... Our purpose here isn't to simply make your visions become reality... Post what you've come up with to date and we'll go from there... If you haven't started, do research here in the forums to locate code that can be modified to your needs, unless you find something that works as-is...

I understand that you are a new member but you might as well get started out on the right foot...
I need the formula I described earlier. I'm not a programmer and I don't understand how to write the date in it. If this is some super difficult task, I am ready to pay for the services within reasonable limits!
 
[USER = 10270] @Armageddon [/ USER] Используйте ввод и GetYYYYMMDD (), и вы сможете добиться того, чего хотите. Посмотрите на пример по ссылке. Не должно быть больше 5 строк кода. Сообщите мне, если вам понадобится помощь.
https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Date---Time/GetYYYYMMDD

Thank you for your feedback! There's a little bit wrong here or I'm doing something wrong! Example: There is a certain candle (relatively speaking, January 4, 2021) and I need the low level of this candle, on each chart. So that you don't have to manually set the levels on each chart, but rather set the indicator yourself.
 
@Armageddon Below is my code you can compare it with what you have.
Code:
input endDate = 20210104;
def cond = if GetYYYYMMDD() == endDate then low else cond[1];
plot Price = cond;

Price.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
 
@Armageddon Below is my code you can compare it with what you have.
Code:
input endDate = 20210104;
def cond = if GetYYYYMMDD() == endDate then low else cond[1];
plot Price = cond;

Price.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
The truth does not work on small timeframes. But thanks anyway! If there is an opportunity to correct it, it will be super!!!
 
@Armageddon @generic has been more than generous but your reply of not knowing how to program won't hold up forever... None of us knew how to do any programming/coding until we started and we usually had a problem that needed solved in order to motivate us... Now that you've seen how easy it can be, spend some time perusing the Thinkscript Learning Center and play with some simple code... You may be selling yourself short on your ability to learn Thinkscript... I've seen several members with no prior experience actually start contributing code and giving back in the form of support to others here in the forums so it's not beyond the realm of possibility... Good luck... (y)
 
@Armageddon Change low to low(period = aggregationperiod.day).
Everything is red! Something didn't work out for me or I didn't do it right. Can you write the formula completely and so that the level (0) disappears, and then the graph narrows because of it?Let me pay you a little for your work, just tell me where!?!
 
@Armageddon Works for me. I don't see any red. Post a ss if you can.
Code:
input endDate = 20210104;
def cond = if GetYYYYMMDD() == endDate then low(period = aggregationperiod.day) else cond[1];
plot Price = cond;

Price.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
 
@Armageddon Works for me. I don't see any red. Post a ss if you can.
Code:
input endDate = 20210104;
def cond = if GetYYYYMMDD() == endDate then low(period = aggregationperiod.day) else cond[1];
plot Price = cond;

Price.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
On a short timeframe, still no. It shows some level of "0". On the daily chart, the level is drawn very well, the only drawback is that it shows the same level of "0" until a certain date, and because of this, the chart is narrow
 
@generic Your code works great for me as well. @Armageddon Do you have "Fit studies" un-checked in the settings? If you do, what symbol are you trying it on, what aggregation, and do you have extended hours on or off?
 
@generic Your code works great for me as well. @Armageddon Do you have "Fit studies" un-checked in the settings? If you do, what symbol are you trying it on, what aggregation, and do you have extended hours on or off?
I've already ticked all sorts of boxes.all the same, the daily chart narrows due to the fact that the level "0" is visible. And on a short timeframe, it is always " 0"
 

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
214 Online
Create Post

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