Dynamic Partials

 

Hey,


Can anyone help me with dynamic partials system?


I want the partials to work in such a way: 1:1 trade goes BE and takes 20% TP, 1:2 it takes another 20%, 1:3 it takes 60%.


Thanks in advance.

 
Mintautas Sujeta:Hey, Can anyone help me with dynamic partials system? I want the partials to work in such a way: 1:1 trade goes BE and takes 20% TP, 1:2 it takes another 20%, 1:3 it takes 60%. Thanks in advance.

If you are unable to code yourself and require someone to code it for you, please consider placing a request in the Freelance section.

If you want help with your code, then show us your serious attempt at coding it yourself and explain in details the issues you are having.

 

It’s not a single line function – so you need to code it yourself (then maybe post a code if you have any specific problems we could help) or fund someone who will code this for you.

But you simply need to go in a loop for all opened positions, calculate the next TP levels and check if any of them is reached – then close chosen part of the position. 

Here of course you need to set some flags for each trade to “remember” that this part of TP was already closed (to avoid multiple closing on the same level) and remember that partially closed positions don’t have same ticket. As you see its quite complex task.

Reason: