};
@Override
public boolean acceptPosition(final Position position) {
final Evaluator eval = getExpression().evaluator();
eval.setVariable("position", position);
eval.setVariable("quantity", position.getQuantity().doubleValue());
eval.setVariable("security", position.getSecurity());
eval.setDynamicVariables(new DynamicVariables() {
@Override
public Object getValue(final String name) {
return s_dynamicAttributes.getValue(position, name);
}
});
eval.setDynamicAttributes(s_dynamicAttributes);
return Boolean.TRUE.equals(eval.evaluate());
}