• Get $30 off VIP with code SUMMER30. Ends July 27. Happy trading!

Scan for Candle which closes at the top 10% of its range


Active member
2019 Donor
Hello everyone, I am looking for a scanner which can scan out whether the current candle closes top 10% of its range or bottom 10% of its range. Does anyone has the code for it? Thank you


Well-known member
Could something like this fit what you're looking for:
def range = high - low;
def top10 = high - (0.1 * range);
def lowest10 = low + (0.1 * range);

plot top = if close >= top10 then 1 else double.nan;
# plot bottom = if close <= lowest10 then 1 else double.nan;
run on a Day aggregation right now, it finds a LOT of things.


Similar threads