I have a problem.
When the conditions for a strategy are fulfilled and an order is opened I do not want it to run again if the conditions are given until the open order ends.
My problem is that the strategy opens an order and if they re-enforce the conditions continues to open orders and that makes the risk management penalize me.
I do not know if by writing to an external file of some variable and that while that variable has a value the strategy can not open a new order. I do not know how to write the code for it.
Thank you for your help.