Trailing funds function (equity) - has anyone come across a ready-made one? - page 6

 

Report: The percentage calculation remained a mystery to me, as can be seen in the figures below. Well, he couldn't nail down one position (USDCHF), he finished it with his hands when he got home.


Files:
log.txt  8 kb
 
well according to the log errors 6 and 138 == respectively discount and requotes...
 

Rustam, maybe I don't understand something, but it seems to me that the script (or the Expert Advisor) should close all orders without exception for all EAs and all symbols when a certain level of profit is reached in relation to the previous deposited amount (say, as of 13.00 hours) or binding to a fixed amount set manually, or as a percentage. The percentage ratio is of course the best. If the script works when the funds increase by 10%, it closes all orders and waits for the 10% increase counting from the new amount. It seems to me the script I have attached is best suited for modification for these purposes. I do not understand it but it closes all positions very quickly when there is an urgent need to do so. I cannot remember where I downloaded it from. If you are able to remake it to close as soon as percentage of funds increase (decrease), I would be very grateful.

 
nkeshka why build a lawnmower bike: it's all already there => e-CloseByPercentProfit
 
Whoopsie... Thank you very much, Eugene.
 
The topic is called trailing equity, not closing when equity reaches a certain level. Therefore, the script does not close all orders immediately when the level is reached, but remembers it as a closing level, so as to close the orders if equity has returned to a level lower than the closing level after the growth. Example: If you place a step = 1 % on the deposit of 1000, the distribution of steps will be 1010, 1020, 1030, and so on. So if equity has returned to the previous trailing step without having managed to overcome the next one, the closing will take place.
 
xrust >>:
Тема называется трейлинг средств (эквити), а не закрытие при достижении опр. уровня средств..

We wanted it, we got it, thank you. And whoever doesn't get it, it's their own fault.

 
xrust >>:
Тема называется трейлинг средств (эквити), а не закрытие при достижении опр. уровня средств .

Got it, got it

Figured it out

I was wrong.

I'm out.

:о)

 

Another variant of equity trawl in the form of an Expert Advisor. But the trawl is not in percents but in units of the deposit currency.

If the entry conditions are removed, it should trawl everything.

Files:
 
Serj_Che Thank you, just what I needed. And thanks to all who replied, very helpful ;)
Reason: