Skip to content

Portfolio strategy#

About#

Portfolio strategy

Fields#

Name Type Required Description
_id string Yes strategy id, unique across the platform
name string Yes strategy human-readable name
description string Yes longer strategy human-readable description
members Array<PortfolioS...> Yes array of portfolio members
commissionScheme CommissionScheme commission scheme allowed by this strategy. By default monthly billing period with no commission is being used
skipPendingOrders boolean flag indicating that pending orders should not be copied. Default is to copy pending orders
maxTradeRisk number max risk per trade, expressed as a fraction of 1. If trade has a SL, the trade size will be adjusted to match the risk limit. If not, the trade SL will be applied according to the risk limit
reverse boolean flag indicating that the strategy should be copied in a reverse direction
reduceCorrelations string setting indicating whether to enable automatic trade correlation reduction. Possible settings are not specified (disable correlation risk restrictions), by-strategy (limit correlations on strategy level) or by-symbol (limit correlations on symbol level)
symbolFilter StrategySymbolF... symbol filter which can be used to copy only specific symbols or exclude some symbols from copying
newsFilter StrategyNewsFilter news risk filter configuration. Experimental feature
riskLimits Array<StrategyR...> strategy risk limits. You can configure trading to be stopped once total drawdown generated during specific period is exceeded. Can be specified either for balance or equity drawdown
maxStopLoss StrategyMaxSto... stop loss value restriction
maxLeverage number setting indicating maxumum leverage allowed when opening a new positions. Any trade which results in a higher leverage will be discarded
symbolMapping Array<SymbolM...> defines how symbol name should be changed when trading (e.g. when broker uses symbol names with unusual suffixes). By default this setting is disabled and the trades are copied using signal source symbol name
tradeSizeScaling StrategyTrade... Trade size scaling settings. By default the trade size on strategy subscriber side will be scaled according to balance to preserve risk.
copyStopLoss boolean flag indicating whether stop loss should be copied. Default is to copy stop loss.
copyTakeProfit boolean flag indicating whether take profit should be copied. Default is to copy take profit.
allowedSides Array<string> Trade sides which will be copied. Buy trades only, sell trades only or all trades. Default is to copy all trades
minTradeVolume number Minimum trade volume to copy. Trade signals with a smaller volume will not be copied
maxTradeVolume number Maximum trade volume to copy. Trade signals with a larger volume will be copied with maximum volume instead
signalDelay SignalDelay Extra trade copying delay introduced by trade copier before applying the trade signal. You can configure either a fixed or a random delay
platformCommissionRate number Yes commission rate the platform charges for strategy copying, applied to commissions charged by provider. This commission applies only to accounts not managed directly by provider. Should be fraction of 1
closeOnRemovalMode string position close mode on strategy or subscription removal. Preserve means that positions will not be closed and will not be managed by CopyFactory. close-gracefully-by-position means that positions will continue to be managed by CopyFactory, but only close signals will be copied. close-gracefully-by-symbol means that positions will continue to be managed by CopyFactory, but only close signals will be copied or signals to open positions for the symbols which already have positions opened. close-immediately means that all positions will be closed immediately. Default is close-immediately. enum: preserve, close-gracefully-by-position, close-gracefully-by-symbol, close-immediately

Example#

{
  "_id": "QlX5",
  "name": "Test strategy",
  "description": "Some useful description about your strategy",
  "members": [
    {
      "strategyId": "Gfdr",
      "multiplier": 1,
      "skipPendingOrders": true,
      "maxTradeRisk": 0.4,
      "reverse": true,
      "reduceCorrelations": "by-strategy",
      "stopOutRisk": {
        "absoluteValue": 0.05,
        "relativeValue": 0.7,
        "startTime": "2020-08-24T00:00:00.000Z"
      },
      "symbolFilter": {
        "included": [
          "EURUSD"
        ]
      },
      "newsFilter": {
        "calendarNewsFilter": {
          "priorities": [
            "election"
          ],
          "closePositionTimeGapInMinutes": 10,
          "openPositionPrecedingTimeGapInMinutes": 20,
          "openPositionFollowingTimeGapInMinutes": 20
        }
      },
      "riskLimits": [
        {
          "type": "day",
          "applyTo": "balance-difference",
          "maxAbsoluteRisk": 0.05,
          "maxRelativeRisk": 0.01,
          "closePositions": true,
          "startTime": "2020-08-24T00:00:00.000Z"
        }
      ],
      "maxStopLoss": {
        "value": 100,
        "units": "pips"
      },
      "maxLeverage": 50,
      "symbolMapping": [
        {
          "to": "EURUSD",
          "from": "EURUSD.m"
        }
      ],
      "tradeSizeScaling": {
        "mode": "none"
      },
    }
  ],
  "commissionScheme": {
    "type": "flat-fee",
    "billingPeriod": "week",
    "commissionRate": 0
  },
  "skipPendingOrders": true,
  "maxTradeRisk": 0.1,
  "reverse": true,
  "reduceCorrelations": "by-strategy",
  "stopOutRisk": {
    "absoluteValue": 0.05,
    "relativeValue": 0.4,
    "startTime": "2020-08-24T00:00:00.000Z"
  },
  "symbolFilter": {
    "included": [
      "EURUSD"
    ]
  },
  "newsFilter": {
    "calendarNewsFilter": {
      "priorities": [
        "election"
      ],
      "closePositionTimeGapInMinutes": 10,
      "openPositionPrecedingTimeGapInMinutes": 10,
      "openPositionFollowingTimeGapInMinutes": 20
    }
  },
  "riskLimits": [
    {
      "type": "day",
      "applyTo": "balance-difference",
      "maxAbsoluteRisk": 0.05,
      "maxRelativeRisk": 0.1,
      "closePositions": true,
      "startTime": "2020-08-24T00:00:00.000Z"
    }
  ],
  "maxStopLoss": {
    "value": 150,
    "units": "pips"
  },
  "maxLeverage": 50,
  "symbolMapping": [
    {
      "to": "EURUSD",
      "from": "EURUSD.m"
    }
  ],
  "tradeSizeScaling": {
    "mode": "none"
  },
  "platformCommissionRate": 0
}

Usages#