Strategy Field

Use signal quantity

If you check the Use signal quantity checkbox, then the quantity settings in your webhook will be used and will override the settings defined in your strategy. Here are examples of all the different settings for quantity that can be controlled from the webhook.

Fixed Quantity

Always buy 100 shares of AAPL.

{
    "ticker": "AAPL",
    "action": "buy",
    "quantityType": "fixed_quantity",
    "quantity": 100
}

Amount Per Position

Buy $1000 worth of AAPL shares. If the price of AAPL is $100, the quantity will be 10.

{
    "ticker": "AAPL",
    "action": "buy",
    "quantityType": "amount_per_position",
    "quantity": 1000
}

Risk Per Position

Buy a quantity of shares that will risk at most $100 in the position. If the price of AAPL is $100 and the stop loss price is $90, the quantity will be 10. If your stop loss is hit, you will lose $100.

{
    "ticker": "AAPL",
    "action": "buy",
    "quantityType": "risk_per_position",
    "quantity": 100,
    "stopLoss": {
        "stopPrice": 90
    }
}

Percent of Equity

Buy 10% of your equity worth of AAPL shares. If you have a $10000 account and the current price of AAPL is $100, the quantity will be calculated as 10.

{
    "ticker": "AAPL",
    "action": "buy",
    "quantityType": "percent_of_equity",
    "quantity": 10
}

Percent of Position

Sell 10% of your position in AAPL. If you have 100 shares of AAPL, the quantity will be calculated as 50.

{
    "ticker": "AAPL",
    "action": "sell",
    "quantityType": "percent_of_position",
    "quantity": 50
}

Ready to automate your trading? Sign up for free today.