Options

Options are displayed/updated from the command line by typing the following commands:

# view/list global option commands
node tradeforme

# upgrade the application (paid version only)
node tradeforme upgrade

# upgrade the database after application update
node tradeforme upgradeDatabase
# activate your software (paid version only)
node tradeforme activate [email protected]

# deactivate your software to move to another computer (paid version only)
node tradeforme deactivate

# view/list config tool usage
node tradeforme config

# view available watchlist functions
node tradeforme watchlist

# view/list global config options
node tradeforme config get

# get a single config option value
node tradeforme config get --maxRiskPerTrade

# get a single nested option value
node tradeforme config get --tdConfig.apiKey

# set a single config option value
node tradeforme config set --maxRiskPerTrade=50

# set a single nested option value
node tradeforme config set --tdConfig.apiKey="XXXXXXX"
# view/list ORB strategy options
node tradeforme strategy ORB

# view/list SMACrossUp strategy options
node tradeforme strategy SMACrossUp

ORB

tradeforme strategy ORB run {flags}
        --instanceId=[ORB | custom] [Allow multiple instances]
	--symbol=XYZ [the --symbol flag overrides --watchlist... flags. Places a single order.]
	--breakoutCandle=[5 | 1 | 10 | 15 | 30]
	--watchlistType=default
	--watchlistName=yyyy-mm-dd
	--watchlistLimit=3
	--priceRange=false [Usage: --priceRange='10-100']
	--riskPerTrade=[maxRiskPerTrade | custom]
	--useSma=[false | true] [Only place trade if price is above smaFast and smaFast above smaSlow]
	--smaSlow=13
	--smaFast=9
	--smaCrossLag=5 [SMA crossed up within this number of candles]
	--debug [Write order details to log without placing an order]
tradeforme strategy ORB stop
    --instanceId=[ORB | custom] [Required when running multiple instances]
    --force [force quit regardless of open positions]

SMA Cross Up

tradeforme strategy SMACrossUp run {flags}
        --instanceId=[SMACrossUp | custom] [Allow multiple instances]
	--symbol=REQUIRED [required if not using watchlist]
	--candleLength=[5 | 1 | 10 | 15 | 30]
	--maxOrdersPerSymbol=1
	--smaSlow=13
	--smaFast=9
	--smaCrossLag=5 [SMA crossed up within this number of candles]
	--watchlistType=default
	--watchlistName=yyyy-mm-dd
	--watchlistLimit=3
	--priceRange=false [Usage: --priceRange='10-100']
	--riskPerTrade=[maxRiskPerTrade | custom]
	--debug [Write order details to log without placing an order]
tradeforme strategy SMACrossUp stop
    --instanceId=[SMACrossUp | custom] [Required when running multiple instances]
    --force [force quit regardless of open positions]

RSI Cross Up

tradeforme strategy RSICrossUp run {flags}
        --instanceId=[RSICrossUp | custom] [Allow multiple instances]
	--symbol=REQUIRED [required if not using watchlist]
	--lookback=14 [Number of periods to use for the RSI calculation]
	--threshold=30 [RSI cross from below to above this value to trigger entry signal]
	--candleLength=[5 | 1 | 10 | 15 | 30]
	--maxOrdersPerSymbol=1
	--watchlistType=default
	--watchlistName=yyyy-mm-dd
	--watchlistLimit=3
	--priceRange=false [Usage: --priceRange='10-100']
	--riskPerTrade=[maxRiskPerTrade | custom]
	--debug [Write order details to log without placing an order]
tradeforme strategy RSICrossUp stop
    --instanceId=[RSICrossUp | custom] [Required when running multiple instances]
    --force [force quit regardless of open positions]

Save TD movers watchlist

node tradeforme watchlist saveWatchlistTdMovers \
--watchlistName='$SPX.X' \
--watchlistType=td_movers_up \
--direction=up \
--type=percent

Save Historical Stock data for backtesting

node tradeforme saveHistory \
    --symbol=TSLA \
    --periodType=day \
    --frequencyType=minute \
    --frequency=1 \
    --startDate='YYYY-MM-DD hh:mm:ss' \
    --endDate='YYYY-MM-DD hh:mm:ss' \
    --needExtendedHoursData=true

Run ORB strategy

In the following example, the ORB strategy will be run against the default watchlist of the day. You may pass a custom watchlist name, or watchlist type as well.

node tradeforme strategy ORB run \
--breakoutCandle=15 \
--priceRange='10-100' \
--riskPerTrade=10 \
--watchlistLimit=4 &

Run SMA Cross Up Strategy

This example demonstrates how to run an sma cross up strategy on a 1 minute chart using the 10 and 20 period simple moving averages. It is using the dynamically generated watchlist from the TD Ameritrade developer API, and only placing trades for equities between $10 and $100.

node tradeforme strategy SMACrossUp run \
--candleLength=1 \
--smaSlow=20 \
--smaFast=10 \
--watchlistType=td_movers_up \
--priceRange='10-100' &