Configuration¶
This guide covers all configuration options for the RQF-ML system.
Pine Script Settings¶
Core Settings¶
| Parameter | Default | Range | Description |
|---|---|---|---|
pivotLen | 5 | 2-20 | Pivot detection sensitivity for H/L labels |
structureLen | 20 | 5-50 | Structure detection for BoS/MSS |
lookback | 250 | 50-500 | Bars to track for drawings |
Timeframe Guidance
- Scalping (1-5m):
pivotLen=4,structureLen=15 - Intraday (15m-1H):
pivotLen=5,structureLen=20 - Swing (4H-D):
pivotLen=7,structureLen=30
Equal Highs/Lows¶
| Parameter | Default | Description |
|---|---|---|
showEQHL | true | Show EQH/EQL lines |
eqThresholdATR | 0.3 | ATR multiplier for "equal" definition |
eqLookbackBars | 50 | Bars to search for equal levels |
RQF Sweep System¶
| Parameter | Default | Description |
|---|---|---|
showSweep | true | Show S1, S2... labels |
showTrigger | true | Show TH/TL trigger lines |
showFailedMss | true | Show f1, f2... failed MSS labels |
showEntrySignal | true | Show entry signals |
sweepTimeout | 100 | Max bars to wait for sweep/MSS |
Fibonacci Settings¶
| Parameter | Default | Description |
|---|---|---|
showFib | true | Show Fib levels |
showDiscountBox | true | Show zone boxes |
fibExtendBars | 50 | Bars to extend Fib |
Confluence (OB/FVG)¶
| Parameter | Default | Description |
|---|---|---|
showOB | true | Show Order Blocks |
showBreakers | true | Convert broken OBs to Breakers |
showFVG | true | Show Fair Value Gaps |
fvgFilterZone | true | Only FVGs in discount/premium |
fvgMaxCount | 3 | Maximum FVGs displayed |
obExtendBars | 30 | Bars to extend OB box |
obMaxSearch | 50 | Bars to search for OB |
fvgMinSize | 0.5 | Minimum FVG size (ATR mult) |
Python Configuration¶
Edge Config (config/edge_config.yaml)¶
# Confluence scoring weights
edge_stack:
quality_weight: 0.4 # Pattern quality (OB, FVG presence)
time_weight: 0.2 # Session-based edge
sweep_weight: 0.2 # Sweep quality (wick ratio)
nested_weight: 0.1 # Nested OB bonus
htf_weight: 0.1 # HTF alignment bonus
# Backtest settings
backtest:
initial_capital: 10000
commission_per_trade: 0.50
slippage_ticks: 1
position_size: 1
# ML model settings
model:
type: lightgbm
params:
n_estimators: 200
max_depth: 6
learning_rate: 0.05
min_child_samples: 20
subsample: 0.8
colsample_bytree: 0.8
# Validation gates
gates:
min_sharpe_oos: 0.8
max_drawdown: 0.08
min_win_rate: 0.50
min_profit_factor: 1.3
walk_forward_pct: 0.60
Risk Configuration¶
Create config/risk_limits.yaml:
# Position limits
max_position_size: 2 # contracts/lots
max_concurrent_positions: 3
max_daily_trades: 10
# Loss limits
max_daily_loss_pct: 3.0 # % of capital
max_total_drawdown_pct: 6.0 # % of capital
consecutive_loss_limit: 5
# Per-trade limits
max_risk_per_trade_pct: 1.0 # % of capital
min_rr_ratio: 1.5 # minimum reward:risk
# Kill switch triggers
kill_switch:
enabled: true
daily_loss_trigger: 3.0 # % loss triggers kill switch
spread_anomaly_mult: 5.0 # spread > 5x normal
connection_timeout: 60 # seconds
Environment Variables¶
Create .env from .env.example:
# API Keys
TRADINGVIEW_WEBHOOK_SECRET=your_secret_here
MT5_LOGIN=your_login
MT5_PASSWORD=your_password
MT5_SERVER=your_broker_server
# Notification channels
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id
# Data sources
FIRSTRATE_API_KEY=your_api_key
# Environment
ENVIRONMENT=development # development, paper, live
LOG_LEVEL=INFO
Security
Never commit .env to version control. It's in .gitignore by default.
Instrument-Specific Settings¶
Futures - Equity Index¶
| Instrument | Tick Size | SL Buffer (ticks) | Session |
|---|---|---|---|
| MNQ, NQ | 0.25 | 5 | NY AM |
| MES, ES | 0.25 | 5 | NY AM |
| MYM, YM | 1.0 | 5 | NY AM |
| M2K, RTY | 0.10 | 5 | NY AM |
Futures - Commodities¶
| Instrument | Tick Size | SL Buffer (ticks) | Session |
|---|---|---|---|
| GC, MGC | 0.10 | 10 | London/NY |
| SI | 0.005 | 10 | London/NY |
| CL, MCL | 0.01 | 10 | NY |
Crypto¶
| Instrument | Tick Size | SL Buffer (ticks) | Session |
|---|---|---|---|
| BTCUSD | 0.01 | 50 | 24/7 |
| ETHUSD | 0.01 | 50 | 24/7 |
| SOLUSD | 0.01 | 30 | 24/7 |
Forex¶
| Instrument | Tick Size | SL Buffer (pips) | Session |
|---|---|---|---|
| EURUSD | 0.00001 | 10 | London/NY |
| GBPUSD | 0.00001 | 12 | London/NY |
| USDJPY | 0.001 | 10 | Tokyo/London |
Session Configuration¶
Kill Zones (NY Time)¶
sessions:
asia:
start: "20:00"
end: "00:00"
quality: low
color: blue
london:
start: "02:00"
end: "05:00"
quality: medium
color: red
ny_am:
start: "08:30"
end: "11:00"
quality: high
color: teal
ny_lunch:
start: "12:00"
end: "13:00"
quality: avoid
color: yellow
ny_pm:
start: "13:30"
end: "16:00"
quality: medium
color: purple
Best Sessions
NY AM (08:30-11:00 ET) has the highest edge based on backtesting.
Claude Code Skills Configuration¶
Skills are configured in .claude/skills/[skill-name]/SKILL.md.
Frontmatter Options¶
---
name: skill-name # Required
description: "When to use" # For auto-invocation
disable-model-invocation: true # Manual only
user-invocable: false # Hide from menu
argument-hint: [args] # Autocomplete hint
allowed-tools: Read, Grep # Tool restrictions
context: fork # Isolated context
agent: Explore # Subagent type
model: sonnet # Force model
---
See Creating Skills for full documentation.