Developer API

Operators

Operators define how an input value is compared against a target value within a ZeroTrain condition.

ZeroTrainOperator

List of ZeroTrainOperator

NameDescription
=Evaluates to true when the input value is exactly equal to the target value.
>Evaluates to true when the input value is strictly greater than the target value.
>=Evaluates to true when the input value is greater than or equal to the target value.
<Evaluates to true when the input value is strictly less than the target value.
<=Evaluates to true when the input value is less than or equal to the target value.
!=Evaluates to true when the input value is not equal to the target value.

Example

	{
  "InputSource": {
    "LastPrice": 102.45,
    "Volume": 1500000,
    "VolatilityIndex": 22.8,
    "MovingAverageSpread": 1.35
  },
  "ModelSource": {
    "resultsets": {
      "TradingRules": [
        {
          "ID": "TR-001",
          "VolatilityIndex": ">= 20",
          "MovingAverageSpread": ">= 1.0",
          "Weight": 0.8,
          "IsEnabled": true,
          "Action": "Buy"
        },
        {
          "ID": "TR-002",
          "VolatilityIndex": "< 20",
          "MovingAverageSpread": "< 0",
          "Weight": 0.6,
          "IsEnabled": true,
          "Action": "Sell"
        },
        {
          "ID": "TR-003",
          "Weight": 0.2,
          "IsEnabled": true,
          "Action": "Hold"
        }
      ]
    }
  },
  "Options": {
    "DataSettings": {
      "ActionColumnName": "Action",
      "PriorityColumnName": "VolatilityIndex",
      "WeightColumnName": "Weight",
      "DecisionIdColumnName": "ID",
      "RowFilter": "IsEnabled = true",
      "ModelName": "TradingDecisionModel"
    },
    "ContextOptions": {
      "CustomTag": "Trade-Session-Alpha"
    },
    "ConfidencePolicy": {
        "FitWeight": 1,
        "SeparationWeight": 0.03
    },
    "OutputSettings": {
      "ExecutionTraceMode": "Compact"
    }
  }
}