While trying to develop a strategy to help me trade, I came across the issue of EnterLongStopLimit() not staying active for more than 1 candle. Upon looking this up, I found out that this is normal behavior. When trying to figure out how to prevent it, I read more into Advanced Order Handling and figured out that this should solve my problem. Ideally, I would like to place an order with my given limits, and allow it to continue until I call the cancel order command. When trying to translate into the AOH, I am coming across the issue of figuring out BarsInProgress. I currently have
EnterLongStopLimit(?, true, 1, limitPrice, stopPrice, signalName)
and I am unsure of what to put for the ?. I've tried different numbers and I've tried to look more into it, however, I am hitting a roadblock. All the values I've placed gives me an out-of-bounds error. I would just like my EnterLogStopLimit to last more than 1 candle. Is this the right way to go about this, or is there something I am overthinking?
Thanks!
Comment