Closing a Countertrade

Created at 21 Mar 2018, 17:16
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!
Gwave's avatar

Gwave

Joined 26.10.2014

Closing a Countertrade
21 Mar 2018, 17:16


Hi guys.

How can i modify CounterTrade to automatically Close " it's trade " when the " Original position " closes. Please any help would be much appreciated. 

Many Thanks

This is the cbot

/algos/cbots/show/475#comment-4905


@Gwave
Replies

PanagiotisCharalampous
21 Mar 2018, 17:31

Hi Gwave,

Thanks for posting in our forum. An idea would be to keep in the counter trade position a reference to the original position e.g. keep the id in the label, and then, on OnPositionsClosed, track if there is a referenced position and close it as well. However this needs some coding to be achieved...

Let me know if I was helpful.

Best Regards,

Panagiotis


@PanagiotisCharalampous

Gwave
21 Mar 2018, 17:54

Hi Panagiotis

Iam a complete novice and i am not a coder. I don't know if you can help please. I thought it would be a simple modification that i am not aware of, am i mistaken or can you help ?

Many Thanks


@Gwave

PanagiotisCharalampous
21 Mar 2018, 18:01

Hi Gwave,

Unfortunately, I cannot engage into developing custom cBots for traders. If you need professional help, you could contact a Consultant or post a Job.

Best Regards,

Panagiotis


@PanagiotisCharalampous

Gwave
21 Mar 2018, 18:27

Cheers, no worries.

Many Thanks 


@Gwave