Below are the allowed values for quantityType
and examples for each.
The fixed quantity is the simplest quantity type. In this example it will simply buy 10 shares of AAPL.
In this example it will buy $10000
worth of AAPL
. If the current price of AAPL
Is $100
, then it will calculate a quantity of 100
.
In this example it will buy 10
shares because we've said that the most we want to be able to lose is $100
. If we get filled at $180
and we have a stop loss at $170
, then if we get stopped out we'll lose $10
per share, which means we can afford to buy 10
shares.
In this example, if you have a $100000
account and you want to buy AAPL
using 10%
of your total equity, and your limitPrice
is $100
, then it will calculate a quantity of 100
shares.
In this example, we are selling 50%
of the open AAPL
position. If the total quantity of the AAPL
position was 100
shares, then it would calculate a quantity of 50
.
The addition of the quantityType
field to TradersPost webhooks marks a significant enhancement in how you can manage and automate your trades. By allowing for dynamic calculation of order sizes, it provides greater flexibility and precision in executing your trading strategies. Whether you're working with fixed quantities, dollar amounts, risk-based amounts, or percentages of your equity or positions, this new feature simplifies the process and ensures your trades align with your strategic objectives. Integrate these options into your webhook settings today and experience more controlled and tailored trading automation with TradersPost.