Hello,

I want to close half of the trade at a certain price. I tried to accomplish that with a trade management function; when the conditions are met, I tried modifying the TradeLots, and also tried
Code
exitTrade(ThisTrade, 0, TradeLots/2);

but neither worked for me. I am aware of the following documentation comment...
Quote
TMFs can open new trades with enterLong/Short. However be careful when assigning them the same TMF: mistakes in entry conditions can lead to an endless loop of entering new trades. Exit a trade by returning 1, rather than calling exitTrade.

... but if I return 1, the whole trade closes. Do you have any idea?