Custom High/Low Indicator with Labels


Category:
0
0

I have a really good mental image of what I would like to do, but stuck. Here is what I am looking for, in a nutshell:

  • Inputs for Length and Aggregation Period, so I could select ’10 Days’ or ’30 Minutes’ or whatever
  • Study would then:
    • Calculate the HighestHigh over the above timeframe, using my inputs
    • Look intraday for a new high that is greater than the Highest High
    • If true, paint a bubble at the candle where the new high occurred
  • Create a label to look something like this:
    • { New [Len_Agg] High: $12.34 }
    • If a new high had not been made, label would say ‘New High: No’

I’d then do the exact same thing for ‘Low’, using a second label.

Would also love to be able to then scan that criteria, i.e. – Where ‘New High’ is true or something…? Essentially, tell me the stocks that have made a new high in the last 10 days or a new low in the last 30 weeks or whatever timeframe. But maybe that is separate?

I have been at this for a while and am stuck. PLEASE HELP OH GREAT ONE!

Marked as spam
Posted by (Questions: 4, Answers: 6)
Asked on August 23, 2020 2:25 pm
299 views
0
Private answer

The complexity of this solution is way beyond the scope of what I can provide in the 15 minutes I allow for Q&A forum solutions.

The following free tutorial is the closest offering we have published for what you are requesting:

https://www.hahn-tech.com/thinkorswim-alert-high-low-version-two/

 

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on August 23, 2020 3:39 pm
0
I apologize for not following the rules. I'm just stuck lol
( at August 23, 2020 4:19 pm)
0
You didn't break any rules. Nothing to apologize for. Never hurts to ask.
( at August 23, 2020 4:38 pm)
0
I think if I could just figure out how to find the highest high over the last N periods, I could (maybe) take it the rest of the way. Any chance to see an example of how to code "find the highest high of the last 40 days"?
( at August 23, 2020 4:46 pm)
0
Here is a post that gets the lowest in x bars. https://www.hahn-tech.com/ans/how-to-plot-lowest-low-out-of-the-last-5-candles/ Works very much the same in reverse: https://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Tech-Analysis/Highest
( at August 23, 2020 5:55 pm)
0
OK that is very helpful. I am going to go back into the lab and see what I come up with, and will be sure to share for anyone interested. Thank you!!!
( at August 23, 2020 6:38 pm)