Skip to main content
Configuration is done in the config.lua file located in the revo_stocktrading directory.

UI Opening Methods

Enable opening the trading UI via command or inventory item:
Config.UseCommand = true -- Allow opening UI with command
Config.OpenCommand = 'trade' -- Command to open the Revo Trade UI

Config.UseItem = true -- Allow opening UI with item
Config.ItemName = 'revo_trading_tablet' -- Item name for opening UI (if UseItem is true)

Liquidation & Risk Control

Set the margin level at which all open trades are liquidated:
Config.LiquidationMarginLevel = 50 -- percent (liquidate at 50% margin level)

Charting Library

Revo Stock Trading uses lightweight charts as the primary charting library, which provides fast performance and essential trading features. For advanced charting capabilities, Highcharts integration is also supported.

Default Configuration (Lightweight Charts)

Config.ChartLibrary = "lightweight" -- Default: fast and lightweight
Config.HighChartsBaseURL = "" -- Leave empty for lightweight charts

Highcharts Integration (Advanced Features)

For advanced charting features like candlestick charts, technical indicators, and detailed market analysis, you can integrate Highcharts:
Config.ChartLibrary = "highcharts" -- Enable Highcharts
Config.HighChartsBaseURL = "https://cdn.highcharts.com" -- Your Highcharts CDN URL
Important: Highcharts is not included with Revo Stock Trading. We do not bundle licensed libraries in our scripts to avoid legal complications.Highcharts requires a commercial license for commercial use. Before using Highcharts:
  1. Check your usage: Determine if your FiveM server qualifies as commercial use
  2. Get proper license: Visit Highcharts Licensing to purchase appropriate license
  3. Use licensed CDN: Use your licensed Highcharts CDN URL (without any path after /)
  4. Compliance: Ensure compliance with Highcharts terms of service
We recommend: Start with lightweight charts and upgrade to Highcharts only if you have proper licensing.
The lightweight chart library provides excellent performance and covers most trading needs without licensing requirements.

Permissions

Set which groups/roles can access the Stock Management UI:
Config.AllowedGroups = {
    admin = true,
    superadmin = true,
    god = true
}

Notification Position

Choose where notifications appear on the screen:
Config.NotificationPosition = 'top-center'
Available positions:
'top-left', 'top-right', 'top-center', 'bottom-left', 'bottom-right', 'bottom-center', 'center-left', 'center-right', 'center-center'

Fixed Leverages

Set leverage values for different asset types:
Config.FixedLeverages = {
    stock = 10,
    crypto = 25,
    forex = 100,
    commodity = 30
}

Contract Sizes

Set contract sizes for different asset types:
Config.ContractSizes = {
    forex = 100000,
    stock = 100,
    commodity = 1000,
    crypto = 1
}

Deposit & Withdraw Limits

Set minimum deposit and withdrawal amounts:
Config.MinimumDeposit = 500
Config.MinimumWithdraw = 20

Localization

Set the default language and customize all UI text:
Config.DefaultLocale = 'en'
Supported languages: 'en', 'es', 'fr', 'de', 'it', 'pt', 'ru', 'tr', 'pl', 'zh', 'ar' Customize all UI text in the Config.Locales table.
Adjust leverages, contract sizes, permissions, and localization to fit your server’s needs. For Highcharts, make sure to provide a valid library URL if you choose that option.
I