Trabalho concluído
Termos de Referência
Need to create a special equity manager EA
1. Every day at a preset hour(settings) it calculates the equity protection line based on maximum daily loss set in currency(settings)
2. Every day at a preset hour(settings) it calculates target profit(settings) and trailing start
3. when equity protection line is breached, it closes first all the charts except the one that is running this ea, tha closes all the open and pending trades and sends an email notificatin.
4. when the profit target is hit, it closes first all the charts except the one that is running this ea, tha closes all the open and pending trades and sends an email notificatin.
5. closes all the trades at a certain hour(settings).
This ea needs to be very efficient and executing very fast. it is very important to follow the order of closing the charts first and than closing the trades as the ea im using might open another trade very quickly
When the trailing start is hit, it starts trailing the overal profit and protects the profit
1. example one - hitting the equity line
equity on the start of the day is 57556 usd. The maximum daily loss is set to 2000usd. so the calculated equity line is 55556 usd. When the equity drops bellow that point all the charts except the one this ea is running at, close all opened and pending orders and noticifation is send.
The next day, the equity protection line is 53556 usd.
2. example - profit target is hit
equity on the start of the day is 57556 usd. the profit target is 2000 usd. Once the equity reaches 59556 usd all the charts except the one this ea is running at, close all opened and pending orders and noticifation is send.
3. example - equity trailing stop without steps
equity on the start of the day is 57556 usd. The trailing start is set to 1000usd, the stop is 200usd and the step is 100 usd. once the daily profit is over a 1000 and than it drops to 800, than all the charts except the one this ea is running at, close all opened and pending orders and noticifation is send. the equity is around 58356 at the end of the day.
4. example - equity trailing stop with steps
equity on the start of the day is 57556 usd. The trailing start is set to 1000usd, the stop is 200usd and the step is 100 usd. once the daily profit is over a 1000 and than it raises to 1100, than the trailing stop moves from 800 to 900. If the equity moves up again to 1200, the trailing stop moves to 1000. if the profit moves bellow 1000 all the charts except the one this ea is running at, close all opened and pending orders and noticifation is send. the equity is around 58356 at the end of the day.
5. example end of the day.
If no above described rules apply and there are open trades and 23:00, than the ea close all open trades