Job finished
Specification
EA profit manager will monitor all other EA positions and all manual open positions.
It will close trades on account, close all open and all pending trades
Highest recorded equity
EA will record Equity Highest (of account )every day in a log .Every new equity high will be recorded , if it exceeds previous highest recorded equity.It will display it on chart.
input int equity trigger=10000;//equity level must be greater than this level
input int basket take profit=100; // currency value
Add a variable :
input int variable deductible equity =100;// allowable decrease in equity is deducted from HIGHEST RECORDED EQUITY//manual input
Highest recorded equity - deductible variable equity = usable equity (used for calculations for entry)
example
highest recorded equity is 10,000 - deductible variable equity =100 = usable equity = 9900
All take profit triggers are based on usable equity
If usable current profit > BasketTakeProfit=100; and usable equity +BasketTakeProfit => input equity trigger, close all & delete all (close all open and all pending trades)
Function :close all and delete all pending , if current OPEN PROFIT >= basket take profit and it is >= usable equity and equity trigger
weekly open equity + weekly basket take profit
EA will record weekly open equity balance ,on monday at open of platform or at 00:00 earliest, it will display it on chart.
Function :close all and delete all pending , if current equity / CURRENT OPEN PROFIT >= than weekly open equity + weekly basket take profit and it is >= usable equity and equity trigger.
input int weeklyBasketTakeProfit=100;// profit in currency of account
example weekly open balance is £ 10,000 , current equity is £10200 , and profit = £200 // close all because account profit is > weekly open equity + weekly basket take profit and equity trigger.
EA will close trades only once on weekly basis as above , but for second subsequent take profit activation it will add the number of activations by basket take profit=100.
First time take profit basket take profit=100 // basket take profit=100 *1
second time take profit basket take profit=150 // basket take profit=100 *1.5
third time take profit basket take profit=200 // basket take profit=100 *2.0
EA will record comments and alerts , when trades are closed or errors are made.
example 1
Highest recorded is 20000
variable deductible equity =100;//manual input
20,000 -100 = 19900
= 19,900 is the Equity used for profit trigger
input int equity trigger=10000;//equity level must be greater than this level
19,900 > input int equity trigger of 10000 ...........................take profit =true
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
example 2
Highest recorded is 10000
variable deductible equity =100;//manual input
10,000 -100 = 9900
= 9,900 is the Equity used for profit trigger
input int equity trigger=10000;//equity level must be greater than this level
9,900 < input int equity trigger of 10000 ...........................take profit =false