diff --git a/src/lib/components/RetailVolume.svelte b/src/lib/components/RetailVolume.svelte new file mode 100644 index 00000000..45d0460b --- /dev/null +++ b/src/lib/components/RetailVolume.svelte @@ -0,0 +1,315 @@ + + + + + +
+
+ +
+ + +
+ + {#if isLoaded} + + {#if rawData?.length !== 0} +
+ +
+
+ In the past six months, the {$displayCompanyName} had an average retail volume of {abbreviateNumber(avgVolume,true)}, with a prevailing + {#if avgSentiment === 'Bullish' } + + + {avgSentiment} + + + {:else if avgSentiment === 'Bearish' } + + + {avgSentiment} + + {:else} + + + Neutral + + {/if} trend. +
+
+ + + +
+ +
+
+ +
+ + +

+ Latest Information +

+
+ + + + + + + + + + + + + + + +
+ Date + + {new Date(rawData?.slice(-1)?.at(0)?.date)?.toLocaleString('en-US', { month: 'short', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })} +
+ Volume + + {abbreviateNumber(rawData?.slice(-1)?.at(0)?.traded,true)} +
+ Retail Sentiment + + {rawData?.slice(-1)?.at(0)?.sentiment > 0 ? 'Bullish' : 'Bearish'} +
+
+ + {/if} + + {:else} +
+
+ +
+
+ {/if} + +
+
+ + + + + \ No newline at end of file diff --git a/src/lib/store.ts b/src/lib/store.ts index 4e537354..65986cda 100644 --- a/src/lib/store.ts +++ b/src/lib/store.ts @@ -63,6 +63,7 @@ export const priceAnalysisComponent = writable((false)); export const revenueSegmentationComponent = writable((false)); export const trendAnalysisComponent = writable((false)); export const shareholderComponent = writable((false)); +export const retailVolumeComponent = writable((false)); export const strategyId = writable( ("")); diff --git a/src/routes/etf/[tickerID]/+page.svelte b/src/routes/etf/[tickerID]/+page.svelte index 72fbded7..7fc5fe32 100644 --- a/src/routes/etf/[tickerID]/+page.svelte +++ b/src/routes/etf/[tickerID]/+page.svelte @@ -3,7 +3,7 @@ import {AreaSeries, Chart, PriceLine, CandlestickSeries} from 'svelte-lightweight-charts'; import { TrackingModeExitMode } from 'lightweight-charts'; - import {getCache, setCache, trendAnalysisComponent, priceAnalysisComponent, assetType, screenWidth, globalForm, userRegion, numberOfUnreadNotification, displayCompanyName, isCrosshairMoveActive, realtimePrice, priceIncrease, currentPortfolioPrice, currentPrice, clientSideCache, etfTicker, isOpen, isBeforeMarketOpen, isWeekend} from '$lib/store'; + import {getCache, setCache, retailVolumeComponent, trendAnalysisComponent, priceAnalysisComponent, assetType, screenWidth, globalForm, userRegion, numberOfUnreadNotification, displayCompanyName, isCrosshairMoveActive, realtimePrice, priceIncrease, currentPortfolioPrice, currentPrice, clientSideCache, etfTicker, isOpen, isBeforeMarketOpen, isWeekend} from '$lib/store'; import { onDestroy, onMount } from 'svelte'; import ETFKeyInformation from '$lib/components/ETFKeyInformation.svelte'; import Lazy from '$lib/components/Lazy.svelte'; @@ -1333,8 +1333,16 @@ async function initializePrice() { {/if} - - + + +
+ {#await import('$lib/components/RetailVolume.svelte') then {default: Comp}} + + {/await} +
+
+ +
diff --git a/src/routes/stocks/[tickerID]/+page.svelte b/src/routes/stocks/[tickerID]/+page.svelte index f5715770..57562e8e 100644 --- a/src/routes/stocks/[tickerID]/+page.svelte +++ b/src/routes/stocks/[tickerID]/+page.svelte @@ -3,7 +3,7 @@ import {AreaSeries, Chart, PriceLine, CandlestickSeries} from 'svelte-lightweight-charts'; import { TrackingModeExitMode } from 'lightweight-charts'; - import {getCache, setCache, screenWidth, displayCompanyName, numberOfUnreadNotification, globalForm, shareholderComponent, trendAnalysisComponent, revenueSegmentationComponent, priceAnalysisComponent, fundamentalAnalysisComponent, userRegion, isCrosshairMoveActive, realtimePrice, priceIncrease, currentPortfolioPrice, currentPrice, clientSideCache, stockTicker, isOpen, isBeforeMarketOpen, isWeekend} from '$lib/store'; + import {getCache, setCache, screenWidth, displayCompanyName, numberOfUnreadNotification, globalForm, retailVolumeComponent, shareholderComponent, trendAnalysisComponent, revenueSegmentationComponent, priceAnalysisComponent, fundamentalAnalysisComponent, userRegion, isCrosshairMoveActive, realtimePrice, priceIncrease, currentPortfolioPrice, currentPrice, clientSideCache, stockTicker, isOpen, isBeforeMarketOpen, isWeekend} from '$lib/store'; import { onDestroy, onMount } from 'svelte'; import StockKeyInformation from '$lib/components/StockKeyInformation.svelte'; import BullBearSay from '$lib/components/BullBearSay.svelte'; @@ -1339,7 +1339,15 @@ function changeChartType() { - + +
+ {#await import('$lib/components/RetailVolume.svelte') then {default: Comp}} + + {/await} +
+
+ +
{#await import('$lib/components/ShareStatistics.svelte') then {default: Comp}}