I need to create customized trading logic in Amibroker with IB TWS Autotrading plugin
I have sample basic code for autotrading through Amibroker IB TWS Autotrading plugin - attached file
I need few updates in this code:
1. Auto transmiting stop loss and profit target orders.
When buy or short signal is triggered then transmit stop loss and profit target orders. This orders must be OCO ( order cancel order). So when exit signal is triggered or profit was hit or stop loss was hit, cancel all open orders.
2. Implement position sizing logic to trading
I would like to have predefined few position sizing methods in this code