Cookbook
Inside bars
Highlight bars within the previous bar's range.
//@zscript 1
indicator("Inside bar", overlay=true)
inside = high <= high[1] and low >= low[1]
barcolor(inside ? color.yellow : na)
How it works
Returning na for a color leaves the candle alone.
Education only. Not financial advice. Examples are teaching samples, not trading results.
