Max since condition
The highest value since a condition last fired, restarted at each firing.
MaxSinceCondition tracks the highest value of its values input (close by default) since the condition input last had a value. On each bar where the condition has a value, the running high restarts at that bar's value. Between those bars the high only rises to new highs and otherwise holds, and it stays empty until the condition first has a value.
How to read it
- The line is drawn on the price scale, over the candles.
- Between condition events it only moves up, tracking new highs, and holds flat while price stays below that high.
- A sudden drop means the condition fired on that bar and restarted the high at the current value.
- Nothing is drawn before the first condition event.
What it outputs
- Max since condition
- Highest value since the condition last had a value. Restarts at each condition bar and stays empty before the first one.
Pitfalls
- Any non-empty condition counts, including 0 and False. A boolean that drops to False instead of going empty restarts the high on every bar, so the line just follows the values.
- A NaN condition counts as a trigger in the Python code but not in the native build, so the two can disagree on missing data.