diff --git a/src/lib/components/DarkPool.svelte b/src/lib/components/DarkPool.svelte new file mode 100644 index 00000000..84bbbfb4 --- /dev/null +++ b/src/lib/components/DarkPool.svelte @@ -0,0 +1,321 @@ + + + + + +
+
+ +
+ + +
+ + {#if data?.user?.tier === 'Pro'} + {#if isLoaded} + + {#if rawData?.length !== 0} + +
+
+ Over the past 12 months, {$displayCompanyName} has experienced an average dark pool trading volume of + {abbreviateNumber(avgVolume)} shares. + Out of this total, an average of {abbreviateNumber(avgShortVolume)} shares, + constituting approximately {((avgShortVolume/avgVolume)*100)?.toFixed(2)}%, were short volume. +
+
+ +
+ + + +
+ +
+
+ +
+ +
+
+ + + + Total Volume + +
+
+ + + + Short Volume + +
+ +
+ + + +

+ Latest Information +

+ + +
+ + + + + + + + + + + + + + + +
+ Date + + {new Date(rawData?.slice(-1)?.at(0)?.date)?.toLocaleString('en-US', { month: 'short', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })} +
+ Total Volume + + {abbreviateNumber(rawData?.slice(-1)?.at(0)?.totalVolume)} +
+ Short % of Volume + + {rawData?.slice(-1)?.at(0)?.shortPercent}% +
+
+ + {/if} + + {:else} +
+
+ +
+
+ {/if} + + {:else} +
+ + Unlock content with Pro Subscription +
+ {/if} + +
+
+ + + + + \ No newline at end of file diff --git a/src/lib/components/RetailVolume.svelte b/src/lib/components/RetailVolume.svelte index 4ef4d4d9..82e21c30 100644 --- a/src/lib/components/RetailVolume.svelte +++ b/src/lib/components/RetailVolume.svelte @@ -72,9 +72,9 @@ function getPlotOptions() { silent: true, animation: $screenWidth < 640 ? false: true, grid: { - left: $screenWidth < 640 ? '0%' : '2%', - right: $screenWidth < 640 ? '0%' : '2%', - bottom: $screenWidth < 640 ? '0%' : '2%', + left: '2%', + right: '2%', + bottom: '0%', containLabel: true }, xAxis: { @@ -255,7 +255,7 @@ $: { -
+
@@ -339,7 +339,7 @@ $: { @media (max-width: 640px) { .app { - height: 230px; + height: 210px; } } diff --git a/src/lib/store.ts b/src/lib/store.ts index b1d7cfc7..125b1970 100644 --- a/src/lib/store.ts +++ b/src/lib/store.ts @@ -64,6 +64,7 @@ export const revenueSegmentationComponent = writable((false)); export const trendAnalysisComponent = writable((false)); export const shareholderComponent = writable((false)); export const retailVolumeComponent = writable((false)); +export const darkPoolComponent = writable((false)); export const strategyId = writable( ("")); diff --git a/src/routes/stocks/[tickerID]/+page.svelte b/src/routes/stocks/[tickerID]/+page.svelte index e68a6251..109f0351 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, retailVolumeComponent, 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, darkPoolComponent, retailVolumeComponent, shareholderComponent, trendAnalysisComponent, revenueSegmentationComponent, priceAnalysisComponent, fundamentalAnalysisComponent, userRegion, isCrosshairMoveActive, realtimePrice, priceIncrease, currentPortfolioPrice, currentPrice, 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'; @@ -1338,7 +1338,16 @@ function changeChartType() { - + + +
+ {#await import('$lib/components/DarkPool.svelte') then {default: Comp}} + + {/await} +
+
+ +
{#await import('$lib/components/RetailVolume.svelte') then {default: Comp}}