OHLC rework
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// import {subscribeOnStream, unsubscribeFromStream,} from './streaming.js';
|
||||
|
||||
import {jBars, tvResolutionToPeriodString} from './jBars.js';
|
||||
import {loadOHLC} from './ohlc.js';
|
||||
import {metadata} from "@/version.js";
|
||||
import FlexSearch from "flexsearch";
|
||||
import {useChartOrderStore} from "@/orderbuild.js";
|
||||
@@ -318,7 +318,7 @@ export const DataFeed = {
|
||||
// todo need to consider the selected fee tier
|
||||
let bars, metadata;
|
||||
const pool = useChartOrderStore().selectedPool;
|
||||
[bars, metadata] = await jBars(lookupSymbol(symbolInfo.ticker), pool[0], from, to, resolution); // This is the one that does all the work
|
||||
[bars, metadata] = await loadOHLC(lookupSymbol(symbolInfo.ticker), pool[0], from, to, resolution); // This is the one that does all the work
|
||||
if (firstDataRequest) {
|
||||
lastBarsCache.set(symbolInfo.full_name, {
|
||||
...bars[bars.length - 1],
|
||||
|
||||
Reference in New Issue
Block a user