indicator · on price · open source
New High New Low
Running…
Loading chart…
About
New high / new low bar colouring — green when a bar makes a new high over the lookback, red when it makes a new low. Quickly shows which side is in control without cluttering the chart.
- Useful as a momentum proxy: clusters of one colour reveal persistent trend days.
- Combine with volume to spot climactic moves.
Source code
//@version=5
indicator("New High New Low", overlay=true)
len = input.int(20, "Lookback length", minval=2, maxval=200)
nh = high >= ta.highest(high, len)
nl = low <= ta.lowest(low, len)
alertcondition(nh and not nh[1], "New high", "Bar made a new rolling high")
alertcondition(nl and not nl[1], "New low", "Bar made a new rolling low")
No comments yet.
Sign in to comment.