close all position
24 Aug 2017, 18:35
Hallo,
I notice that my cBot closes also trades I have made manually in cTrader (same account and currency).
how can I force my cBot to modify/close ONLY positions genereted within cAlgo?
Thanks in advance.
Yosif

Spotware
25 Aug 2017, 10:31
Dear yosifov,
You can use labels to distinguish between different position types. For example, when opening a position from a cBot, you can apply a label as follows
and then when you are modifying these positions you can filter your positions using the label. See below
foreach(var position in Positions.Find("MyLabel")) { // Modify/Close positions }Let us know if this helps.
Best Regards,
cTrader Team
@Spotware