#### 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.

# CANDLESTICKS AND / OR OHLC BARS

How do you scan for stocks that closed in the top 25% of the candle or bar?

I tried every formula I could think of but only got syntex errors.

## Answers

• admin
edited May 2015
The best place to start is by reading all the documentation on scanning under the ChartSchool section. Here's a link to the library of sample scans which should help you write scans, but still read all the other documentation.

http://stockcharts.com/school/doku.php?id=chart_school:scan_library:sample_scans

// Close in upper half of the day's range
[type = stock]
and [close > [[high + low] / 2]]

this could be re-written as
and [close > [[high + low] * 0.50 ]]

the for your upper 25% case
and [close > [[high + low] * 0.75 ]]

edit this should be as pointed out by Markd, (good catch Mark, I shouldn't make these quick posts as I'm heading out the door).
and [close > low + [[high - low] * 0.75]]]
• mod
edited May 2015
The first and second instances work, but the third does not.

[high + low] * 0.75 results in a number outside the range:

[10 + 20] = 30; 30 * 0.75 = 22.5, which is greater than 20

It has to be:

[ low + [[high - low] * 0.75]]]

[10 + [[20 - 10] * 0.75]]]

[10 + [10 * 0.75]]

[10 + 7.5] or 17.5

or you could say it:

[low + [range * 0.75]
• admin
Good catch Mark, I shouldn't make these quick posts as I'm heading out the door, glad you caught it, thanks.
• wow markd; I would have never noticed a problem.
Sign In or Register to comment.