I got a simple expert (This is the MovingAverage.mq4) provided by MT4, which can not loose more than 20% if the account.
Balance is 10000 Euros / Currency Euro
You need to write a new function which calculates how much money is engaged by a total of all trades (from a same expert ) and displays an alert
means, if the expert looses 2000 euros, the expert must stop immedialty
**** do not use those following functions as BalanceEquity or MarginFree, or MarginRequired or whatever.
Just, calculate the amount of money for each trade with OrderProfit(), OrderLots() , OrderOpenPrice() ..