I have a strategy that enter with a limit order and then exit either with another limit order or by stoploss.
The orders are generated correctly but when the order exit with the limit order and cancels the stop order, somehow it creates an additional exit limit order that makes me enter again in the market (which i dont want)..
I dont know what i am doing wrong here. Could someone help with this?
I am adding a screenshot that shows the orders generated where you can see that there are 2 "ExitLimitLong". I would like to avoid the creation of the 2nd one.
Additionally adding the piece of code where I call the exitlimit order in the "OnBarUpdate()":
Thank you in advance!
Comment