Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
The code above will plot the Highs and lows of every months.
Or you could use ToS DailyHighLow prebuilt study and change the period from DAY to MONTH in the settings. The prebuilt study has more functioinality.
kele4957
Akron, Ohio
Posts: 2 since Jan 2021
Thanks Given: 0
Thanks Received: 1
Thanks for posting this code for monthly highs and lows. I am looking for a way to plot two horizontal lines for each calendar month's highest open and lowest open. I couldn't figure out how to modify your code for that purpose. Could you show me the code here? It is highly appreciated.
I just guess maybe add the type of data there? Thank you!
# TD Ameritrade IP Company, Inc. (c) 2011-2023
if showOnlyLastPeriod and !IsNaN(close(period = aggPeriod)[-1]) {
mthHi = Double.NaN;
mthLo = Double.NaN;
} else {
mthHi = high(period = aggPeriod)[offset];
mthLo = low(period = aggPeriod)[offset];
}
# TD Ameritrade IP Company, Inc. (c) 2011-2023
Please note that some of this code was created by TD as noted
AheadBank53
Posts: 4 since Jan 2011
Hello kele4957
I apologize for the delayed response. I haven't been on this site for some time.
If you still need the code modifications, I will gladly investigate how to do it. I don't have an answer for you at this time, unfortunately.
AheadBank53
Posts: 4 since Jan 2011
It looks like we're losing access to ThinkOrSwin in Canada starting February 2024, so I will not likely be able to provide any more help with ToS... sorry.