work on integrating new system

This commit is contained in:
Boki 2025-07-03 21:13:02 -04:00
parent 083dca500c
commit 063f4c8e27
8 changed files with 221 additions and 66 deletions

View file

@ -304,18 +304,18 @@ export class StorageService {
symbol === 'GOOGL' ? 120 : 100;
while (currentTime <= endTime) {
// Random walk with trend
const trend = 0.0001; // Slight upward trend
const volatility = 0.002; // 0.2% volatility
// Random walk with trend - increased volatility for testing
const trend = 0.0002; // Slight upward trend
const volatility = 0.01; // 1% volatility (increased from 0.2%)
const change = (Math.random() - 0.5 + trend) * volatility;
basePrice *= (1 + change);
// Generate OHLC data
const open = basePrice * (1 + (Math.random() - 0.5) * 0.001);
// Generate OHLC data with more realistic volatility
const open = basePrice * (1 + (Math.random() - 0.5) * 0.005);
const close = basePrice;
const high = Math.max(open, close) * (1 + Math.random() * 0.002);
const low = Math.min(open, close) * (1 - Math.random() * 0.002);
const high = Math.max(open, close) * (1 + Math.random() * 0.008);
const low = Math.min(open, close) * (1 - Math.random() * 0.008);
const volume = 1000000 + Math.random() * 500000;
bars.push({