Implemented second-order forecasts for stocks

This commit is contained in:
danielyxie
2019-05-22 17:23:30 -07:00
parent 7035154454
commit 6effda29a9
4 changed files with 85 additions and 16 deletions
@@ -27,6 +27,7 @@ export function StockTickerHeaderText(props: IProps): React.ReactElement {
let plusOrMinus = stock.b; // True for "+", false for "-"
if (stock.otlkMag < 0) { plusOrMinus = !plusOrMinus }
hdrText += (plusOrMinus ? "+" : "-").repeat(Math.floor(Math.abs(stock.otlkMag) / 10) + 1);
hdrText += ` - ${stock.getAbsoluteForecast()} / ${stock.otlkMagForecast}`;
}
let styleMarkup = {