Is it possible to "parkuntildatetime" a sell signal and if that day, when it is activated, few minutes before market close, it is not filled, cancel it and close position on market close? Is there some "cancelatdatetime" command?
Or can I solve it by posting two OCA sell signals, both "parkuntildatetime" and that later "Market on Close" will cancel earlier not filled signal?
Second question: Is it possible to send "Relative profit targets & stops" via signal API?
To answer your first question, you proposed a valid way to handle it:
You should enter two orders. Signal A will be parkuntildatetime, either stop or limit. Signal B will be a market order, parkuntildatetime= 1 minute before market close. Then group both orders in a single OCA (one cancels another) group.
If the stop or limit is filled, then the market order will be canceled. If not, then the market order will be issued, and the stop/limit will be canceled.
It is currently not possible to access price-relative orders through the API, but I can add that if there is interest. I assume this is something you would use?
Thanks for your answer.
>I assume this is something you would use?
Yes. I want to send all signals (buy and conditional OCA group of sell signals "parkuntildatetime") together at once. Profit target is calculated from BuyPrice. Now I must download open positions every day, calculate SellPrice and send sell signals. It would be much better, if I can satisfy my laziness and let you to work instead of me (If I would not count safer processing on server side.)
Maybe better is "If I not count"?. Sorry for my English. I hope you understand.