Skip to content

Configure trade signal lifetime#

Overview#

In CopyFactory you can configure how long a trade signal will stay active.

If a subscriber is not connected to broker at the time the trade signal arrives or if there is an error applying trade signal on a subscriber side, then CopyFactory will retry applying trade signal when account becomes healthy again. The period during which the trade signal can be applied is configurable. The period during which the signal can be applied is not limited for close trade signals.

You can also configre the time during which copied positions will be kept alive. Positions not closed during this time will be closed automatically by CopyFactory.

By default CopyFactory will keep open position trade signal active for 1 minute and will let position to live for up to 90 days. If you want to override this behaviour then you can specify an optional timeSettings setting. This setting can be specified on strategy entity only.

Setting schema is defined in StrategyTimeSettings model.

Example (strategy)#

{
  "name": "Strategy",
  ...
  "timeSettings": {
    "lifetimeInHours": 168,
    "openingIntervalInMinutes": 5,
    "expirePendingOrderSignals": true
  },
  ...
}