olivernjeru / replicant-trader

0 stars 0 forks source link

Implement the % change for the financial instrument tracker table #14

Closed olivernjeru closed 2 months ago

olivernjeru commented 2 months ago

Precursor, to do this currently with Polygon IO, I need to get Stock Ticker information from two days, 1 day apart from each other and calculate the price difference between the market close price, adjusted, between the two days then gauge, if there is a positive difference, display the change with a '+' appended at the end of it, however, if there is a negative difference, display the change with '-' appended at the end of it. Given this value, I will need to calculate the percentage change such that ((change value * 100) / financial instrument price from the close of the previous day)

olivernjeru commented 2 months ago

RapidAPI offers this change in the API endpoint query result already so no need to calculate this, just show the value as it is and maybe add some CSS styling such that, if the change is positive, display the value in green, if the change is negative, display the value in red.

olivernjeru commented 2 months ago

With PolygonIO, Ping Daily Open/Close and use preMarket - close to get the change which can be used to calculate the percentage change that can be display in the Financial Instrument Tracker Table.

olivernjeru commented 2 months ago

Done in add %change value for each stock ticker and add conditional formatting for the %Change values However, %CHG is not being displayed. I am contemplating switching from using a table to using something else to display the data.