diagonals working

This commit is contained in:
Tim
2024-05-13 16:32:16 -04:00
parent c7549e2f99
commit bf39ed946c
5 changed files with 132 additions and 31 deletions

View File

@@ -4,7 +4,6 @@ import {token} from "@/blockchain/token.js";
import Color from "color";
import {DateTime} from "luxon";
import router from "@/router/index.js";
import {useChartOrderStore} from "@/orderbuild.js";
export function nav(name) {
// noinspection JSIgnoredPromiseFromCall
@@ -251,17 +250,6 @@ export function intervalToSeconds(interval) {
: 60 // if no unit char, then it's minutes
}
function nearestOhlcStart(time) {
// todo subtract OHLC root time
const period = useChartOrderStore().intervalSecs
return Math.round(time / period) * period
}
export function pointsToOhlcStart(points) {
return points === null ? null : points.map((p)=>{return{time:nearestOhlcStart(p.time), price:p.price}})
}
export function interpolate(a, b, zeroToOne) {
const d = (b-a)