<aside> 💡 The article describes the functionality of widgets and the mechanism of interaction with them.

</aside>

Why do I need widgets?

SpreadFighter tools, models and solutions are presented in the form of widgets that the user can customize at will, configuring the workspace for a variety of tasks.

Widgets send a trading signal to the user, notify about changes in the metrics of a particular model, rank assets/instruments by various indicators.

In the absolute majority of widgets are unified and have a similar principle, with very few exceptions.

Functionality of widgets

Widget appearance.

Widget appearance.

Let's consider the widget functionality on the example of Top Gainers: Price.

<aside> 💡

Top Gainers: Price ranks instruments/assets by Price Change for a certain period of time (length). The Price Change is calculated by the formula: Price$Price Change = \frac{Price - Price(length)}{ Price[length]} × 100 - 100$ where $Price$ is the price of the asset, $length$ is the time period under consideration. Top Gainers: Price is chosen as an example because it is a rather primitive model.

</aside>

Widgets receive data from the backend side and display them in two variants: a classic table and a visual representation in the form of charts.

<aside> 💡

The working name is SpreadFighter Visual Snap.

</aside>

At the top of each widget there is a header, which contains:

Widget Settings.

Widget Settings.