Stop losable positions at -1% of Equity
-
Hello, I am trying to find a way to stop out losable positions at some percentage of equity, lets say 1% or 2 %.
The concept is for scalability. When equity grows, because of percentage - there is more wiggle room, while keeping everything profitable, as it is only 1 %.
So, as condition for stop losable positions, I chose Account, and equity... Is Below.... value -2 %. But the problem is that when I try to compile, it says Compilation error, '%' - operand expected.
How to make this work, thank you. -
Try something like this:

Or something like this with using Profit (Equity - Balance)
-
@fxdreema WOW, it works!
Thank you. Genius. Equity vs balance, thanks.This, together with the equity based lot size, can be used as a scalable solution for any EA.
Thank you for this amazing builder. -
By the way, Equity and Balance are global, they are the result of the work of all trades, from all EAs (in case of multiple) + the manual trades. If you want to check the profit/loss made from the current EA, there is a block to check the current unrealized profit.
Also if you need to use Equity or Balance in some input field somewhere, the native MQL4 functions to get those values are AccountEquity() and AccountProfit().
-
@fxdreema Thank you. Yes, I thought of this only globally, but it's more wiser regarding money management, to use this per EA/trade. Thank you for considering.