Botconfiguratie

De primaire handelsinstellingen voor de ByNinja-bot worden beheerd in het config_trading bestand. Hier kunt u de handelsparen, strategieparameters en risicobeheerregels definiëren.

Bestandslocatie:

Code
byninja-trading-bot/config/config_trading.json

1. Handelsparen & Parameters

Uw bot moet weten welke markten hij moet veroveren. U moet ten minste één actief handelspaar opgeven in de TRADING_PAIRS-lijst om uw geautomatiseerde handelsreis te beginnen.

Code
## List of cryptocurrency trading pairs in format BASEQUOTE (e.g., AVAXUSDT)
## Bot will monitor and trade these pairs according to configured parameters

TRADING_PAIRS = [
    "AVAXUSDT",
    "LINKUSDT",
    "ATOMUSDT"
]

Precisie is de sleutel. Voor elk paar dat in uw lijst is gedefinieerd, moet u de specifieke TRADING_PARAMETERS opgeven. Dit zorgt ervoor dat de bot zeer geoptimaliseerde strategieën uitvoert die precies zijn afgestemd op de unieke volatiliteit en het gedrag van elke asset.

Code
## Trading parameters per symbol
##
## Dictionary mapping trading pairs to their individual strategy parameters.
## Each pair can have unique settings for position sizing, profit targets, and technical indicators.

TRADING_PARAMETERS = {

    "AVAXUSDT": {
        ## Minimum order quantity (lot size) for this trading pair
        "lot_size": 0.5,
         
        ## Maximum position size in USDT for a single entry
        "position_size": 18.0,
         
        ## Take profit target as percentage of entry price (e.g., 2.81%)
        "take_profit_percent": 2.81,
         
        ## Stop loss level as percentage below entry price (e.g., 1.41%)
        "stop_loss_percent": 1.41,
         
        ## Price movement percentage to activate trailing stop (e.g., 1.3% profit triggers trail)
        "trail_activation_percent": 1.3,
         
        ## Trailing stop distance from highest price as percentage (e.g., 0.8%)
        "trail_distance_percent": 0.8,
         
        ## Tight trailing stop distance when price approaches resistance
        "trail_tight_distance_percent": 0.5,
         
        ## Minimum 3-minute EMA200 slope to consider market trending downward (filter condition)
        "min_ema200_3m_slope": -0.008,
         
        ## Minimum 1-minute EMA20 slope for entry signal (upward trend)
        "min_ema20_1m_slope": 0.01,
         
        ## Minimum 1-minute EMA50 slope to confirm uptrend
        "min_ema50_1m_slope": 0.005,
         
        ## Volume spike coefficient - requires volume exceeding average × coefficient
        "volume_spike_coeff": 1.2,
         
        ## Maximum candle size as percentage - filters out overly large candles
        "max_candle_size": 0.8,
         
        ## Minimum distance between EMA50 and EMA200 (percentage) for trend confirmation
        "min_ema50_ema200_distance": 0.06,
         
        ## Minimum distance between EMA20 and EMA50 (percentage) for entry confirmation
        "min_ema20_ema50_distance": 0.10,
     },

     ...
}

2. Risicobeheer & Kapitaal

Voordat u risicoregels instelt, definieert u het INITIAL_CAPITAL. Dit is het exacte bedrag aan fondsen dat de bot mag gebruiken op uw account, zodat hij strikt binnen uw toegewezen budget blijft.

Code
## Initial trading capital in USDT for the bot

INITIAL_CAPITAL = 1000.0

Kapitaalbehoud is onze hoogste prioriteit. De RISK_PARAMETERS-structuur is uw ultieme veiligheidsnet. Cruciaal is dat het de noodstopmechanismen beheert, waardoor de bot onmiddellijk wordt stopgezet tijdens onvoorziene marktafwijkingen om te beschermen tegen onverwachte accidentele verliezen.

Code
## Risk management parameters
##
## Portfolio-level and symbol-level risk limits to protect capital and prevent excessive losses.

RISK_PARAMETERS = {
    ## Maximum percentage of capital that can be exposed across all open positions (e.g., 90%)
    "max_portfolio_exposure": 90.0,
     
    ## Maximum number of consecutive losing trades before trading pauses for the symbol
    "max_consecutive_losses": 10,
     
    ## Maximum daily loss percentage per individual symbol before halting trades on that pair
    "max_daily_drawdown_per_symbol": 3.0,
     
    ## Maximum total loss percentage per symbol across all time (cumulative drawdown limit)
    "max_total_drawdown_per_symbol": 6.0,
     
    ## Maximum daily portfolio loss percentage before pausing all trading
    "max_daily_drawdown": 5.0,
     
    ## Maximum total portfolio loss percentage across all trading sessions (cumulative limit)
    "max_total_drawdown": 10.0
}

Pro Tip: Gebruik een Code-editor

Voor een veel betere ervaring bij het bewerken van configuratiebestanden, raden we aan een professionele code-editor zoals Visual Studio Code te gebruiken.

Download VS Code ↗