mirror of
https://git.hmsn.ink/coin/chart.git
synced 2026-03-20 00:02:17 +09:00
first
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
"notyf": "3.10.0",
|
||||
"pinia": "2.1.7",
|
||||
"std-env": "^3.9.0",
|
||||
"technicalindicators": "^3.1.0",
|
||||
"unplugin-vue-router": "^0.15.0",
|
||||
"vite-plugin-pwa": "^1.0.3",
|
||||
"vite-plugin-vuetify": "^2.1.2",
|
||||
|
||||
@@ -13,6 +13,10 @@ import {getCandleList} from '/@src/utils/api'
|
||||
import {calculateMACD, calculateEMA, calculateBollingerBands, calculateRSI} from "./utils/meter.js";
|
||||
import {entrySignals} from "./utils/cro.js";
|
||||
import {swingSignal} from "./utils/sig.js";
|
||||
import { useWindowSize } from '@vueuse/core'
|
||||
|
||||
const { width, height } = useWindowSize()
|
||||
console.log(width, height)
|
||||
/**
|
||||
* Generates sample data for the lightweight chart
|
||||
* @param {Boolean} ohlc Whether generated dat should include open, high, low, and close values
|
||||
@@ -33,7 +37,8 @@ const chartOptions = ref({
|
||||
separatorColor: '#FF0000',
|
||||
},
|
||||
},
|
||||
height: 1300,
|
||||
width: width,
|
||||
height: height,
|
||||
timeScale: {
|
||||
timeVisible: true, // 분/초까지 표시
|
||||
secondsVisible: false // 초 숨기고 싶으면 false
|
||||
@@ -55,6 +60,8 @@ const selectCoins = [
|
||||
{ title: 'LINK_USDT'},
|
||||
]
|
||||
const selectTimes = [
|
||||
{ title: '10s'},
|
||||
{ title: '1m'},
|
||||
{ title: '5m'},
|
||||
{ title: '15m'},
|
||||
{ title: '30m'},
|
||||
|
||||
@@ -219,8 +219,15 @@ onMounted(() => {
|
||||
chart.timeScale().subscribeVisibleLogicalRangeChange(onVisibleLogicalRangeChanged);
|
||||
|
||||
chart.subscribeCrosshairMove(onCrosshairMove)
|
||||
|
||||
chart.subscribeClick(onClick);
|
||||
|
||||
});
|
||||
|
||||
function onClick(dd) {
|
||||
console.log(dd)
|
||||
}
|
||||
|
||||
function onVisibleLogicalRangeChanged(newVisibleLogicalRange) {
|
||||
const barsInfo = candlestick.barsInLogicalRange(newVisibleLogicalRange);
|
||||
// if there less than 50 bars to the left of the visible area
|
||||
|
||||
1
types/imports.d.ts
vendored
1
types/imports.d.ts
vendored
@@ -109,6 +109,7 @@ declare global {
|
||||
const toRef: typeof import('vue')['toRef']
|
||||
const toRefs: typeof import('vue')['toRefs']
|
||||
const toValue: typeof import('vue')['toValue']
|
||||
const trendLine: typeof import('../src/utils/drawing')['trendLine']
|
||||
const triggerRef: typeof import('vue')['triggerRef']
|
||||
const tryOnBeforeMount: typeof import('@vueuse/core')['tryOnBeforeMount']
|
||||
const tryOnBeforeUnmount: typeof import('@vueuse/core')['tryOnBeforeUnmount']
|
||||
|
||||
@@ -256,7 +256,6 @@ export default defineConfig(({ isSsrBuild }) => ({
|
||||
'vuetify/framework',
|
||||
'vuetify/components',
|
||||
'vuetify/directives',
|
||||
'technicalindicators',
|
||||
'notyf',
|
||||
'vue',
|
||||
'vue-i18n',
|
||||
|
||||
Reference in New Issue
Block a user