Skip to Content
Tinga TingaConfiguration

Configuration

Complete configuration reference for the Tinga Tinga trading strategy.

Configuration File

All settings are in config/default.json:

{ "strategy": { "name": "TingaTinga", "version": "1.0.0", "rsiPeriod": 14, "rsiOversold": 30, "rsiOverbought": 70, "atrPeriod": 14, "atrStopMultiplier": 1.5, "atrTargetMultiplier": 3.0, "useVolumeFilter": true, "volumeMultiplier": 1.2 }, "risk": { "riskPerTrade": 0.02, "maxPositionSize": 0.10, "maxOpenTrades": 3, "maxDailyLoss": 0.05, "trailingStopEnabled": true, "trailingStopActivation": 0.01, "breakEvenEnabled": true, "breakEvenThreshold": 0.005 }, "trading": { "symbols": ["BTCUSDT", "ETHUSDT", "SOLUSDT"], "timeframe": "1h", "startHour": 0, "endHour": 24, "tradingDays": [1, 2, 3, 4, 5] }, "exchange": { "name": "binance", "type": "spot", "testnet": true }, "notifications": { "enabled": true, "telegram": true, "email": false }, "logging": { "level": "info", "file": true, "console": true } }

Strategy Settings

RSI Configuration

ParameterDefaultRangeDescription
rsiPeriod147-21RSI calculation period
rsiOversold3020-35Oversold threshold
rsiOverbought7065-80Overbought threshold

ATR Configuration

ParameterDefaultRangeDescription
atrPeriod1410-20ATR calculation period
atrStopMultiplier1.51.0-2.5Stop loss ATR multiple
atrTargetMultiplier3.02.0-4.0Take profit ATR multiple

Volume Filter

ParameterDefaultDescription
useVolumeFiltertrueEnable volume confirmation
volumeMultiplier1.2Minimum volume vs average

Risk Management

Position Sizing

ParameterDefaultDescription
riskPerTrade2%Account risk per trade
maxPositionSize10%Maximum position as % of account
maxOpenTrades3Maximum concurrent positions
maxDailyLoss5%Daily loss limit (circuit breaker)

Stop Management

ParameterDefaultDescription
trailingStopEnabledtrueEnable trailing stop
trailingStopActivation1%Profit % to activate trailing
breakEvenEnabledtrueMove stop to break-even
breakEvenThreshold0.5%Profit % for break-even

Trading Schedule

{ "trading": { "startHour": 8, // UTC start hour "endHour": 22, // UTC end hour "tradingDays": [1, 2, 3, 4, 5] // Mon-Fri } }

Trading days: 0=Sunday, 1=Monday, …, 6=Saturday

Exchange Configuration

Binance Spot

{ "exchange": { "name": "binance", "type": "spot", "testnet": true } }

Binance Futures

{ "exchange": { "name": "binance", "type": "futures", "testnet": true, "leverage": 3, "marginType": "cross" } }

Notifications

Telegram

{ "notifications": { "enabled": true, "telegram": true, "telegramEvents": ["signal", "trade", "error"] } }

Email

{ "notifications": { "enabled": true, "email": true, "emailRecipient": "trader@example.com" } }

Logging

LevelDescription
errorErrors only
warnWarnings and errors
infoGeneral information
debugDetailed debugging
{ "logging": { "level": "info", "file": true, "filePath": "./logs/tinga-tinga.log", "console": true, "maxFileSize": "10m", "maxFiles": 5 } }

Environment Overrides

Environment variables override config file settings:

# Override RSI period STRATEGY_RSI_PERIOD=21 # Override risk per trade RISK_PER_TRADE=0.01 # Override symbols TRADING_SYMBOLS=BTCUSDT,ETHUSDT

Validation

The system validates configuration on startup:

// Example validation if (config.risk.riskPerTrade > 0.05) { throw new Error('Risk per trade too high (max 5%)'); } if (config.strategy.atrTargetMultiplier <= config.strategy.atrStopMultiplier) { throw new Error('Take profit must be greater than stop loss'); }
Last updated on