Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Experts

CheckTrades - expert for MetaTrader 5

Views:
5570
Rating:
(14)
Published:
2023.04.25 05:44
Updated:
2023.04.25 05:48
check.mq5 (2.11 KB) view
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

The code provided is an MQL5 Expert Advisor (EA) script that is based on the idea of closing open positions when they have reached a user-defined profit or loss threshold, calculated as a percentage of the account balance.

The EA does not provide any entry signals or market timing rules; its main purpose is to manage the risk of existing positions by closing them when a certain profit or loss threshold is reached.

External variables used in the code:

  1. RiskPercentage : This variable represents the maximum allowed loss per trade as a percentage of the account balance. When the current loss of an open position reaches this percentage, the position will be closed to limit the risk.

  2. ProfitPercentage : This variable represents the desired profit per trade as a percentage of the account balance. When the current profit of an open position reaches this percentage, the position will be closed to secure the profit.

Since this EA is focused on risk management and does not rely on any specific market indicators, it can be applied to any symbol or timeframe. However, it is essential to note that this EA should be combined with a trading strategy that includes entry signals and other trade management rules to make it a complete trading system.

If you were to use this code as an include file (by placing it in the MQL5\Include folder), its main purpose would be for risk management by closing positions based on user-defined profit and loss thresholds.

You can combine this include file with other include files that serve specific purposes, such as calculating position size based on account risk, trailing stop-loss, and more. To do so, you can use the #include directive in your main EA file to include this file, and then call the CheckTrades() function when needed to manage the open positions.

Risk Calculator Risk Calculator

Calculates the risk in the account currency for a given trading volume of the selected symbol at different time periods.

Multi SellLimitOrders & Multi SellStopOrders Multi SellLimitOrders & Multi SellStopOrders

Multi Selllimit and Sellstop orders are script files that enable traders to place multiple orders with ease. These orders allow traders to enter the market at a specific price level, or at a specified number of pips away from the current market price, with stop-loss and take-profit levels. By default, the pips value is set to 400, which means the trade will be placed 400 pips away from the current market price for a 5-digit broker. Moreover, the multi Selllimit and Sellstop orders offer traders the flexibility to customize their trading strategies. Traders can set the stop-loss level to zero if they do not use stop-loss, and can choose between a target price or a pip-based entry. This level of flexibility allows traders to tailor their trading strategies to their specific needs, which can result in better trading outcomes.

VPS Trailing Stop Service VPS Trailing Stop Service

VPS Trailing Stop Service

Expert Advisor for Opening Multiple Buy and Sell Orders Based on User Input Expert Advisor for Opening Multiple Buy and Sell Orders Based on User Input

This MT5 Expert Advisor opens multiple buy and sell orders based on user input, featuring a simple interface with Buy and Sell buttons. The EA calculates lot size, checks the spread against slippage, and places orders accordingly. It is essential to test this EA in a demo account before using it in live trading.