My goal is ultimately to plot two levels from yesterday and fill them with a cloud color.

I can get the previous day's highest high like this:

 high(period = "day" )[1]; 

That will be the top level. For the bottom level, I want to get the close of the 15min candle that follows it.

My difficulty is that I don't know how to tell ThinkScript how to reference that candle.

The levels I get need to be absolute price levels, so that changing the time scope of the chart doesn't change the plotted levels. (For example, I do not want the close of the 1min candle after yesterday's high of day -- only that of the 15min candle.)

If I were writing it in pseudo code it might look something like this:

PriceLevel_1 = Yesterday(highest high during normal trading hours); #I've got this PriceLevel_2 = The close of the 15min candle after PriceLevel_1; 

Does anyone have a code snippet that can do this? I've spent literally days searching online for an answer and trying unsuccessfully to code that second level.

Related questions 1 Open and close of the first 1 min bar

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.