mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-06-22 04:18:50 -07:00
parser: add min date and height for percentile datasets
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
export function Title({ presets }: { presets: Presets }) {
|
||||
return (
|
||||
<div class="flex flex-1 items-center overflow-y-auto p-1.5">
|
||||
<div
|
||||
class="flex flex-1 items-center overflow-y-auto p-1.5"
|
||||
style={{
|
||||
"scrollbar-width": "thin",
|
||||
}}
|
||||
>
|
||||
<div class="flex-1 -space-y-1 whitespace-nowrap px-1 md:mt-0.5 md:-space-y-1.5">
|
||||
<h3 class="text-xs opacity-50">{`/ ${[...presets.selected().path.map(({ name }) => name), presets.selected().name].join(" / ")}`}</h3>
|
||||
<h1 class="text-lg font-bold md:text-xl">{presets.selected().title}</h1>
|
||||
|
||||
@@ -294,7 +294,7 @@ export function applySeriesList({
|
||||
});
|
||||
}
|
||||
|
||||
seriesConfigList.reverse().forEach((seriesConfig, index) => {
|
||||
[...seriesConfigList].reverse().forEach((seriesConfig, index) => {
|
||||
const dataset = datasets.getOrImport(scale, seriesConfig.datasetPath);
|
||||
|
||||
activeDatasets.push(dataset);
|
||||
|
||||
@@ -16,7 +16,7 @@ export function createPresets(scale: ResourceScale): PartialPresetFolder {
|
||||
top: averages.map((average) => ({
|
||||
title: average.key.toUpperCase(),
|
||||
color: colors[`_${average.key}`],
|
||||
datasetPath: `/date-to-price-${average.key}-sma`,
|
||||
datasetPath: `/${scale}-to-price-${average.key}-sma`,
|
||||
})),
|
||||
},
|
||||
...averages.map(({ name, key }) =>
|
||||
@@ -111,17 +111,17 @@ function createPresetFolder({
|
||||
bottom: [
|
||||
{
|
||||
title: `1Y`,
|
||||
color: colors.red,
|
||||
color: colors._1y,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1y-sma`,
|
||||
},
|
||||
{
|
||||
title: `1M`,
|
||||
color: colors.orange,
|
||||
color: colors._1m,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1m-sma`,
|
||||
},
|
||||
{
|
||||
title: `1W`,
|
||||
color: colors.yellow,
|
||||
color: colors._1w,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1w-sma`,
|
||||
},
|
||||
{
|
||||
@@ -143,6 +143,108 @@ function createPresetFolder({
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
scale,
|
||||
name: "Momentum Oscillator",
|
||||
description: "",
|
||||
icon: IconTablerWaveSine,
|
||||
title: `Market Price To ${name} Moving Average Ratio 1Y SMA Momentum Oscillator`,
|
||||
top: [
|
||||
{
|
||||
title: `SMA`,
|
||||
color,
|
||||
datasetPath: `/${scale}-to-price-${key}-sma`,
|
||||
},
|
||||
],
|
||||
bottom: [
|
||||
{
|
||||
title: `Momentum`,
|
||||
seriesType: SeriesType.Based,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1y-sma-momentum-oscillator`,
|
||||
},
|
||||
// {
|
||||
// title: `Raw`,
|
||||
// color: colors.white,
|
||||
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio`,
|
||||
// options: {
|
||||
// base: 1,
|
||||
// },
|
||||
// },
|
||||
{
|
||||
title: `Base`,
|
||||
color: colors.white,
|
||||
datasetPath: `/${scale}-to-0`,
|
||||
options: {
|
||||
lineStyle: 3,
|
||||
lastValueVisible: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
scale,
|
||||
name: "Percentiles",
|
||||
description: "",
|
||||
icon: IconTablerPercentage,
|
||||
title: `Market Price To ${name} Moving Average Ratio Percentiles`,
|
||||
top: [
|
||||
{
|
||||
title: `SMA`,
|
||||
color,
|
||||
datasetPath: `/${scale}-to-price-${key}-sma`,
|
||||
},
|
||||
],
|
||||
bottom: [
|
||||
{
|
||||
title: `99.9%`,
|
||||
color: colors.extremeMax,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-99-9p`,
|
||||
},
|
||||
{
|
||||
title: `99.5%`,
|
||||
color: colors.extremeMiddle,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-99-5p`,
|
||||
},
|
||||
{
|
||||
title: `99%`,
|
||||
color: colors.extremeMin,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-99p`,
|
||||
},
|
||||
{
|
||||
title: `1%`,
|
||||
color: colors.extremeMin,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1p`,
|
||||
},
|
||||
|
||||
{
|
||||
title: `0.5%`,
|
||||
color: colors.extremeMiddle,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-0-5p`,
|
||||
},
|
||||
{
|
||||
title: `0.1%`,
|
||||
color: colors.extremeMax,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-0-1p`,
|
||||
},
|
||||
{
|
||||
title: `Raw`,
|
||||
color: colors.white,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio`,
|
||||
options: {
|
||||
base: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: `Even`,
|
||||
color: colors.gray,
|
||||
datasetPath: `/${scale}-to-1`,
|
||||
options: {
|
||||
lineStyle: 3,
|
||||
lastValueVisible: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Vendored
+1
@@ -238,6 +238,7 @@ declare global {
|
||||
const IconTablerVolume2: typeof import('~icons/tabler/volume2.jsx')['default']
|
||||
const IconTablerWall: typeof import('~icons/tabler/wall.jsx')['default']
|
||||
const IconTablerWallet: typeof import('~icons/tabler/wallet.jsx')['default']
|
||||
const IconTablerWaveSine: typeof import('~icons/tabler/wave-sine.jsx')['default']
|
||||
const IconTablerWeight: typeof import('~icons/tabler/weight.jsx')['default']
|
||||
const IconTablerWind: typeof import('~icons/tabler/wind.jsx')['default']
|
||||
const IconTablerX: typeof import('~icons/tabler/x.jsx')['default']
|
||||
|
||||
Reference in New Issue
Block a user