global: add min max choppiness datasets + fixes

This commit is contained in:
nym21
2025-09-09 17:52:45 +02:00
parent 16abce1f2d
commit a610fd53e2
12 changed files with 606 additions and 205 deletions

View File

@@ -10,6 +10,8 @@ use serde::{Deserialize, Serialize};
use vecdb::{CheckedSub, StoredCompressed};
use zerocopy_derive::{FromBytes, Immutable, IntoBytes, KnownLayout};
use crate::{Low, Open};
use super::{Bitcoin, Cents, Close, High, Sats, StoredF32, StoredF64};
#[derive(
@@ -80,8 +82,8 @@ impl From<Dollars> for f64 {
}
}
impl From<Close<Dollars>> for Dollars {
fn from(value: Close<Dollars>) -> Self {
impl From<Open<Dollars>> for Dollars {
fn from(value: Open<Dollars>) -> Self {
Self(value.0)
}
}
@@ -92,6 +94,18 @@ impl From<High<Dollars>> for Dollars {
}
}
impl From<Low<Dollars>> for Dollars {
fn from(value: Low<Dollars>) -> Self {
Self(value.0)
}
}
impl From<Close<Dollars>> for Dollars {
fn from(value: Close<Dollars>) -> Self {
Self(value.0)
}
}
impl From<usize> for Dollars {
fn from(value: usize) -> Self {
Self(value as f64)