Totz Visual Risk Calculator
- Utilitaires
- Version: 1.6
📌 Project Overview
Totz Visual Risk Calculator EA is an interactive, on-chart Risk Management panel for MetaTrader 5 (MT5). It replaces manual position size calculations by automatically computing appropriate lot sizes based on visual, draggable Entry, Stop Loss (SL), and Take Profit (TP) lines.
Key Features
-
Automated Risk Calculation: Lot sizing automatically adjusts to target a specific percentage of account balance or equity.
-
Interactive Visual Lines: Drag-and-drop horizontal lines directly on the chart to set Entry, SL, and TP.
-
One-Click Execution: Instant market orders, pending stops, and limit orders directly from the dashboard panel.
-
Trade Management: Emergency "Close All" button for quick risk mitigation.
-
Anti-Flood Protection: Cooldown timer prevents accidental order spamming.
-
Telegram Integration: Instant order and alert notifications sent to your Telegram chat.
🛠️ How to Install
-
Open MT5 Data Folder:
-
Open MetaTrader 5.
-
Go to File → Open Data Folder.
-
-
Place the File:
-
Navigate to MQL5 → Experts .
-
Paste your VisualRiskCalculator_EA.mq5 file into this folder.
-
-
Compile the EA:
-
Return to MT5 and press F4 to open the MetaEditor.
-
In MetaEditor, find VisualRiskCalculator_EA.mq5 in the Navigator panel on the left and double-click it.
-
Click the Compile button at the top (or press F7 ). Ensure there are no red errors.
-
-
Allow WebRequest (Required for Telegram Alerts):
-
Go back to MT5 → Tools → Options → Expert Advisors.
-
Check Allow WebRequest for listed URL.
-
Add: [https://api.telegram.org](https://api.telegram.org) to the allowed URL list.
-
Check Allow Algo Trading.
-
-
Attach to Chart:
-
In MT5, open the Navigator ( Ctrl + N ).
-
Drag VisualRiskCalculator_EA onto any chart.
-
🎮 How to Use
1. Setting Up Inputs
When attaching the EA, set your desired inputs:
-
Risk Percent ( InpRiskPercent ): Percentage of your account balance to risk per trade (e.g., 1.0 for 1%).
-
Telegram Settings: Enter your InpTGToken and InpTGChatID if you want alerts enabled.
2. Chart Interaction
-
Adjusting Levels: Click and drag the on-chart Entry, SL, or TP horizontal lines. The dashboard will instantly update the calculated lot size, cash risk, cash reward, and Risk-to-Reward ratio.
-
Toggling Mode: Click the MODE: BUY / SELL button on the panel to flip between Buy and Sell modes.
3. Executing Orders
Click any of the panel buttons to execute your setup:
-
EXECUTE INSTANT ORDER: Opens a market trade immediately using current Ask/Bid prices and calculated position size.
-
PLACE PENDING STOP: Places a Buy Stop or Sell Stop pending order at your drawn Entry line.
-
PLACE REVERSAL LIMIT: Places a Buy Limit or Sell Limit pending order at your drawn Entry line.
-
CLOSE ALL POSITIONS: Closes all active open positions on the current symbol.
