A common feature on financial websites is a small arrow next to stock tickers—green or red—showing a percentage change. This arrow compares today’s price to one from weeks ago, ignoring the full shape of the price movement in between. Source: dev.to.
What Happens When Trends Are Ignored?
The author observed that these arrows often present a verdict without considering the actual path of prices over time. The movement between two points is mathematically excluded from the analysis, and the result is a signal that lacks depth and context.
Instead of relying on such simplistic comparisons, the author developed a new web component. It renders the last three months of daily prices and evaluates the shape of that movement to determine whether a trend is present.
How the Trend Badge Works
The badge uses 63 daily closing prices—approximately three months of data—to assess the trend. It evaluates four key aspects: the steadiness of the move, the straightness of the path, the extent of price fluctuations, and where the latest close lies within its own range.
It then poses a question that any measurement should ask: Is this move larger than the noise it’s embedded in? A move must be both large and steady. If either condition fails, the badge labels the trend as neutral.
Most assets fall into the neutral category. This is not a flaw in the system—it reflects the reality of financial markets. Three months of price action for a typical stock is largely noise. The badge is designed to detect that noise, not to ignore it.
Why This Design Matters
Many financial tools assign a bullish or bearish label simply because today’s price exceeds a price from weeks ago. That comparison does not capture the actual trend—it only reflects a point-to-point difference.
By only issuing a verdict when the data supports it, the badge avoids fabricating trends. For fund managers or those producing monthly client reports, this is particularly valuable. It prevents the need to explain a green arrow on a chart that shows no clear direction.
The badge does not predict future prices. It only describes past price movements. Every card includes a brief line stating this limitation, to prevent misinterpretation when the card is shared out of context.
Technical Design and Limitations
The component requires only one script tag and one HTML tag per asset. It does not depend on external libraries or frameworks. The file size is 42 KB with no dependencies.
It supports full customization through CSS. Users can adjust colors, fonts, corners, and enable features like hover or touch-based price readouts. An optional refresh timer allows the component to re-read price data at regular intervals.
The component is built for static websites with no backend infrastructure. It runs on a simple static host, which is common among small finance sites.

It is not designed for traders who rely on short-term swings. A three-month trend is too long for weekly or daily trading strategies.
It does not include any market data. Instead, users provide prices in JSON, CSV, or JavaScript format. This preserves data ownership and ensures compliance with existing rights and privacy policies.
Who Should Use It?
It is best suited for fund pages, client reports, or monthly financial notes where clarity and honesty are prioritized over flashy signals.
It avoids the trap of presenting false confidence. A neutral label is not a failure—it is a responsible acknowledgment of market behavior.
The badge costs $15.20, once, for unlimited personal and client sites—provided the widget is not resold.
One file, one tag, and no server. This minimal footprint makes it accessible and lightweight. The core principle is simple: a label that knows when to stay silent is more trustworthy than one that speaks constantly.
For those who value transparency over hype, this tool offers a practical way to represent financial data with integrity and honesty.
Learn more about how simple web tools can build trust in financial reporting at Zero-Server Tools That Never Send Your Data.
Explore a similar project on how gesture design shapes user experience at Interaction Library: A Web Experience of Hand Gesture Design.
See how decisions can be made without backend systems at Ask a Friend with No Backend: How Weigh Compares Decisions Using URLs.
The tool is available at https://juniverse8031.gumroad.com/l/trend-badge?utm_source=devto&utm;_medium=article&utm;_campaign=trend-badge-v1.
Sources & further reading
Featured image: original publisher image. Via original publisher. Image source
