This commit is contained in:
2025-08-24 23:44:43 +09:00
parent f5059ed0ce
commit 58c60d0f3c
5 changed files with 16 additions and 3 deletions

View File

@@ -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",

View File

@@ -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'},

View File

@@ -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
View File

@@ -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']

View File

@@ -256,7 +256,6 @@ export default defineConfig(({ isSsrBuild }) => ({
'vuetify/framework',
'vuetify/components',
'vuetify/directives',
'technicalindicators',
'notyf',
'vue',
'vue-i18n',