My algo places some orders in morning and does square off by 3.15 if sl or target is not hit. However if I place some order manually and need to carry overnight, then how to program algo in such a way that it should not square off positions which were entered manually
I want to sqaure off positions. Since whenever order is placed it is converted to position. Now i want to square off only those positions. Is it possible to tag positions? square off by order id or by tag does not seem right. Sometimes sl may get triggered before square off timings. Therefore, it is better to find open positions and square off them. Problem for me is how to differentiate positions which are placed by algo