Closing positions at specified time subject to max slippage
Closing positions at specified time subject to max slippage
16 May 2022, 11:27
Hello,
I was looking to close existing positions in cAlgo at a specified time and subject to a specified max slippage.
Two ideas:
1. I can see there is an equivalent method for opening positions with "ExecuteMarketRangeOrder". Could we create one for closing positions?
2. Alternatively, I wanted to replicate this by placing a TakeProfit on the position that is deliberately already past the price. I.e. if I am long, and current bid price is 1.2000, I want to place a TP @ 1.1000. This should theoretically get me out of the position with very high probability (unless price suddenly gaps below 1.1000) and also guarantees price of 1.1000 worst case if I do get out. However, cAlgo does NOT let me place TP below current bid (in this long example). Could we enable putting TP deliberately past the price?
Thank you