Close position based on equity

Created at 23 May 2017, 00:12
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
TI

tinker.this

Joined 22.10.2015

Close position based on equity
23 May 2017, 00:12


I hope that someone can help me with, and or provide me a code example for closing the postion with the biggest negative gross loss when reaching a certain equity percentage.

So when my equity drawdown is 10% I want to close the postion with the biggest loss

 

I hope someone can help me


@tinker.this
Replies

kricka
23 May 2017, 23:23

Have a look at the RMM Robot 2.5 it can handle what you are after. To code your request in an easy way is not doable. Learn the API of cAlgo and all that can be done within the API. Ask questions on the forum, which you are in the fact doing right now, that is great. Other programmers might come in with suggestions how to solve it but more of importance to you is to pick up information on the forum and test all the suggestions from programmers by the trial and error approach.


@kricka