Every strategy runs in its own thread. Method IContext.executeTask allows to execute critical operations (e.g., order submission) from a different thread.
Consider scheduling a task to execute at a fixed rate. Consider an example strategy which on its start creates an order and a horizontal line. Then it schedules a task which moves the horizontal line's price 5 pips above the order's open price whenever the order price changes.
* The strategy on its start creates an order and a horizontal line.
* 5 pips above the order's open price whenever the order price changes.
* On strategy stop the order gets closed and the line removed from the chart.