I’m interested in writing an algorithm where I can pass through a trade symbol, a date and time and the amount of capital(USD) I would have placed on the trade, the take profit and stop loss limits. From this I would like the algorithm to then return whether based on the parameters, the trade would have hit the take profit or stop limit and if there would have been enough liquidity at those points for the stock to sell off efficiently. Would anyone know any ideas that can perform this for me? Thanks!
I have tried my own ways of programming this but I believe there’s more complexity to working this out which I hope someone with superior knowledge has already achieved.