{# Inputs: rows: list[LossCloseRow] window_days: int (default 30) #} {% set window = window_days|default(30) %}

Wash-sale watch

Loss closes in the last {{ window }} days · don't buy back · {{ rows|length }} symbol{% if rows|length != 1 %}s{% endif %}
{% if not rows %}
All clear · no loss closes in the last {{ window }} days.
{% else %}
{% for r in rows %} {% if r.days_to_safe >= 21 %}{% set cd_class = 'text-neg' %} {% elif r.days_to_safe >= 7 %}{% set cd_class = 'text-warn' %} {% else %}{% set cd_class = 'text-pos' %}{% endif %} {% set fill_pct = (r.days_since / window * 100)|round(0, 'common') %}
{{ r.symbol }}
−${{ "%.2f"|format(r.loss_amount|float) }}
closed {{ r.days_since }}d ago
{{ r.days_to_safe }}d to safe
{% endfor %}
{% endif %}