Trade Smarter with Automation

Parameters

This document will cover the parameters available in Alta5. It assumes the reader has basic programming skills and has reviewed the Strategy Basics guide.

Parameter Types

Parameters are used to provide predefined configuration values to a strategy. Below is a list of the parameter types that come bundled with Alta5:

Security

security

Provides a field to search for a symbol. The default list contains recently used symbols.

symbol field

Usage:


params: [{
    id: 'vixSymbol',
    type: 'security',
    defaultValue: 'VIX'
}]

Text String

string

Provides a text input field for a string value.

string field

Usage:


params: [{
    id: 'remoteUser',
    type: 'string',
    required: true,
    maxLength: 20
}]

Number

number

Provides a number field for a numeric value.

number field

Usage:


params: [{
    id: 'slippage',
    type: 'number',
    label: 'Slippage',
    min: 0,
    max: 100,
    required: true,
    allowDecimals: true,
    defaultValue: 0,
    step: .01, // increment for spinner buttons
    description: 'The amount slippage to allow in order pricing.'
}]

Boolean

boolean

Provides a button bar to select a boolean (true/false, yes/no) value.

boolean field

Usage:


params: [{
    id: 'multiWeek',
    type: 'boolean',
    label: 'Look Ahead',
    required: true,
    defaultValue: false,
    trueText: 'Yes',
    falseText: 'No',
    description: 'Seek a position at the next expiration if none are available.'
}]

Date

date

Provides a date picker to select a date.

Usage:


params: [{
    id: 'startDate',
    type: 'date',
    label: 'Start Date',
    defaultValue: 'today',
    max: 'today',
    stripTime: true
}]

Date Range

daterange

Provides a date range picker to select a date range.

daterange field

Usage:


params: [{
    id: 'range',
    type: 'daterange',
    label: 'Date Range',
    max: 'today',
    displayFormat: 'M j',
    defaultValue: {start: '30 days ago', end: 'yesterday'}
}]

Enumeration

enum

Provides a button bar to select from a list of predefined options.

enum field

Usage:


params: [{
    id: 'itmMinutes',
    type: 'enum',
    label: 'ITM Minutes',
    items: [5, 10, 15, 30, 45, 60],
    defaultValue: 15,
    description: 'The number of minutes before expiration to exit any ITM position.',
    displayTpl: '{value} minutes'
}]

Picker

pick

Provides a drop down picker to select one from a list of predefined options.

pick field

Usage:


params: [{
    id: 'waitTime',
    type: 'pick',
    label: 'Wait Time',
    description: 'Amount of time to wait before seeking a new position after exiting a position.',
    defaultValue: '1h',
    items: [
        {value: 0, text: 'No delay'},
        {value: '1m', text: '1 minute'},
        {value: '5m', text: '5 minutes'},
        {value: '15m', text: '15 minutes'},
        {value: '30m', text: '30 minutes'},
        {value: '1h', text: '1 hour'},
        {value: '2h', text: '2 hours'},
        {value: '4h', text: '4 hours'},
        {value: 'nextday', text: 'Next Open'},
        {value: 'monday', text: 'Next Week'}
    ]
}]

List

list

Provides a multi select box to select multiple from a list of predefined options.

Usage:


params: [{
    id: 'remoteStatus',
    type: 'list',
    label: 'Status Codes',
    description: 'Select 1 ore more  status codes.',
    items: [
        {value: 'any', text: 'Any Status'},
        {value: 'enter', text: 'Enter'},
        {value: 'partial', text: 'Partial'},
        {value: 'sent', text: 'Sent'},
        {value: 'created', text: 'Created'},
        {value: 'rejected', text: 'Rejected'},
        {value: 'cancelled', text: 'Cancelled'},
        {value: 'active', text: 'Active'}
    ]
}]

Parameter Groups

Parameters can be organized into groups on the Strategy Options form by adding a group property to any parameter. All parameters following a parameter with a group will be included in the new group.

Example:

Grouped parameters



params: [{
    id: 'sdDuration',
    type: 'enum',
    label: 'Days',
    items: [10, 14, 21, 30, 45, 60, 90, 180],
    defaultValue: 90
},{
    group: 'Earnings',   // grouping
    id: 'earningsDays',
    type: 'number',
    label: 'Earnings Days',
    min: 0,
    max: 30
},
...]