Trade Planner Risk Calculator Panel
- Utilities
-
Thomas Edelbroek
Trading since 2016 and interested in automated trading since the end of 2016. Started my own business 'Startenmettraden.nl' and start-with-trading.com' to help others to succeed in trading as well. - Version: 1.0
- Activations: 5
SMT Trade Planner is a professional on-chart risk calculator and trade execution panel for MetaTrader. It calculates lot sizes based on your risk settings, displays visual Entry, Stop Loss and Take Profit lines that you can drag directly on the chart, validates your trade against configurable risk rules, and lets you execute trades with one click.
How it works
Attach the Trade Planner to any chart. The panel displays your account information and a set of quick-select risk buttons. Three horizontal lines appear on the chart representing your Entry price (blue), Stop Loss (red) and Take Profit (green). Drag any line to adjust the trade setup. All calculations update in real time as you move the lines. The direction is automatically detected based on the SL position relative to entry. When you are satisfied with the setup, click BUY or SELL to execute the trade with the calculated lot size, SL and TP.
Panel Sections
Account: Real-time display of balance, equity and free margin with automatic currency symbol detection. Risk Settings: Four quick-select buttons (default 0.5%, 1.0%, 1.5%, 2.0%) to set your risk percentage. The risk amount is displayed in your account currency. Trade Plan: Shows direction (LONG or SHORT with manual toggle), entry price, SL price and distance in pips, TP price and distance in pips. A LINK toggle keeps the SL/TP ratio locked when dragging lines. Lot Size: Calculates optimal lot size based on risk percentage and SL distance. Always rounds down to the broker lot step so you never exceed your intended risk. Displays a warning if the minimum lot exceeds your risk target. Analysis: SL loss amount including spread and commission, TP profit amount net of costs, spread cost, commission cost, gross R:R ratio and net R:R ratio. Warns when trading costs significantly degrade the R:R. Spread Monitor: Current spread in pips and account currency. Color-coded green (normal), orange (above average) and red (high) based on a rolling 100-tick average. Risk Rules: Each rule shows PASS or FAIL with the current value. Minimum R:R, maximum risk percentage, maximum lot size, minimum and maximum SL distance, minimum TP distance. Execution Buttons: BUY and SELL with calculated parameters. CLOSE ALL closes all positions on the current symbol. RESET moves lines back to default positions. HIDE LINES toggles line visibility for a clean chart view.
Key Features
Visual trade planning with draggable Entry, SL and TP lines that update all calculations live. Linked SL/TP mode that maintains the risk/reward ratio when dragging the entry line. Automatic pip value calculation for all instrument types including forex, JPY pairs, gold and indices. Net R:R calculation that accounts for spread and commission costs. Configurable risk rule engine with optional trade blocking when rules fail. One-click trade execution with pre-filled lot size, SL and TP. Two color themes (Dark and Light) with adjustable panel position and scale.
Input Parameters
Color_Theme: 0 for Dark, 1 for Light. PanelCorner: Panel position (0=Top-Right, 1=Top-Left, 2=Bottom-Right, 3=Bottom-Left). PanelScale: 0=Small, 1=Medium, 2=Large. Default_Risk_Percent (default 1.0): Starting risk percentage from 0.1 to 10.0. QuickRisk_1 through QuickRisk_4: Values for the four quick-select buttons. Default_SL_Pips (default 30): Initial stop loss distance. Default_TP_Pips (default 50): Initial take profit distance. Commission_Per_Lot (default 0): Commission per lot per side in account currency. Spread_Warning_Pips (default 3): Threshold for the high spread warning. EnableRiskRules: Toggle the entire rule engine. Rule_MinRR (default 1.5): Minimum reward to risk ratio. Rule_MaxRiskPercent (default 2.0): Maximum risk percentage allowed. Rule_MaxLots (default 5.0): Maximum lot size allowed. Rule_MinSL_Pips (default 10): Minimum SL distance. Rule_MaxSL_Pips (default 100): Maximum SL distance. Rule_MinTP_Pips (default 10): Minimum TP distance. Rule_BlockTrade: Disable BUY and SELL buttons when rules fail. MagicNumber (default 202601): Order identification number. Slippage (default 3): Maximum slippage in points. EntryLine_Color, SL_Line_Color, TP_Line_Color: Line colors.
Recommended Settings
Works on all instruments and timeframes. Set Commission_Per_Lot according to your broker (check the contract specification for your instrument). Start with the default risk rules enabled and adjust the thresholds to match your trading plan. Use the LINK toggle to maintain your R:R when adjusting entry prices.
Important Notes
This is an Expert Advisor that requires trade execution permissions (Allow Algo Trading must be enabled). The lot size calculation always rounds down to ensure you never exceed your intended risk. The risk rules engine is a planning aid and does not replace proper risk management. Past trading results do not guarantee future performance.
