TraderLotSizeChoice
- Utilità
- Abraham Correa
- Versione: 1.0
It computes BUY and SELL lot sizing in either % of balance or in fixed intervals. In market orders, this EA contains the adaptive slippage, logs tickets for instant confirmation of opening trades, and contains every market symbol at a glance. Real-time balance/equity display keeps margin health in view without tab-switching, toggling spread if needed for liquidity checks. Compact left-panel layout minimizes screen real estate, empowering blind trades where speed trumps overanalyze—perfect for high-frequency setups where every second counts.
Key Advantages
- Zero Visual Noise: Full chart blackout hides price action distractions, training pure decision-making on risk and direction.
- Risk-Smart Sizing: Auto-calculates lots from % risk or fixed presets, enforcing discipline without manual math mid-flow.
- One-Click Execution: BUY/SELL deploys orders at market with broker-tuned slippage—no forms, no delays.
- Live Monitoring: Optional equity/balance ticker updates every second, spotting drawdown early.
- Customizable Fit: Tweak colors, fonts, offsets, and visibility for your multi-monitor rig—compiles clean on any MT4 build.
Features
- Risk % Buttons: Five presets (0.05% to 3%) for quick balance-proportional lots.
- Fixed Lot Buttons: Five hardcoded sizes (0.05 to 2.0) for consistent position scaling.
- Lot Display: Bold, prominent label shows selected size or placeholder prompt.
- Trade Logging: Console prints success/failure with ticket numbers for journaling.
- Info Stack: Stacked labels for balance/equity (always on by default); spread toggle for cost-aware entries.
- Panel Scaling: Auto-resizes to 80% chart width/35% height, with pixel-perfect offsets.
Input Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| PanelWidthRatio | double | 0.80 | Ratio of chart width for panel (0.1-1.0; higher = wider panel). |
| PanelHeightRatio | double | 0.35 | Ratio of chart height for panel (0.1-1.0; higher = taller panel). |
| PanelXGap | int | 5 | Horizontal gap from chart left edge (pixels; adjust for border padding). |
| PanelYGap | int | 10 | Vertical gap from chart top (pixels; fine-tune for title clearance). |
| FontSizeBase | int | 14 | Base font size for labels/buttons (8-24; scales all text uniformly). |
| LotFontSize | int | 25 | Oversized font for lot display (14-40; emphasizes selected size). |
| FontNameBase | string | "Arial Bold" | Font family for all elements (e.g., "Verdana" for crispness). |
| BuyButtonBGColor | color | clrLimeGreen | Background color for BUY button (green tones for bullish vibe). |
| BuyButtonTextColor | color | clrWhite | Text color for BUY button (contrasts BG for readability). |
| SellButtonBGColor | color | clrRed | Background color for SELL button (red for bearish alert). |
| SellButtonTextColor | color | clrWhite | Text color for SELL button. |
| RiskButtonBGColor | color | clrBrown | Background for risk % buttons (earthy for conservative sizing). |
| RiskButtonTextColor | color | clrWhite | Text color for risk buttons. |
| FixedLotButtonBGColor | color | clrOliveDrab | Background for fixed lot buttons (muted green for stability). |
| FixedLotButtonTextColor | color | clrWhite | Text color for fixed lot buttons. |
| InfoTextColor | color | clrWhite | Color for all info labels (white pops on black BG). |
| RiskPercent1 to RiskPercent5 | double | 0.05, 0.25, 1.00, 2.00, 3.00 | Custom % risk levels for buttons (0.01-5.0; low for micros, high for swings). |
| FixedLot1 to FixedLot5 | double | 0.05, 0.10, 0.50, 1.00, 2.00 | Preset lot sizes (0.01 to 100; match your broker's min/max). |
| ShowBalanceEquity | bool | true | Enable/disable stacked balance/equity display (true hides nothing, false compacts panel). |
| ShowLiveSpread | bool | false | Toggle live spread label (false by default; useful for ECN cost tracking). |
| TitleOffsetX/Y | int | 120, 0 | X/Y shift for symbol title (pixels; center or nudge as needed). |
| RiskOffsetX/Y | int | 0, 0 | X/Y shift for risk button row. |
| FixedLotOffsetX/Y | int | 0, 0 | X/Y shift for fixed lot button row. |
| LotOffsetX/Y | int | 0, 0 | X/Y shift for lot size label (key for visibility tweaks). |
| BuySellOffsetX/Y | int | 10, 0 | X/Y shift for BUY/SELL buttons (align horizontally). |
| InfoOffsetX/Y | int | 60, 0 | X/Y shift for info labels (stack neatly below buttons). |
