[QFJ-37] Make executor in examples handle Forex limit orders too Created: 20/Jul/06 Updated: 02/Sep/06 Resolved: 26/Jul/06 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | Examples |
Affects Version/s: | 1.0.0 B3, 1.0.0 Final, 1.0.1, 1.0.2, 1.1.0 |
Fix Version/s: | 1.0.2 |
Type: | Improvement | Priority: | Minor |
Reporter: | Nick Fortescue | Assignee: | Steve Bate |
Resolution: | Fixed | Votes: | 0 |
Labels: | None |
Description |
The Executor example code has several copies of the line pair: if (ordType.getValue() != OrdType.LIMIT) The code would work just as well if it accepted orders of type OrdType.FOREX_LIMIT. Could this be modified to if (ordType.getValue() != OrdType.LIMIT && ordType.getValue() != OrdType.FOREX_LIMIT) Even better would be to extract this code to a method called something like validateOrdType(), then you wouldn't need the same code duplicated across all the methods. Not urgent, I realise this is just example code, but it had me confused for a bit, and is quite easy to fix |
Comments |
Comment by Steve Bate [ 26/Jul/06 ] |
I agree about the comments on duplicated code. I inherited these examples from the parent QuickFIX project and I've never done much to clean up the code. I've made a few changes to the executor application so that order types can now be configured in the session settings (see executor.cfg). By default, I've included Limit and Forex Limit but other types could be specified if needed. This is in the trunk and the 1.0.x branch. |