I am trying to implement a dynamic stop order, i.e. the stop price will be recalculated on every bar, and is not a fixed points away or a fixed percentage, hence cannot be a simple trailing stop.
I see two logical approaches, with MultiCharts connecting to IB TWS, and am wondering which is possible.
1) Send a stop order over to IB TWS, let it sit on TWS server side, and modify the stop price on each new bar. Is this possible? I don't see an order reference for Easy Language, is this even possible?
2) Create a new stop order on each bar
I am a newbie and I might be totally wrong here, in assuming an order can last more than a bar?
I will be calculating the stop price using ATR, i.e. a trailing stop based on ATR
I guess my question is more on a more fundamental level question, due to my limited knowledge on Easy Language at the moment, say,
if I send a stop order via "buy next bar at stop xxx", obviously this order will be sent over to IB TWS (I am using IB for execution), but when my logic decides that the stop price should be updated, how do I modify the order over on IB side?
Or such order will always be cancelled at the end of each bar, and I just send a new stop order at the next bar?
I have no knowledge of Easy Language myself, but the highlighted statement is not correct. It does not work like that. The order will not get automatically cancelled at the end of each bar.
I understand your concept regarding dynamic stop, but I cannot help because of the lack of knowledge about Easy Language. Hopefully someone experienced will tell how to practically make that kind of dynamic stop.