mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-30 01:20:00 -07:00
parser: add min date and height for percentile datasets
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user