aboutsummaryrefslogtreecommitdiff
path: root/downloads/HypeTrader.js
blob: acc3a604c93cfeb24909cb86ba953d2f82500f64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
 * HypeTrader.js - Momentum Rider Strategy
 * Strategy: Long on 15m High Breakout + Volume Spike
 */
const HypeTrader = {
    config: {
        symbol: 'HYPE',
        timeframe: '15m',
        volThreshold: 1.5, // 150% of average
        tp: 0.05, // 5% Take Profit
        sl: -0.02 // 2% Trailing Stop
    },

    async analyze(priceData) {
        const { currentPrice, high20, avgVol, currentVol } = priceData;
        
        if (currentPrice > high20 && currentVol >= avgVol * this.config.volThreshold) {
            return { action: 'LONG', signal: 'MOMENTUM_BREAKOUT', price: currentPrice };
        }
        return { action: 'WAIT', signal: 'NO_SIGNAL' };
    },

    async executeTrade(signal) {
        console.log(`Executing ${signal.action} for ${this.config.symbol} at ${signal.price}`);
        // Integration with HyperliquidBridge and secret:hyper
        return await HyperliquidBridge.placeOrder({
            symbol: this.config.symbol,
            side: signal.action,
            size: 'auto', // Based on risk mgmt
            secretKey: 'hyper'
        });
    }
};

module.exports = HypeTrader;