mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-26 23:59:58 -07:00
global: cointime ratios
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { colors } from "../../utils/colors";
|
||||
import { SeriesType } from "../enums";
|
||||
import { createRatioFolder } from "../templates/ratio";
|
||||
|
||||
export function createPresets(scale: ResourceScale) {
|
||||
return {
|
||||
@@ -59,6 +60,13 @@ export function createPresets(scale: ResourceScale) {
|
||||
},
|
||||
],
|
||||
},
|
||||
createRatioFolder({
|
||||
color: colors.liveliness,
|
||||
ratioDatasetPath: `/${scale}-to-market-price-to-active-price-ratio`,
|
||||
scale,
|
||||
title: "Active Price",
|
||||
valueDatasetPath: `/${scale}-to-active-price`,
|
||||
}),
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -78,6 +86,13 @@ export function createPresets(scale: ResourceScale) {
|
||||
},
|
||||
],
|
||||
},
|
||||
createRatioFolder({
|
||||
color: colors.vaultedness,
|
||||
ratioDatasetPath: `/${scale}-to-market-price-to-vaulted-price-ratio`,
|
||||
scale,
|
||||
title: "Vaulted Price",
|
||||
valueDatasetPath: `/${scale}-to-vaulted-price`,
|
||||
}),
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -97,6 +112,13 @@ export function createPresets(scale: ResourceScale) {
|
||||
},
|
||||
],
|
||||
},
|
||||
createRatioFolder({
|
||||
color: colors.liveliness,
|
||||
ratioDatasetPath: `/${scale}-to-market-price-to-true-market-mean-ratio`,
|
||||
scale,
|
||||
title: "True Market Mean",
|
||||
valueDatasetPath: `/${scale}-to-true-market-mean`,
|
||||
}),
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -116,6 +138,13 @@ export function createPresets(scale: ResourceScale) {
|
||||
},
|
||||
],
|
||||
},
|
||||
createRatioFolder({
|
||||
color: colors.cointimePrice,
|
||||
ratioDatasetPath: `/${scale}-to-market-price-to-cointime-price-ratio`,
|
||||
scale,
|
||||
title: "Cointime",
|
||||
valueDatasetPath: `/${scale}-to-cointime-price`,
|
||||
}),
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
createLiquidityFolder,
|
||||
} from "./addresses";
|
||||
import { createPresets as createBlocksPresets } from "./blocks";
|
||||
import { createPresets as createCoinblocksPresets } from "./coinblocks";
|
||||
import { createPresets as createCoinblocksPresets } from "./cointime";
|
||||
import { createPresets as createHodlersPresets } from "./hodlers";
|
||||
import { createPresets as createMarketPresets } from "./market";
|
||||
import { createPresets as createMinersPresets } from "./miners";
|
||||
|
||||
@@ -2,6 +2,7 @@ import { averages } from "/src/scripts/datasets/date";
|
||||
import { colors } from "/src/scripts/utils/colors";
|
||||
|
||||
import { SeriesType } from "../../enums";
|
||||
import { createRatioFolder } from "../../templates/ratio";
|
||||
|
||||
export function createPresets(scale: ResourceScale): PartialPresetFolder {
|
||||
return {
|
||||
@@ -59,218 +60,256 @@ function createPresetFolder({
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Ratio",
|
||||
tree: [
|
||||
{
|
||||
scale,
|
||||
name: "Basic",
|
||||
description: "",
|
||||
icon: IconTablerMathXDivideY,
|
||||
title: `Market Price To ${name} Moving Average Ratio`,
|
||||
top: [
|
||||
{
|
||||
title: `SMA`,
|
||||
color,
|
||||
datasetPath: `/${scale}-to-price-${key}-sma`,
|
||||
},
|
||||
],
|
||||
bottom: [
|
||||
{
|
||||
title: `Ratio`,
|
||||
seriesType: SeriesType.Based,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio`,
|
||||
options: {
|
||||
base: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: `Even`,
|
||||
color: colors.white,
|
||||
datasetPath: `/${scale}-to-1`,
|
||||
options: {
|
||||
lineStyle: 3,
|
||||
lastValueVisible: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
scale,
|
||||
name: "Averages",
|
||||
description: "",
|
||||
icon: IconTablerMathAvg,
|
||||
title: `Market Price To ${name} Moving Average Ratio Averages`,
|
||||
top: [
|
||||
{
|
||||
title: `SMA`,
|
||||
color,
|
||||
datasetPath: `/${scale}-to-price-${key}-sma`,
|
||||
},
|
||||
],
|
||||
bottom: [
|
||||
{
|
||||
title: `1Y`,
|
||||
color: colors._1y,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1y-sma`,
|
||||
},
|
||||
{
|
||||
title: `1M`,
|
||||
color: colors._1m,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1m-sma`,
|
||||
},
|
||||
{
|
||||
title: `1W`,
|
||||
color: colors._1w,
|
||||
datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1w-sma`,
|
||||
},
|
||||
{
|
||||
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,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
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`,
|
||||
},
|
||||
// {
|
||||
// name: "Ratio",
|
||||
// tree: [
|
||||
// {
|
||||
// scale,
|
||||
// name: "Basic",
|
||||
// description: "",
|
||||
// icon: IconTablerMathXDivideY,
|
||||
// title: `Market Price To ${name} Moving Average Ratio`,
|
||||
// top: [
|
||||
// {
|
||||
// title: `SMA`,
|
||||
// color,
|
||||
// datasetPath: `/${scale}-to-price-${key}-sma`,
|
||||
// },
|
||||
// ],
|
||||
// bottom: [
|
||||
// {
|
||||
// title: `Ratio`,
|
||||
// seriesType: SeriesType.Based,
|
||||
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio`,
|
||||
// options: {
|
||||
// base: 1,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// title: `Even`,
|
||||
// color: colors.white,
|
||||
// datasetPath: `/${scale}-to-1`,
|
||||
// options: {
|
||||
// lineStyle: 3,
|
||||
// lastValueVisible: false,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// scale,
|
||||
// name: "Averages",
|
||||
// description: "",
|
||||
// icon: IconTablerMathAvg,
|
||||
// title: `Market Price To ${name} Moving Average Ratio Averages`,
|
||||
// top: [
|
||||
// {
|
||||
// title: `SMA`,
|
||||
// color,
|
||||
// datasetPath: `/${scale}-to-price-${key}-sma`,
|
||||
// },
|
||||
// ],
|
||||
// bottom: [
|
||||
// {
|
||||
// title: `1Y`,
|
||||
// color: colors._1y,
|
||||
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1y-sma`,
|
||||
// },
|
||||
// {
|
||||
// title: `1M`,
|
||||
// color: colors._1m,
|
||||
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1m-sma`,
|
||||
// },
|
||||
// {
|
||||
// title: `1W`,
|
||||
// color: colors._1w,
|
||||
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio-1w-sma`,
|
||||
// },
|
||||
// {
|
||||
// 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,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// 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: `Base`,
|
||||
// color: colors.white,
|
||||
// datasetPath: `/${scale}-to-0`,
|
||||
// options: {
|
||||
// lineStyle: 3,
|
||||
// lastValueVisible: false,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// scale,
|
||||
// name: "Top Percentiles",
|
||||
// description: "",
|
||||
// icon: IconTablerFlame,
|
||||
// title: `Market Price To ${name} Moving Average Ratio Top 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: `Raw`,
|
||||
// color: colors.white,
|
||||
// datasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio`,
|
||||
// options: {
|
||||
// base: 1,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// scale,
|
||||
// name: "Bottom Percentiles",
|
||||
// description: "",
|
||||
// icon: IconTablerIceCream,
|
||||
// title: `Market Price To ${name} Moving Average Ratio Bottom Percentiles`,
|
||||
// top: [
|
||||
// {
|
||||
// title: `SMA`,
|
||||
// color,
|
||||
// datasetPath: `/${scale}-to-price-${key}-sma`,
|
||||
// },
|
||||
// ],
|
||||
// bottom: [
|
||||
// {
|
||||
// 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,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// scale,
|
||||
// name: "Extreme Tops",
|
||||
// description: "",
|
||||
// icon: IconTablerRocket,
|
||||
// title: `${name} Moving Average Extreme Tops`,
|
||||
// top: [
|
||||
// {
|
||||
// title: `99.9%`,
|
||||
// color: colors.extremeMax,
|
||||
// datasetPath: `/${scale}-to-price-${key}-sma-99-9p`,
|
||||
// },
|
||||
// {
|
||||
// title: `99.5%`,
|
||||
// color: colors.extremeMiddle,
|
||||
// datasetPath: `/${scale}-to-price-${key}-sma-99-5p`,
|
||||
// },
|
||||
// {
|
||||
// title: `99%`,
|
||||
// color: colors.extremeMin,
|
||||
// datasetPath: `/${scale}-to-price-${key}-sma-99p`,
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// scale,
|
||||
// name: "Extreme Bottoms",
|
||||
// description: "",
|
||||
// icon: IconTablerSubmarine,
|
||||
// title: `${name} Moving Average Extreme Bottoms`,
|
||||
// top: [
|
||||
// {
|
||||
// title: `0.1%`,
|
||||
// color: colors.extremeMax,
|
||||
// datasetPath: `/${scale}-to-price-${key}-sma-0-1p`,
|
||||
// },
|
||||
// {
|
||||
// title: `0.5%`,
|
||||
// color: colors.extremeMiddle,
|
||||
// datasetPath: `/${scale}-to-price-${key}-sma-0-5p`,
|
||||
// },
|
||||
// {
|
||||
// title: `1%`,
|
||||
// color: colors.extremeMin,
|
||||
// datasetPath: `/${scale}-to-price-${key}-sma-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,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
scale,
|
||||
name: "Extreme Tops",
|
||||
description: "",
|
||||
icon: IconTablerRocket,
|
||||
title: `${name} Moving Average Extreme Tops`,
|
||||
top: [
|
||||
{
|
||||
title: `99.9%`,
|
||||
color: colors.extremeMax,
|
||||
datasetPath: `/${scale}-to-price-${key}-sma-99-9p`,
|
||||
},
|
||||
{
|
||||
title: `99.5%`,
|
||||
color: colors.extremeMiddle,
|
||||
datasetPath: `/${scale}-to-price-${key}-sma-99-5p`,
|
||||
},
|
||||
{
|
||||
title: `99%`,
|
||||
color: colors.extremeMin,
|
||||
datasetPath: `/${scale}-to-price-${key}-sma-99p`,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
createRatioFolder({
|
||||
scale,
|
||||
color,
|
||||
ratioDatasetPath: `/${scale}-to-market-price-to-price-${key}-sma-ratio`,
|
||||
valueDatasetPath: `/${scale}-to-price-${key}-sma`,
|
||||
title: `${name} Moving Average`,
|
||||
}),
|
||||
],
|
||||
} satisfies PartialPresetFolder;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { colors } from "/src/scripts/utils/colors";
|
||||
|
||||
import { SeriesType } from "../../enums";
|
||||
import { createRatioFolder } from "../ratio";
|
||||
import { datasetIdToPrefix } from "./utils";
|
||||
|
||||
export function createCohortPresetRealizedFolder({
|
||||
@@ -33,6 +34,13 @@ export function createCohortPresetRealizedFolder({
|
||||
},
|
||||
],
|
||||
},
|
||||
createRatioFolder({
|
||||
scale,
|
||||
color,
|
||||
ratioDatasetPath: `/${scale}-to-market-price-to-${datasetPrefix}realized-price-ratio`,
|
||||
valueDatasetPath: `/${scale}-to-${datasetPrefix}realized-price`,
|
||||
title: `${title} Realized Price`,
|
||||
}),
|
||||
{
|
||||
scale,
|
||||
name: `Capitalization`,
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
// SeriesType,
|
||||
// } from "/src/scripts";
|
||||
|
||||
import { colors } from "../../utils/colors";
|
||||
import { SeriesType } from "../enums";
|
||||
|
||||
// // type HeightRatioKey =
|
||||
// // | `${AnyPossibleCohortKey}RealizedPrice`
|
||||
// // | "activePrice"
|
||||
@@ -14,276 +17,259 @@
|
||||
// // // type DateRatioKey = HeightRatioKey;
|
||||
// // type DateRatioKey = HeightRatioKey | `price${AverageName}MA`;
|
||||
|
||||
// export function createRatioPresetFolder<
|
||||
// Scale extends ResourceScale,
|
||||
// Key extends string,
|
||||
// >({
|
||||
// datasets,
|
||||
// scale,
|
||||
// id,
|
||||
// title,
|
||||
// datasetId,
|
||||
// color,
|
||||
// }: {
|
||||
// datasets: Record<`${Key}${RatioKey}`, Dataset<ResourceScale>>;
|
||||
// scale: Scale;
|
||||
// id: string;
|
||||
// title: string;
|
||||
// color: string;
|
||||
// datasetId: Key;
|
||||
// }): PartialPresetFolder {
|
||||
// return {
|
||||
// id: `${scale}-${id}-ratio`,
|
||||
// name: "Ratio",
|
||||
// tree: [
|
||||
// {
|
||||
// id: `${scale}-${id}-ratio-value`,
|
||||
// name: `Value`,
|
||||
// title: `Bitcoin Price to ${title} Ratio`,
|
||||
// icon: () => IconTablerDivide,
|
||||
// applyPreset(params) {
|
||||
// return applyMultipleSeries({
|
||||
// scale,
|
||||
// ...params,
|
||||
// priceScaleOptions: {
|
||||
// halved: true,
|
||||
// },
|
||||
// list: [
|
||||
// {
|
||||
// title: "Ratio",
|
||||
// seriesType: SeriesType.Based,
|
||||
// dataset: datasets[`${datasetId}Ratio`],
|
||||
// options: {
|
||||
// base: 1,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// });
|
||||
// },
|
||||
// description: "",
|
||||
// },
|
||||
// {
|
||||
// id: `${scale}-${id}-ratio-1y-average`,
|
||||
// name: "Averages",
|
||||
// tree: [
|
||||
// {
|
||||
// id: `${scale}-${id}-ratio-averages`,
|
||||
// name: `7 Day VS. 1 Year`,
|
||||
// title: `Bitcoin Price to ${title} Ratio Moving Averages`,
|
||||
// icon: () => IconTablerSwords,
|
||||
// applyPreset(params) {
|
||||
// return applyMultipleSeries({
|
||||
// scale,
|
||||
// ...params,
|
||||
// priceScaleOptions: {
|
||||
// halved: true,
|
||||
// },
|
||||
// list: [
|
||||
// {
|
||||
// title: "Ratio",
|
||||
// seriesType: SeriesType.Based,
|
||||
// color: colors.gray,
|
||||
// dataset: datasets[`${datasetId}Ratio`],
|
||||
// options: {
|
||||
// base: 1,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// title: "7 Day Moving Average",
|
||||
// color: colors.closes7DMA,
|
||||
// dataset: datasets[`${datasetId}Ratio7DayMovingAverage`],
|
||||
// },
|
||||
// {
|
||||
// title: "1 Year Moving Average",
|
||||
// color: colors.closes1YMA,
|
||||
// dataset: datasets[`${datasetId}Ratio1YearMovingAverage`],
|
||||
// },
|
||||
// ],
|
||||
// });
|
||||
// },
|
||||
// description: "",
|
||||
// },
|
||||
// createMomentumPresetFolder({
|
||||
// datasets,
|
||||
// scale,
|
||||
// id: `${scale}-${id}-ratio-averages`,
|
||||
// title: `${title} Ratio Moving Averages`,
|
||||
// datasetId: `${datasetId}Ratio`,
|
||||
// }),
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// id: `${scale}-${id}-ratio-extremes`,
|
||||
// name: "Extremes",
|
||||
// tree: [
|
||||
// {
|
||||
// id: `${scale}-${id}-extreme-top-ratios`,
|
||||
// name: "Top Ratios",
|
||||
// description: "",
|
||||
// icon: () => IconTablerJetpack,
|
||||
// title: `${title} Extreme Top Ratios`,
|
||||
// applyPreset(params) {
|
||||
// return applyMultipleSeries({
|
||||
// scale,
|
||||
// ...params,
|
||||
// priceScaleOptions: {
|
||||
// halved: true,
|
||||
// },
|
||||
// list: [
|
||||
// {
|
||||
// id: "ratio",
|
||||
// title: "Ratio",
|
||||
// color: colors.white,
|
||||
// seriesType: SeriesType.Based,
|
||||
// dataset: datasets[`${datasetId}Ratio`],
|
||||
// options: {
|
||||
// base: 1,
|
||||
// options: {
|
||||
// baseLineColor: color,
|
||||
// baseLineVisible: true,
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// id: "99.9-percentile",
|
||||
// title: "99.9th Percentile",
|
||||
// dataset: datasets[`${datasetId}Ratio99.9Percentile`],
|
||||
// color: colors.extremeMax,
|
||||
// },
|
||||
// {
|
||||
// id: "99.5-percentile",
|
||||
// title: "99.5th Percentile",
|
||||
// color: colors.extremeMiddle,
|
||||
// dataset: datasets[`${datasetId}Ratio99.5Percentile`],
|
||||
// },
|
||||
// {
|
||||
// id: "99-percentile",
|
||||
// title: "99th Percentile",
|
||||
// color: colors.extremeMin,
|
||||
// dataset: datasets[`${datasetId}Ratio99Percentile`],
|
||||
// },
|
||||
// ],
|
||||
// });
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// id: `${scale}-${id}-extreme-bottom-ratios`,
|
||||
// name: "Bottom Ratios",
|
||||
// description: "",
|
||||
// icon: () => IconTablerScubaMask,
|
||||
// title: `${title} Extreme Bottom Ratios`,
|
||||
// applyPreset(params) {
|
||||
// return applyMultipleSeries({
|
||||
// scale,
|
||||
// ...params,
|
||||
// priceScaleOptions: {
|
||||
// halved: true,
|
||||
// },
|
||||
// list: [
|
||||
// {
|
||||
// id: "ratio",
|
||||
// title: "Ratio",
|
||||
// color: colors.white,
|
||||
// seriesType: SeriesType.Based,
|
||||
// dataset: datasets[`${datasetId}Ratio`],
|
||||
// options: {
|
||||
// base: 1,
|
||||
// options: {
|
||||
// baseLineColor: color,
|
||||
// baseLineVisible: true,
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// id: "1-percentile",
|
||||
// title: "1st Percentile",
|
||||
// color: colors.extremeMin,
|
||||
// dataset: datasets[`${datasetId}Ratio1Percentile`],
|
||||
// },
|
||||
// {
|
||||
// id: "0.5-percentile",
|
||||
// title: "0.5th Percentile",
|
||||
// color: colors.extremeMiddle,
|
||||
// dataset: datasets[`${datasetId}Ratio0.5Percentile`],
|
||||
// },
|
||||
// {
|
||||
// id: "0.1-percentile",
|
||||
// title: "0.1th Percentile",
|
||||
// color: colors.extremeMax,
|
||||
// dataset: datasets[`${datasetId}Ratio0.1Percentile`],
|
||||
// },
|
||||
// ],
|
||||
// });
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// id: `${scale}-${id}-extreme-top-prices`,
|
||||
// name: "Top Prices",
|
||||
// description: "",
|
||||
// icon: () => IconTablerRocket,
|
||||
// title: `${title} Extreme Top Prices`,
|
||||
// applyPreset(params) {
|
||||
// return applyMultipleSeries({
|
||||
// scale,
|
||||
// ...params,
|
||||
// list: [
|
||||
// {
|
||||
// id: "99.9-percentile",
|
||||
// title: "99.9th Percentile",
|
||||
// color: colors.extremeMax,
|
||||
// dataset: datasets[`${datasetId}Ratio99.9Price`],
|
||||
// },
|
||||
// {
|
||||
// id: "99.5-percentile",
|
||||
// title: "99.5th Percentile",
|
||||
// color: colors.extremeMiddle,
|
||||
// dataset: datasets[`${datasetId}Ratio99.5Price`],
|
||||
// },
|
||||
// {
|
||||
// id: "99-percentile",
|
||||
// title: "99th Percentile",
|
||||
// color: colors.extremeMin,
|
||||
// dataset: datasets[`${datasetId}Ratio99Price`],
|
||||
// },
|
||||
// ],
|
||||
// });
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// id: `${scale}-${id}-extreme-bottom-prices`,
|
||||
// name: "Bottom Prices",
|
||||
// description: "",
|
||||
// icon: () => IconTablerSubmarine,
|
||||
// title: `${title} Extreme Bottom Prices`,
|
||||
// applyPreset(params) {
|
||||
// return applyMultipleSeries({
|
||||
// scale,
|
||||
// ...params,
|
||||
// list: [
|
||||
// {
|
||||
// id: "1-percentile",
|
||||
// title: "1st Percentile",
|
||||
// color: colors.extremeMin,
|
||||
// dataset: datasets[`${datasetId}Ratio1Price`],
|
||||
// },
|
||||
// {
|
||||
// id: "0.5-percentile",
|
||||
// title: "0.5th Percentile",
|
||||
// color: colors.extremeMiddle,
|
||||
// dataset: datasets[`${datasetId}Ratio0.5Price`],
|
||||
// },
|
||||
// {
|
||||
// id: "0.1-percentile",
|
||||
// title: "0.1th Percentile",
|
||||
// color: colors.extremeMax,
|
||||
// dataset: datasets[`${datasetId}Ratio0.1Price`],
|
||||
// },
|
||||
// ],
|
||||
// });
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// }
|
||||
export function createRatioFolder({
|
||||
scale,
|
||||
color,
|
||||
valueDatasetPath,
|
||||
ratioDatasetPath,
|
||||
title,
|
||||
}: {
|
||||
scale: ResourceScale;
|
||||
color: Color;
|
||||
valueDatasetPath: AnyDatasetPath;
|
||||
ratioDatasetPath: AnyDatasetPath;
|
||||
title: string;
|
||||
}): PartialPresetFolder {
|
||||
return {
|
||||
name: "Ratio",
|
||||
tree: [
|
||||
{
|
||||
scale,
|
||||
name: "Basic",
|
||||
description: "",
|
||||
icon: IconTablerMathXDivideY,
|
||||
title: `Market Price To ${title} Ratio`,
|
||||
top: [
|
||||
{
|
||||
title: `SMA`,
|
||||
color,
|
||||
datasetPath: valueDatasetPath,
|
||||
},
|
||||
],
|
||||
bottom: [
|
||||
{
|
||||
title: `Ratio`,
|
||||
seriesType: SeriesType.Based,
|
||||
datasetPath: ratioDatasetPath,
|
||||
options: {
|
||||
base: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: `Even`,
|
||||
color: colors.white,
|
||||
datasetPath: `/${scale}-to-1`,
|
||||
options: {
|
||||
lineStyle: 3,
|
||||
lastValueVisible: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
scale,
|
||||
name: "Averages",
|
||||
description: "",
|
||||
icon: IconTablerMathAvg,
|
||||
title: `Market Price To ${title} Ratio Averages`,
|
||||
top: [
|
||||
{
|
||||
title: `SMA`,
|
||||
color,
|
||||
datasetPath: valueDatasetPath,
|
||||
},
|
||||
],
|
||||
bottom: [
|
||||
{
|
||||
title: `1Y`,
|
||||
color: colors._1y,
|
||||
datasetPath: `${ratioDatasetPath}-1y-sma`,
|
||||
},
|
||||
{
|
||||
title: `1M`,
|
||||
color: colors._1m,
|
||||
datasetPath: `${ratioDatasetPath}-1m-sma`,
|
||||
},
|
||||
{
|
||||
title: `1W`,
|
||||
color: colors._1w,
|
||||
datasetPath: `${ratioDatasetPath}-1w-sma`,
|
||||
},
|
||||
{
|
||||
title: `Raw`,
|
||||
color: colors.white,
|
||||
datasetPath: ratioDatasetPath,
|
||||
options: {
|
||||
base: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: `Even`,
|
||||
color: colors.gray,
|
||||
datasetPath: `/${scale}-to-1`,
|
||||
options: {
|
||||
lineStyle: 3,
|
||||
lastValueVisible: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
scale,
|
||||
name: "Momentum Oscillator",
|
||||
description: "",
|
||||
icon: IconTablerWaveSine,
|
||||
title: `Market Price To ${title} Ratio 1Y SMA Momentum Oscillator`,
|
||||
top: [
|
||||
{
|
||||
title: `SMA`,
|
||||
color,
|
||||
datasetPath: valueDatasetPath,
|
||||
},
|
||||
],
|
||||
bottom: [
|
||||
{
|
||||
title: `Momentum`,
|
||||
seriesType: SeriesType.Based,
|
||||
datasetPath: `${ratioDatasetPath}-1y-sma-momentum-oscillator`,
|
||||
},
|
||||
{
|
||||
title: `Base`,
|
||||
color: colors.white,
|
||||
datasetPath: `/${scale}-to-0`,
|
||||
options: {
|
||||
lineStyle: 3,
|
||||
lastValueVisible: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
scale,
|
||||
name: "Top Percentiles",
|
||||
description: "",
|
||||
icon: IconTablerJetpack,
|
||||
title: `Market Price To ${title} Ratio Top Percentiles`,
|
||||
top: [
|
||||
{
|
||||
title: `SMA`,
|
||||
color,
|
||||
datasetPath: valueDatasetPath,
|
||||
},
|
||||
],
|
||||
bottom: [
|
||||
{
|
||||
title: `99.9%`,
|
||||
color: colors.extremeMax,
|
||||
datasetPath: `${ratioDatasetPath}-99-9p`,
|
||||
},
|
||||
{
|
||||
title: `99.5%`,
|
||||
color: colors.extremeMiddle,
|
||||
datasetPath: `${ratioDatasetPath}-99-5p`,
|
||||
},
|
||||
{
|
||||
title: `99%`,
|
||||
color: colors.extremeMin,
|
||||
datasetPath: `${ratioDatasetPath}-99p`,
|
||||
},
|
||||
{
|
||||
title: `Raw`,
|
||||
color: colors.white,
|
||||
datasetPath: ratioDatasetPath,
|
||||
options: {
|
||||
base: 1,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
scale,
|
||||
name: "Bottom Percentiles",
|
||||
description: "",
|
||||
icon: IconTablerScubaMask,
|
||||
title: `Market Price To ${title} Ratio Bottom Percentiles`,
|
||||
top: [
|
||||
{
|
||||
title: `SMA`,
|
||||
color,
|
||||
datasetPath: valueDatasetPath,
|
||||
},
|
||||
],
|
||||
bottom: [
|
||||
{
|
||||
title: `1%`,
|
||||
color: colors.extremeMin,
|
||||
datasetPath: `${ratioDatasetPath}-1p`,
|
||||
},
|
||||
{
|
||||
title: `0.5%`,
|
||||
color: colors.extremeMiddle,
|
||||
datasetPath: `${ratioDatasetPath}-0-5p`,
|
||||
},
|
||||
{
|
||||
title: `0.1%`,
|
||||
color: colors.extremeMax,
|
||||
datasetPath: `${ratioDatasetPath}-0-1p`,
|
||||
},
|
||||
{
|
||||
title: `Raw`,
|
||||
color: colors.white,
|
||||
datasetPath: ratioDatasetPath,
|
||||
options: {
|
||||
base: 1,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
scale,
|
||||
name: "Extreme Tops",
|
||||
description: "",
|
||||
icon: IconTablerRocket,
|
||||
title: `${title} Extreme Tops`,
|
||||
top: [
|
||||
{
|
||||
title: `99.9%`,
|
||||
color: colors.extremeMax,
|
||||
datasetPath: `${valueDatasetPath}-99-9p`,
|
||||
},
|
||||
{
|
||||
title: `99.5%`,
|
||||
color: colors.extremeMiddle,
|
||||
datasetPath: `${valueDatasetPath}-99-5p`,
|
||||
},
|
||||
{
|
||||
title: `99%`,
|
||||
color: colors.extremeMin,
|
||||
datasetPath: `${valueDatasetPath}-99p`,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
scale,
|
||||
name: "Extreme Bottoms",
|
||||
description: "",
|
||||
icon: IconTablerSubmarine,
|
||||
title: `${title} Extreme Bottoms`,
|
||||
top: [
|
||||
{
|
||||
title: `0.1%`,
|
||||
color: colors.extremeMax,
|
||||
datasetPath: `${valueDatasetPath}-0-1p`,
|
||||
},
|
||||
{
|
||||
title: `0.5%`,
|
||||
color: colors.extremeMiddle,
|
||||
datasetPath: `${valueDatasetPath}-0-5p`,
|
||||
},
|
||||
{
|
||||
title: `1%`,
|
||||
color: colors.extremeMin,
|
||||
datasetPath: `${valueDatasetPath}-1p`,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user