The AutoCloseOnProfitLoss Expert Advisor (EA) is a powerful automation tool for MetaTrader 5, designed to close all open positions when predefined profit or loss targets are reached. This EA is perfect for traders who want to manage risk and secure profits without manual intervention. Whether you're a scalper targeting quick gains or a long-term trader protecting capital, this EA offers a reliable, hands-free solution.
The EA monitors the total profit or loss of all open positions using the PositionGetDouble(POSITION_PROFIT) function in MetaTrader 5. It compares this value against the user-defined TargetProfit and MaxLoss thresholds. If either condition is met (and the corresponding feature is enabled), the EA closes all positions using market orders and notifies the user through alerts (if enabled) and terminal logs.
Suppose you set TargetProfit = 100.0, MaxLoss = -50.0, EnableProfitClose = true, and EnableLossClose = true. If your open positions reach a total profit of $120, the EA will close all positions and display an alert: "All positions closed! Reason: Target profit reached: 120.00". If the total loss reaches -$60, the EA will close all positions with an alert: "All positions closed! Reason: Max loss reached: -60.00".
Swaps Monitor for a Single Symbol
A simple utility for monitoring long and short swaps of a single symbol. If your broker-dealer's swaps are specified in points instead of account currency, this utility automatically converts points into account currency. Swaps are tripled on Wednesday. Horizontal and vertical alignment can be adjusted in the inputs.
Function for converting the number of seconds to years, months, days, hours, minutes, seconds
It is taken into account that there are 30 days in a month, 365 days in a year The script demonstrates the counter of time until the beginning of the new year
Bands R-squared
Simple Expert Advisor with custom R-squared optimisation function
DailyHighLow Indicator for MQL5
The DailyHighLow indicator is a versatile tool designed for MetaTrader 5 (MQL5) to display high and low price levels on a chart based on a specified timeframe. This indicator is particularly useful for traders who rely on key price levels for decision-making, offering flexibility through customizable timeframes and price calculation methods.