public static void main(String[] args) throws Exception {
//get the instance of the IClient interface
client = ClientFactory.getDefaultInstance();
setSystemListener();
tryToConnect();
subscribeToInstruments();
LOGGER.info("Starting strategy");
client.startStrategy(new MyStrategy());
}
In your strategy you program all logic responsible for placing/closing orders. Then you pass your strategy in startStrategy() method as a parameter.