Uploaded image for project: 'QuickFIX/J'
  1. QuickFIX/J
  2. QFJ-37

Make executor in examples handle Forex limit orders too

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • 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
    • Component/s: Examples
    • Labels:
      None

      Description

      The Executor example code has several copies of the line pair:

      if (ordType.getValue() != OrdType.LIMIT)
      throw new IncorrectTagValue(ordType.getField());

      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)
      throw new IncorrectTagValue(ordType.getField());

      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

        Attachments

          Activity

            People

            • Assignee:
              admin Steve Bate
              Reporter:
              nfortescue Nick Fortescue
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: