Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Roni-quant/WorkspaceRandomizer

Repository files navigation

MultiCharts Workspace Randomizer

A desktop tool that generates randomized MultiCharts workspace files (.wsp) for strategy development — helping traders avoid overfitting by testing strategies across random assets, timeframes, and date ranges.

The Problem

When developing trading strategies, it's easy to overfit to a specific asset, timeframe, or date range. If you always backtest BTCUSDT on 1H from 2021-2023, your strategy learns that data rather than discovering robust patterns.

The Solution

This tool randomizes the development environment across multiple markets:

  • Multi-market support — Crypto, Futures, Forex, Stocks, or any custom market category
  • Random asset — picked from the selected market's asset pool
  • Random timeframe — each market has its own valid timeframes
  • Random date range — market-specific earliest dates with configurable development periods
  • One-click workspace generation — creates a ready-to-open .wsp file for MultiCharts

Select a specific market or "All Markets" to randomize across everything. Click "Randomize" to get a new combination, then "Generate WSP" to create the workspace and start developing.

Quick Start

git clone https://github.com/Roni-quant/WorkspaceRandomizer.git
cd WorkspaceRandomizer
pip install -r requirements.txt
python main.py

Requires Python 3.9+ and MultiCharts installed to open the generated workspace files.

Usage

  1. Select market — choose a specific market from the dropdown, or "All Markets" for full randomization
  2. Randomize — generates a random asset, timeframe, and date range from the selected market
  3. Generate WSP — creates a MultiCharts workspace file with those parameters
  4. Settings — add/remove markets and configure each market's assets, timeframes, and periods

All settings are persisted in config.json.

Configuration

Each market has its own independent configuration. Edit config.json directly or use the Settings UI:

{
 "markets": {
 "Crypto": {
 "assets": ["BTCUSDT", "ETHUSDT", "SOLUSDT"],
 "time_frames": ["15min", "60min", "240min", "1440min"],
 "development_periods": ["1 year", "1.5 years", "2 years"],
 "initial_possible_date": "01.01.2020"
 },
 "Futures": {
 "assets": ["ES", "NQ", "CL", "GC"],
 "time_frames": ["60min", "240min", "1440min"],
 "development_periods": ["2 years", "3 years", "5 years"],
 "initial_possible_date": "01.01.2005"
 },
 "Forex": {
 "assets": ["EURUSD", "GBPUSD", "USDJPY"],
 "time_frames": ["15min", "60min", "240min", "1440min"],
 "development_periods": ["1 year", "2 years", "3 years"],
 "initial_possible_date": "01.01.2010"
 }
 },
 "workspace_template_path": "default_template.wsp"
}
Field Description
markets Dictionary of market categories, each with its own settings
assets Trading symbols available for randomization in that market
time_frames Bar intervals (in minutes)
development_periods How long each backtest period should be
initial_possible_date Earliest possible start date for random ranges
workspace_template_path Global MultiCharts .wsp template used as base

You can add any market category (Stocks, Commodities, Indices, etc.) through the Settings UI or by editing config.json.

Building an Executable

pip install pyinstaller
pyinstaller --onefile --add-data "config.json;." --add-data "default_template.wsp;." --add-data "ricon.png;." main.py

The standalone .exe will be in the dist/ directory.

Project Structure

src/
 config.py # Configuration loading, MarketConfig, auto-migration
 randomizer.py # Randomization logic (per-market and cross-market)
 workspace.py # MultiCharts .wsp file generation from template
 app.py # Application entry point
 ui/
 theme.py # UI color scheme and fonts
 widgets.py # Custom rounded button widget
 main_window.py # Main window with market selector
 settings_window.py # Multi-market settings dialog
tests/
 test_config.py
 test_randomizer.py
 test_workspace.py
config.json # Multi-market configuration
default_template.wsp # MultiCharts workspace template
main.py # Launcher

License

MIT

About

A desktop tool that generates randomized MultiCharts workspace files (.wsp) for strategy development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /