📖 Welcome to Queyn
Queyn is a forex simulation platform that lets you create custom market scenarios and test trading strategies in realistic conditions.
1. Quick Start
Queyn simulates the EUR/USD currency pair, generating 1-minute (M1) candles with realistic price movements.
Main Concept
Get started in just a few steps:
- Set your Candle Limit — choose the full 1440 candles (24 hours) or a custom amount (2-1439 candles)
- Configure your Starting Balance to match your trading capital
- Adjust Market Parameters to shape your scenario (volatility, trends, liquidity stress)
- Click "Start Scenario" to begin the simulation
- Use the controls to Pause, Resume, or Regenerate your scenario
Queyn also includes a special template session that simulates the 4-hour NY/London overlap period (8:00-12:00 EST - 240 candles). This preset captures the realistic price dynamics of these peak trading hours.
Additional Features
Queyn provides comprehensive tools to test and refine your trading strategies:
2. Foundation
Simulation-Based Learning
Practice trading without real money risk in controlled environments. Test strategies, learn market dynamics, and build confidence before risking capital in live markets.
Parametric Market Control
Control market conditions rather than being subject to random real markets. Adjust volatility, trends, and liquidity stress to create specific scenarios for targeted strategy testing.
Realistic Market Dynamics
Practice on dynamic bid-ask spreads that widen and narrow based on liquidity stress levels. Spreads expand when liquidity stress increases and tighten when stress decreases.
Synthetic Data Generation
Generate synthetic market data to complement backtesting. Create custom scenarios for specific market conditions that may be rare or absent in historical datasets, and fill the gaps in your testing coverage.
Configurable Scenarios
Create scenarios with precise parameter configurations for targeted testing. Simulate diverse market conditions on demand to test your strategies across multiple environments and avoid overfitting to a single scenario type.
Stochastic Variation
Run the same parameters multiple times to generate varied price paths while maintaining consistent market dynamics. Test your strategy across statistically similar but unique outcomes to ensure robustness.
3. Scenario Builder
User-Defined Parameters
Candle Limit
Choose how many 1-minute candles your scenario will generate:
- Maximum Limit: 1440 candles (24 hours)
- Custom Limit: 2-1439 candles (customize duration)
Speed Mode
Control how fast the scenario runs:
- Real-Time (x1): One candle per minute
- Fast Mode (x5): 5x faster generation
- Ultra Fast (x10): 10x faster generation
Market Parameters
Liquidity Stress
Controls spread widening and market depth. Higher values create more challenging trading conditions with wider spreads.
Bullish Trend
Weight towards upward price movement. Higher values increase the likelihood of bullish candles.
Bearish Trend
Weight towards downward price movement. Higher values increase the likelihood of bearish candles.
Ranging (Auto-calculated)
Automatically calculated as: 100% - Bullish% - Bearish%
Represents sideways/consolidation market behavior.
Volatility
Controls price movement magnitude. Higher values create larger candle bodies and wicks.
Tick Frequency
Controls how many price ticks occur per candle. Higher values create more granular price action.
Template Session
Queyn includes a special template session that simulates the 4-hour NY/London overlap period (8:00-12:00 EST - 240 candles). This preset captures the realistic price dynamics of these peak trading hours with increased volatility and liquidity.
Activation
The NY/London session can be activated before starting a scenario or applied during a running custom scenario. Once activated, all user-defined parameters become locked and cannot be manually adjusted.
Session Variability
Each activation generates a completely unique session. Stopping and restarting, regenerating, or resetting and reactivating will produce a different NY/London session with new price dynamics.
Real-Time Validation
The session displays real-time statistical indices (Skewness and Kurtosis) that validate the generated model's behavior during execution.
Save Scenario
Save generated scenarios to review later and build your own library.
When Scenarios Are Saved
- Candle Limit Reached: Automatic save prompt when scenario completes
- Manual Stop: Save prompt appears when you stop or regenerate a running scenario
- Switching: Option to save current progress before loading a saved scenario
Keyboard Shortcuts
4. Strategy Builder
Technical Indicators
Technical indicators are mathematical calculations based on price data that help identify trends, momentum, and potential entry/exit points.
Exponential Moving Average (EMA)
Weighted moving average that gives more importance to recent prices. Available periods: 5, 10, 20, and 50.
How it works: Takes the current price and the previous EMA value, then applies a weighting factor to emphasize recent price changes. Shorter periods (like EMA-5) react faster to price changes than longer periods (like EMA-50).
Relative Strength Index (RSI)
Momentum oscillator measuring the speed and magnitude of price changes. Values range from 0-100, with readings above 70 indicating overbought conditions and below 30 indicating oversold conditions.
How it works: Compares the average size of recent price gains to the average size of recent price losses over the last 14 candles. When gains consistently outweigh losses, RSI moves toward 100. When losses dominate, RSI moves toward 0.
MACD (Moving Average Convergence Divergence)
Trend-following momentum indicator showing the relationship between two moving averages. Consists of three components: MACD line, Signal line, and Histogram.
How it works: Compares a fast-moving average (12 periods) with a slow-moving average (26 periods). When the fast average crosses above the slow average, it signals upward momentum. The histogram shows the strength of this signal.
Bollinger Bands
Volatility indicator consisting of three lines that expand and contract based on price volatility. Includes a middle band (20-period average) with upper and lower bands.
How it works: The bands widen during volatile periods and narrow during calm periods. Price touching the upper band may indicate overbought conditions, while touching the lower band may indicate oversold conditions. Most price action occurs within the bands.
Drawing Tools
Visual analysis tools for marking key price levels and identifying patterns directly on the chart.
Why Use Drawing Tools?
- Support/Resistance: Identify price levels where buying or selling pressure tends to occur, causing price to bounce or reverse.
- Trend Analysis: Draw trendlines to visualize uptrends, downtrends, and channels.
- Pattern Recognition: Mark repeating price formations that traders use to anticipate future price movements.
- Trade Planning: Visualize entry points, stop losses, and profit targets before execution.
Available Tools
- Horizontal Line: Mark static price levels for support, resistance, or key price thresholds
- Trendline: Connect two price points to identify trend direction and potential breakout levels
- Vertical Line: Mark specific time points or candle indices for event analysis
- Fibonacci Retracement: Identify potential support/resistance levels based on Fibonacci ratios (23.6%, 38.2%, 50%, 61.8%, 78.6%)
Position Management
Execute and monitor trading positions with integrated risk controls and real-time profit/loss tracking.
Activation
Enable Position Management by activating Strategy Mode from the panel toggle. Once active, you can configure your trading setup.
Trading Configuration
Balance Options: Choose your starting capital from preset amounts: €1,000, €10,000, or €100,000.
Commission: Set the round-trip commission cost per lot. This represents the total cost to open and close a position.
Leverage: Select leverage ratio from 1:1 to 1:100, or trade without leverage. Higher leverage increases position size but also increases risk.
Opening Positions
Position Types:
- Market Order (Now): Executes immediately at current price. Buy orders execute at Ask price, Sell orders at Bid price.
- Limit Order (Pending): Executes when price reaches your target level. Buy limits must be placed below current Ask price, Sell limits above current Bid price.
Risk Configuration: Set your risk as a percentage of your current balance (0.1% - 5%). The system automatically calculates the appropriate lot size based on your risk percentage and stop loss distance.
Stop Loss (Required): Set your maximum loss in pips (5-500 pips). This determines your position size based on your risk percentage.
Take Profit (Optional): Set your profit target in pips (5-1000 pips). The system displays your reward:risk ratio when enabled.
Position Execution
When a position opens, two costs apply immediately:
- Commission: Full round-trip commission is deducted from your P&L at position opening
- Spread Cost: The difference between entry price and current market value creates immediate negative P&L
Visual Indicators: Open positions display on the chart with colored markers showing entry price, stop loss level, and take profit level (if set).
Risk Rules
Per-Position Risk: Maximum 5% of your current balance per trade. Your risk percentage determines lot size: Risk Amount = Balance × Risk% ÷ Stop Loss Distance.
Portfolio Risk Limit: Total risk exposure across all open and pending positions cannot exceed 10% of your equity. Equity = Balance + Unrealized P&L of all open positions.
Margin Requirements: Each position requires margin based on leverage. Available Margin = Current Equity - Used Margin. New positions require sufficient available margin.
Position Modification
Open and pending positions can be modified to adjust stop loss and take profit. Lot size cannot be changed once a position is created. Entry price can only be modified for pending limit orders, and must follow limit order rules (Buy below Ask, Sell above Bid).
Modification Rules:
- Stop loss modifications must maintain minimum 5 pips and maximum 500 pips from entry
- Take profit modifications must maintain minimum 5 pips and maximum 1000 pips from entry
- Modified risk must keep total portfolio risk below 10%
Balance Management
Dynamic Balance: Your balance updates only when positions close. Realized P&L (profits or losses) immediately affects your available balance for new positions.
Balance Floor: Balance can drop to €0 but never goes negative. At zero balance, position creation is disabled until you reconfigure.
Reconfiguration
Your trading configuration persists across sessions, allowing you to:
- Run multiple scenarios with the same settings
- Trade across different template sessions (e.g., NY - London overlap)
- Resume trading without reconfiguring each time
To modify your settings:
- Click "Reconfigure" to unlock your configuration
- Adjust balance, commission, or leverage as needed
- Lock the new configuration to apply changes
5. Data Export
Export scenario data as it generates in real-time, or download it after completion. Use it for AI training, backtesting, research, or whatever analysis you need.
Queyn focuses on market dynamics rather than absolute price levels.
Why Dynamics, Not Raw OHLC?
Queyn focuses on what actually matters for trading: dynamics, momentum, and rate changes. Raw OHLC prices add unnecessary complexity - you'll never see those exact price levels again in the market.
All scenarios start at normalized prices around 1.08500. Instead of absolute prices, you get the metrics that capture real market behavior: percentage returns, volatility swings, and spread fluctuations. These patterns repeat across different price levels and time periods.
By removing the complexity of absolute pricing, you can focus on recognizing behavioral patterns that are actually tradable and reusable in your strategies.
Export Metrics
- Price Return: Percentage change from previous candle close
- Price Swing: Normalized high-low range (candle volatility)
- Spread: Bid-ask spread in basis points
- Spread Change: Percentage change in spread from previous candle
- Timestamp: ISO 8601 format for each 1-minute candle
Export Formats
CSV Format
Clean tabular data for spreadsheets and analysis tools:
Timestamp,PriceReturn,PriceSwing,Spread,SpreadChange
2025-01-15T09:00:00.000Z,0.000234,0.000156,0.89,0.0234
2025-01-15T09:01:00.000Z,-0.000187,0.000203,0.92,0.0337
2025-01-15T09:02:00.000Z,0.000145,0.000178,0.88,-0.0435
...
JSON Format
Structured data with metadata for programmatic processing:
{
"metadata": {
"exportTime": "2025-01-15T12:34:56.789Z",
"recordCount": 1440,
"columns": ["timestamp", "priceReturn", "priceSwing", "spread", "spreadChange"],
"description": "Price and spread dynamics from QuenFX scenario",
"version": "1.0"
},
"data": [
{
"timestamp": "2025-01-15T09:00:00.000Z",
"priceReturn": 0.000234,
"priceSwing": 0.000156,
"spread": 0.89,
"spreadChange": 0.0234
},
...
]
}
How to Export
- Complete a scenario or view a saved scenario
- Open the Strategy Builder panel in the right sidebar
- Click "Export Data"
- Choose your format: CSV or JSON
- Download begins automatically
6. Bot API
Connect your trading bots or algorithmic systems to receive real-time price data via WebSocket. The Bot API streams live tick data and candle updates as scenarios generate.
API Key Management
Generating API Keys
- Click "Connect Trading Bot" in the right panel
- Click "+ Generate New API Key"
- Enter a descriptive name (e.g., "Python Trading Bot")
- Click "Generate"
- Copy and save your API key immediately - it won't be shown again
Subscription Tiers
Free Tier
- 300 candles per day (resets every 24 hours)
- 300 candles per scenario
- 3 saved scenarios
- 1 bot API key
- 1 concurrent bot connection
Pro Tier
Starting at $19.99/month or $199/year (pricing varies by region)
- Unlimited candles per day
- 1,440 candles per scenario
- 30 saved scenarios
- 3 bot API keys
- 5 concurrent bot connections
Upgrade in Settings → Billing
Revoke unused keys to generate new ones if you reach your limit.
Key Status
- Connected: Key is actively streaming data to a bot
- Never Used: Key has been generated but never connected
- Revoked: Key has been disabled and cannot be used
WebSocket Connection
Connect to the WebSocket endpoint with your API key:
wss://api.queyn.com/bot?key=YOUR_API_KEY
Message Format
The server streams real-time price updates in JSON format:
{
"type": "tick",
"data": {
"bid": 1.08534,
"ask": 1.08544,
"spread": 1.0,
"timestamp": 1697123456789
}
}
Python Example
Basic WebSocket client using the websocket-client library:
import websocket
import json
def on_message(ws, message):
data = json.loads(message)
if data['type'] == 'tick':
bid = data['data']['bid']
ask = data['data']['ask']
print(f"Bid: {bid}, Ask: {ask}")
def on_error(ws, error):
print(f"Error: {error}")
def on_close(ws, close_status_code, close_msg):
print("Connection closed")
def on_open(ws):
print("Connected to Queyn Bot API")
# Replace YOUR_API_KEY with your actual key
ws = websocket.WebSocketApp(
"wss://api.queyn.com/bot?key=YOUR_API_KEY",
on_message=on_message,
on_error=on_error,
on_close=on_close,
on_open=on_open
)
ws.run_forever()
Revoking Keys
To revoke an API key:
- Open the Bot API panel
- Find the key you want to revoke
- Click "Revoke Key"
- Confirm the action
Revoked keys are moved to a separate "Revoked Keys" section and cannot be reactivated. Any bots using a revoked key will be disconnected immediately.
- Real-time strategy testing with live data
- Training reinforcement learning models
- Building custom trading indicators
- Market microstructure analysis
7. Frequently Asked Questions
How realistic is the price data?
Queyn simulates EUR/USD market dynamics including responsive spreads, momentum patterns, and volatility clustering that mirror the pair's statistical behavior. Each scenario generates unique price sequences that capture key forex behaviors - spreads widen during stress, volatility clusters naturally, and prices show both momentum and mean reversion.
The value is in generating diverse training conditions instantly. Professional traders wait years to encounter rare market scenarios. Queyn lets you create volatility spikes, liquidity crises, and trend reversals on demand, then test how your strategy responds.
Like all synthetic data, it's designed to supplement, not replace historical testing. Use it to stress-test strategies across conditions that may not exist in your historical dataset, train pattern recognition on varied regimes, and avoid overfitting to specific past sequences.
Why use synthetic data when historical data exists?
Historical data has limitations for training and testing:
- Overfitting Risk: Models trained on historical data often memorize specific patterns rather than learning generalizable behaviors. Synthetic data with varied conditions prevents this.
- Limited Scenarios: History only captures what happened, not what could happen. Synthetic data lets you test edge cases and rare market conditions.
- Supplementing Backtesting: Use synthetic data alongside historical backtesting to validate that your strategy works across diverse market regimes, not just past patterns.
- Data Augmentation: Generate thousands of training scenarios with different volatility, trend, and liquidity conditions to build robust models.
How do I validate if my generated data is realistic?
Here are some validation strategies:
- Price Return Distribution: Calculate the percentage change between candles. Real markets show occasional extreme moves (fat tails), not perfectly smooth bell curves.
- Volatility Clustering: Check if big price swings tend to follow other big swings, and calm periods follow calm periods - this clustering happens in real markets.
- Spread Behavior: Verify that spreads respond to market stress and liquidity - they widen during rapid price changes, uncertainty, or low trading activity.
- Price Charts: Does the chart look like real forex data? Check for realistic candlestick patterns and price action.
- Momentum Patterns: Look for realistic trend persistence followed by mean reversion.
The NY/London Overlap template session is validated against empirical forex behavior using:
- Skewness = E[(X - μ)³] / σ³ → Target: -1.0 to +1.0 (mild asymmetry typical in forex)
- Kurtosis = E[(X - μ)⁴] / σ⁴ → Target: 3-7 (fat tails indicating extreme moves)
- Jarque-Bera = (n/6) × [S² + (K-3)²/4] → Target: JB > 5.99 (reject normality at 5% significance, like real markets)
Where:
- X = price return (percentage change between candles)
- μ = mean (average) of returns
- σ = standard deviation (measure of spread)
- E[...] = expected value (average)
- S = skewness value
- K = kurtosis value
- n = number of data points (candles)
Real-time statistics display these metrics during generation, confirming data quality against established forex patterns.
How do I train my algorithm using Queyn data?
Technical Approach
- Generate Training Scenarios: Create scenarios with different parameter combinations (varying volatility, trend strength, liquidity stress)
- Export Data: Download CSV or JSON exports with dynamics metrics (returns, swings, spreads)
- Feature Engineering: Use the exported metrics (priceReturn, priceSwing, spreadChange) as model features or create derived features
- Split Data: Use 70% of scenarios for training, 30% for validation
- Cross-Validation: Test your model across different volatility regimes to ensure robustness
Strategic Approach
- Regime-Based Training: Train separate models for different market conditions (trending, ranging, high volatility). Use Queyn's parameter controls to generate targeted datasets for each regime.
- Adversarial Testing: Generate extreme scenarios (high stress, wide spreads) to stress-test your algorithm. If it performs well in Queyn's worst-case scenarios, it's more likely to survive real market shocks.
- Incremental Learning: Start with simple ranging scenarios, then gradually introduce trend and volatility. This helps identify which market conditions your algorithm handles poorly.
- Spread-Aware Strategies: Use Queyn's spread dynamics to train algorithms that account for transaction costs. Many backtests fail because they ignore realistic spreads.
- Pattern Recognition: Generate hundreds of scenarios to find recurring patterns in price action that persist across different parameter settings—these are more likely to generalize to real markets.
Can I use this for live trading signals?
No. Queyn is designed for educational purposes, strategy development, and testing—not for generating live trading signals. The data simulates realistic market behavior but cannot predict actual future price movements.
Use Queyn to:
- Develop and refine your trading logic
- Test how strategies handle different market conditions
- Train machine learning models on diverse scenarios
- Practice risk management and execution
Once your strategy shows promise in Queyn testing, validate it thoroughly with historical data and paper trading before considering live deployment.
How often should I regenerate training data?
Continuously throughout your development process. Think of Queyn as a testing lab, not a one-time data download.
Regeneration Schedule:
- After Strategy Changes: Generate 10-20 new scenarios whenever you modify logic, parameters, or risk rules to verify improvements didn't break other conditions
- Weekly Training Refreshes: If actively developing ML models, generate fresh training batches weekly to prevent memorization of specific sequences
- Regime Testing: When adding filters for specific market conditions (trending, volatile, etc.), generate targeted scenarios to validate the new logic
- Stress Testing: Before finalizing a strategy version, generate extreme scenarios (high stress, wide spreads, rapid reversals) you haven't tested yet
The goal is iterative validation. Each strategy modification should face new market conditions to ensure robustness rather than overfitting to previously generated data.