One Trade Risk Selector with Type and Trail
- Experts
- Jorge Blanco Iniesta
- Versione: 2.1
One Trade Risk Selector with Order Type and Trail(MT5)
One Order Risk Selector with Order Type and Trailing stop, as optional (MT5) is a powerful, smart and simple execution Expert Advisor (EA) designed to provide precise risk management for MetaTrader 5 traders. It allows for a single trade with selected risk, order type ,configurable stop loss, optional take profit and optional trailing stop settings, making it ideal for disciplined traders who want to keep accurate risk per trade.
✅ Key Features
-
Risk-Based Lot Calculation
Automatically calculates the optimal lot size based on your stop loss and risk percentage per trade. Prevents overleveraging and helps you maintain a safe risk-to-reward ratio. -
One-Time Entry
Only one trade is allowed per EA session-load, ensuring that overtrading and emotional decisions (like revenge trading) are avoided.
If you want to place another trade, you need to load the EA again (drag and drop or from the ¨Navigator¨ folder, or ¨Insert-Experts¨tab in MT5 platform). It helps with keeping accurate risk per trade when manual trading , helping with automating the lot size based on your selected risk per trade, keeping accurate risk per trade, with the addition of managing trailing stop if selected. -
Optional Take Profit (TP)
Offers both a fixed TP based on user input and dynamic TP calculation using a customizable reward-to-risk (R:R) ratio. The trade will close once the TP is hit, securing profits. -
Optional Trailing Stop
Activates a trailing stop when the position reaches a predefined profit level, locking in profits as the trade moves in your favor. -
Order Type Flexibility
Choose between Market, Limit, or Stop orders to suit your trading strategy. It can handle both pending and immediate executions. -
Price Validation & Risk Control
Ensures that the stop loss is logically placed (e.g., below buy price or above sell price) and that no order is placed if the risk parameters are invalid or violate broker restrictions.
⚙️ Inputs & Parameters
-
Trade Configuration
-
TradeDirection: Buy or Sell – Choose the trade direction.
-
OrderType: Select the type of order: MarketOrder, LimitOrder, or StopOrder.
-
StopLossPrice: Absolute stop loss price.
-
RiskPerTrade: Percentage of account balance to risk (e.g., 1.0 = 1%).
-
PendingOrderEntryPrice: Entry price for pending orders (Limit/Stop only).
-
-
Take Profit (TP)
-
UseTakeProfit: Enable/disable TP.
-
UseTP_RR: Use reward-to-risk ratio instead of manual price.
-
RewardToRiskRatio: Set R:R multiplier (e.g., 2.0 = TP at 2× SL).
-
TakeProfitPrice: Manual TP price (only used if UseTP_RR is false).
-
-
Trailing Stop
-
UseTrailingStop: Enable/disable trailing SL.
-
TrailTriggerPoints: Activate trailing only after X points in profit.
-
TrailStopPoints: Distance from current price to SL.
-
TrailStepPoints: SL update step in points.
-
💡 Best Use Cases
-
Swing trades where precise risk management and controlled risk exposure are essential.
-
News trades where you need to control lot sizes and risk per trade.
-
Long-term trades based on high-confidence setups, requiring only one trade per session.
🧠 Notes
-
SL Positioning: Stop loss must be on the correct side of the market (e.g., below Buy price or above Sell price).
-
Trade Restrictions: Trades will not be placed if the stop loss is too close to the market price or violates broker’s minimum distance.
-
One-Time Trade: Once a trade is closed (either manually or by TP/SL), no new trades will be opened until the EA is restarted.
🛠 Platform Requirements
-
MetaTrader 5
-
Compatible with hedging accounts only
-
Tested and compatible with major currency pairs and metals
One-Time Risk EA with TP and Trailing SL (MT5) is perfect for traders looking for a controlled and efficient way to automate their trading while maintaining proper risk management and minimizing emotional decisions.
Disclaimer
This Expert Advisor is designed for risk-based trade management, but it does not guarantee profits or specific performance. Trading involves inherent risks, and results may vary depending on market conditions and settings used. Test thoroughly on a demo account before using it on a live account. The author is not responsible for any financial losses incurred from the use of this EA.
