Class DefaultIfDoneOCOValidator
java.lang.Object
com.caplin.motif.fx.trading.orders.submission.validator.DefaultIfDoneOCOValidator
- All Implemented Interfaces:
OrderSubmissionValidator
@Deprecated
public class DefaultIfDoneOCOValidator
extends Object
implements OrderSubmissionValidator
Deprecated.
The default implementation of OrderSubmissionValidator for IfDoneOCO submissions.
Checks that the first leg is either STOP-LOSS, TAKE-PROFIT or MARKET
Checks that the second leg is TAKE-PROFIT and the third leg is STOP-LOSS
-
Constructor Summary
ConstructorDescriptionDeprecated.Constructs the default validator for IF-DONE-OCO orders. -
Method Summary
Modifier and TypeMethodDescriptionvoid
validate
(StrategyType type, OrderStrategy strategy, Map<String, String> fields) Deprecated.Checks the validity of a strategy based on its type, the strategy object itself, and the raw field map that the strategy was derived from.
-
Constructor Details
-
DefaultIfDoneOCOValidator
public DefaultIfDoneOCOValidator()Deprecated.Constructs the default validator for IF-DONE-OCO orders.
-
-
Method Details
-
validate
public void validate(StrategyType type, OrderStrategy strategy, Map<String, String> fields) throws OrderConfigurationExceptionDeprecated.Description copied from interface:OrderSubmissionValidator
Checks the validity of a strategy based on its type, the strategy object itself, and the raw field map that the strategy was derived from. This method should throw anOrderConfigurationException
if the strategy is not valid.- Specified by:
validate
in interfaceOrderSubmissionValidator
- Parameters:
type
- The StrategyType of the order.strategy
- The OrderStrategy object that represents the strategy.fields
- The raw field map that was used to create theOrderStrategy
object.- Throws:
OrderConfigurationException
- If the legs are not valid for this strategy.
-