8#include <ftxui/dom/elements.hpp>
23 if (value > 0)
return Color::Green;
24 if (value < 0)
return Color::Red;
30 if (side ==
"BUY" || side ==
"1")
return Color::Red;
31 if (side ==
"SELL" || side ==
"2")
return Color::Green;
36inline Element
styledBorder(Element inner,
const std::string& title) {
37 return window(text(title) | bold, inner);
43 snprintf(buf,
sizeof(buf),
"%.2f", value);
49 snprintf(buf,
sizeof(buf),
"%.2f%%", value * 100);
54 return std::to_string(qty);
Color sideColor(const std::string &side)
Definition styles.hpp:29
std::string formatPercent(double value)
Definition styles.hpp:47
Color colorSuccess()
Definition styles.hpp:16
std::string formatQty(int64_t qty)
Definition styles.hpp:53
Element styledBorder(Element inner, const std::string &title)
Definition styles.hpp:36
Color colorDanger()
Definition styles.hpp:17
Color colorPrimary()
Definition styles.hpp:15
std::string formatMoney(double value)
Definition styles.hpp:41
Color colorMuted()
Definition styles.hpp:19
Color colorWarning()
Definition styles.hpp:18
Color profitColor(double value)
Definition styles.hpp:22