Averaging Positions and Exiting in Full
Averaging Positions and Exiting in Full
05 Sep 2017, 15:04
Guys,
I an trying to write code that does the following.
1.) Long 1 @ px with a TP1
2.) Market has gone down and I average my position and Buy 1 more @ px with TP2.
So now I am long 2 with a VWAP @ px2
I want to cancel the TP of entry #1 and replace it with TP2.
If TP2 is triggered I would like to close the trades for both #1 and # 2;
Can this be done?
Any code examples will be very appreciated.
Thanks,
Replies
ctid362975
07 Sep 2017, 15:07
Hi,
I do not need someone to code this for me. If you could tell me how your VWAP / Position manager is working I can create the correct code. But at the moment I cannot see thses classes fully as they are obfusucated.
Otherwise I will wirite my own Position manager class. Is that what you are suggesting I need to write my own PM class?
Thanks,
@ctid362975
Spotware
06 Sep 2017, 11:19
Dear Trader,
Thanks for posting this request in our forum. You can also consider posting this request as a Job or contact a professional cAlgo Consultant.
Best Regards,
cTrader Team
@Spotware