Agentic Trading Lab
에이전트와 대화하고, 거래 아이디어를 테스트하며, 코드 없이 실제 시장 데이터에 AI 트레이딩 에이전트를 적용
백테스트·수동·봇 자동화까지 지원하는 완전한 암호화폐 거래 플랫폼, 오픈소스·AI 기반, 영구 무료
The complete crypto trading platform — backtest, trade manually or automate with bots, and journal every trade. Open source, AI-powered, and free forever.
금융TypeScript · ShellGitHub @Gainium온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기High-performance TypeScript technical indicators library with 45+ indicators optimized for real-time trading systems. Features memory-efficient architecture, complete type safety, and comprehensive documentation. Used in production by Gainium trading platform.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗A high-performance, TypeScript-based technical indicators library built for professional trading applications. This library provides 45+ comprehensive technical analysis indicators optimized for real-time trading systems with minimal memory footprint and maximum computational efficiency.
Author: Maksym Shamko (https://github.com/maksymshamko)
Organization: Gainium (https://github.com/Gainium | https://gainium.io/)
# Install from npm
npm install @gainium/indicators
# or
yarn add @gainium/indicators
import { RSI, SMA, MACD, BollingerBands } from '@gainium/indicators';
// Create indicators
const rsi = new RSI(14);
const sma = new SMA(20);
const macd = new MACD();
const bb = new BollingerBands(20, 2);
// Feed price data
const price = 100.50;
const candle = { open: 100, high: 101, low: 99.5, close: 100.50, volume: 1000 };
// Get results
const rsiValue = rsi.next(price); // Returns RSI value or null if not ready
const smaValue = sma.next(price); // Returns SMA value or null
const macdResult = macd.next(price); // Returns {value, signal, histogram} or null
const bbResult = bb.next(candle); // Returns {upper, middle, lower} or null
console.log('RSI:', rsiValue?.value); // Access RSI value
console.log('SMA:', smaValue); // Direct numeric value
console.log('MACD:', macdResult?.value); // MACD line value
console.log('BB Upper:', bbResult?.upper); // Bollinger Bands upper band
import { SuperTrend, StochasticOscillator } from '@gainium/indicators';
// Create indicators
const superTrend = new SuperTrend(10, 3.0);
const stoch = new StochasticOscillator(14, 3, 3);
// Process multiple candles
const candles = [
{ open: 100, high: 102, low: 99, close: 101, volume: 1000 },
{ open: 101, high: 103, low: 100, close: 102, volume: 1100 },
// ... more candles
];
candles.forEach(candle => {
const stResult = superTrend.next(candle);
const stochResult = stoch.next(candle);
if (stResult && stochResult) {
console.log('SuperTrend:', stResult.trend ? 'Uptrend' : 'Downtrend');
console.log('Stochastic %K:', stochResult.stochK);
console.log('Stochastic %D:', stochResult.stochD);
}
});
// Save and restore state for persistence
const state = superTrend.exportState();
// ... save state to database/file
const newSuperTrend = new SuperTrend(10, 3.0);
newSuperTrend.restoreState(state);
Single-line oscillators (RSI, CCI, MFI, WR, UO, MOM, AO, ADX, BBPB, KCPB, BBW,
VO, MAR) can be smoothed through the factory:
createIndicator({ type: IndicatorEnum.rsi, interval: 14, smoothing: 'ema', smoothingLength: 14 })
returns a SmoothedIndicator whose value is the smoothed line and raw the
oscillator's own value (feed it with feedCandle).
priceChangeCondition gt / lt / between)All indicators extend the LightIndicator base class, providing:
// Basic indicator structure
abstract class LightIndicator<T = number, I = number> {
next(value: I): T | null // Process new value
preview(value: I): T | null // Preview without updating state
get result(): T | null // Get current result
exportState(): LightIndicatorState // Serialize state
restoreState(state: LightIndicatorState): void // Restore state
}
Indicators accept different input types based on their requirements:
Indicators return typed results:
// Simple numeric result
const smaResult: number | null = sma.next(price);
// Complex result objects
const rsiResult: PercentileResult | null = rsi.next(price);
const macdResult: MACDResult | null = macd.next(price);
const bbResult: BollingerBandsResult | null = bb.next(candle);
import { EMA, RSI, MACD } from '@gainium/indicators';
class TradingStrategy {
private ema20 = new EMA(20);
private ema50 = new EMA(50);
private rsi = new RSI(14);
private macd = new MACD();
onNewCandle(candle: OHLCV) {
const ema20Val = this.ema20.next(candle.close);
const ema50Val = this.ema50.next(candle.close);
const rsiVal = this.rsi.next(candle.close);
const macdVal = this.macd.next(candle.close);
if (ema20Val && ema50Val && rsiVal && macdVal) {
// Golden cross with RSI confirmation
if (ema20Val > ema50Val && rsiVal.value < 70 && macdVal.histogram > 0) {
this.enterLong();
}
}
}
}
import { SuperTrend, BollingerBands } from '@gainium/indicators';
function analyzeHistoricalData(candles: OHLCV[]) {
const superTrend = new SuperTrend(10, 3.0);
const bb = new BollingerBands(20, 2);
const signals = candles.map(candle => {
const stResult = superTrend.next(candle);
const bbResult = bb.next(candle);
return {
timestamp: candle.timestamp,
price: candle.close,
trend: stResult?.trend,
bbPosition: bbResult ? (candle.close - bbResult.middle) / (bbResult.upper - bbResult.middle) : null
};
});
return signals.filter(s => s.trend !== null);
}
import { RSI, MACD } from '@gainium/indicators';
class MultiTimeframeAnalysis {
private rsi1h = new RSI(14);
private rsi4h = new RSI(14);
private rsi1d = new RSI(14);
// Call with appropriate timeframe data
update1h(price: number) { return this.rsi1h.next(price); }
update4h(price: number) { return this.rsi4h.next(price); }
update1d(price: number) { return this.rsi1d.next(price); }
getOverallSignal() {
const rsi1h = this.rsi1h.result?.value;
const rsi4h = this.rsi4h.result?.value;
const rsi1d = this.rsi1d.result?.value;
if (rsi1h && rsi4h && rsi1d) {
// All timeframes oversold
if (rsi1h < 30 && rsi4h < 40 && rsi1d < 50) return 'STRONG_BUY';
// All timeframes overbought
if (rsi1h > 70 && rsi4h > 60 && rsi1d > 50) return 'STRONG_SELL';
}
return 'NEUTRAL';
}
}
We welcome contributions! Please follow these guidelines:
All indicators must extend the LightIndicator base class:
export class MyIndicator extends LightIndicator<ResultType, InputType> {
constructor(period: number) {
super(historyLength, defaultValue, stateSize, fillValue);
}
protected calculate(): ResultType | null {
// Implementation
}
}
exportState() and restoreState() methodsMIT License - see LICENSE file for details.
This library powers the technical analysis engine in Gainium, a professional cryptocurrency trading platform trusted by thousands of traders worldwide.
Built with ❤️ by the Gainium team for the trading community.