Opposite Hedge Position

Created at 29 Jan 2017, 14:09
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!
PE

petra41@bigpond.com

Joined 14.12.2016

Opposite Hedge Position
29 Jan 2017, 14:09


Hi All

 

Im looking for some help, I've done some C# coding before but am still learing cAlgo API calls etc. When I am after is C# code that takes an opposing position once the pNl is greater then X.

So Im in position AUDUSD, the PNL is -2000 (2000 is my X value set) and I have a current position of 80000 volume in a buy. Take a 80000 position in a sell out once the PNL is greater then 2000.

Any additional snippets for managing the position ie once it or overall position hits breakeven sell then that would be great cheers.


@petra41@bigpond.com