#### Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

# Greater than 1/2 previous day's range

You guys may have already told me how to do this, but I can't remember. I would like to scan for greater than half the previous day's range in one scan and less than half of the previous day's range.

## Comments

• This seems to work but It's also telling me that the time offsets are not correct. [Close > 1 Day ago Low + [0.5*[1 Day ago High -1 Day ago low]]]. I assume that the opposite would also work for a close below half of yesterday's range.
• mod
You get the time message because you are comparing a value from one bar to values from another bar. If you are doing that intentionally, its not a problem. The message is there to point up a common error - including a time modifier (e.g. 1 day ago) for one term but forgetting it for another. You're not doing that, so you can ignore it.

If I could re-state what you want, I think you are looking for today's close above the midpoint of yesterday's range. If that's right, you could also say:

and [close > 1 day ago low + [1 day ago range * .5 ]]

The way you have it seems right - just a little clearer and easier to write this way.
• Thank you, I like your way of writing it
• Would today's close below the midpoint of yesterday's range be .....[close < 1 Day ago high - [1 day ago range *5] or [Close < 1 Day ago high - [0.5*[1 Day ago High -1 Day ago low]]]???
• ✭✭
if

and [close > 1 day ago low + [1 day ago range * .5 ]]

is for a close above the 1 day ago low plus half the range.

changing the > to < would put the close in the lower half of 1 day ago low plus half the range.

Half the range is High-Low / 2. Adding it to the low or subtracting it from the high is the midpoint of the range.

Theoretically you could also use the Middle Price Channel 1 as that doesn't update until end of day.
• Thank you. I am playing with conditions for a lower time frame set up, both long and short, so I am using it intraday.
• It's also hard to check and test this stuff after the close.
• Working this latest idea of mine would have been impossible for me without you two fellas. I am fairly certain that I was able to work out the long and short versions between yesterday's up day in the markets and today's down day. I'm trading SPX only now. Thank you both for your help
• mod
Hope it goes well!
• Thank you. So far, it's pretty good
Sign In or Register to comment.