Place Trade with Risk

Place a trade with a predefined level of risk, and let the rule automatically calculate the appropriate trade size and stop loss for you. Instead of manually computing position sizes based on your risk tolerance, the Place Trade with Risk rule handles all the mathematics, ensuring that every trade you take conforms precisely to your risk management plan. Define your risk as a monetary amount, a number of pips, or a fixed stop loss price, and the rule does the rest.

How It Works

The Place Trade with Risk rule integrates order placement with built-in risk management. When you configure this rule, you choose how you want to define your risk, and the rule calculates the correct trade size to match that risk level.

There are three ways to define your risk:

  • Amount — Specify the maximum monetary amount you are willing to lose on the trade. The rule calculates the trade size based on this amount and the distance to the stop loss.
  • Pips — Specify the stop loss distance in pips from the entry price. If you also provide a risk amount, the rule will calculate the trade size that risks exactly that amount over the specified pip distance.
  • Stop Loss Price — Specify a fixed price level for the stop loss. The rule calculates the trade size based on the distance between the entry price and the stop loss price, combined with your risk amount.

When the Manage Risk option is enabled, the rule will actively manage the trade by placing a stop loss order automatically. Combined with the Trailing option, the stop loss will adjust itself as the trade moves into profit, protecting your gains while allowing room for further price appreciation.

If the calculated trade size exceeds the broker's maximum or a user-defined maximum quantity, the rule can either cap the trade at the maximum size or split it into multiple smaller orders when the Exceed Max Quantity option is enabled.

Like the Place Trades rule, this rule also includes options for retry timeout and close on cancel to handle order execution edge cases gracefully.

Inputs

Input Description Required Default
Symbol The financial instrument to be traded and the account to be used. Yes
Side Whether the order is to buy or sell. Available values: Buy, Sell. Yes
Order Type The type of order to be placed. Available values: Market, Limit, Stop, Stop Limit, Limit Stop. Yes
Target Price The entry price for the trade. For Market orders, this is not required as the trade fills at the current market price. No
Offset Pips An offset in pips applied to the target price, allowing fine-tuning of the entry level. No
Entry Range Pips The acceptable price range for Stop Limit and Limit Stop orders. No
Manage Risk When enabled, the rule will actively manage the trade's risk by placing and maintaining a stop loss order. Yes false
Risk Type The method used to define the trade's risk. Available values: Amount, Pips, Stop Loss Price. No
Trade Risk Amount The maximum monetary amount you are willing to risk on this trade. No
Trade Risk Pips The stop loss distance measured in pips from the entry price. No
Stop Loss Price A fixed price level at which the stop loss should be placed. No
Risk Amount Option The method used to calculate the trade size when risking a specific amount. Available values: Trade Risk Pips, Stop Loss Price, Trade Quantity. No
Trailing When enabled, the stop loss will automatically adjust as the trade moves in a profitable direction, locking in gains. No false
Quantity The trade quantity. This is used when risk is not being managed by the rule and you want to specify a fixed position size. No
Max Quantity The maximum allowed quantity for a single trade. If the calculated size exceeds this, the behaviour depends on the Exceed Max Quantity setting. Yes
Exceed Max Quantity When enabled, allows the rule to place multiple trades if the calculated quantity exceeds the maximum, splitting the position across several orders. Yes false
Retry Timeout (s) The number of seconds to wait before retrying a failed order placement. Set to 0 to disable retries. No 0
Close on Cancel If a cancellation request fails because the order was already filled, this option will immediately close the resulting position. No true

Outputs

Output Description List
Trade Id(s) A list of the trade IDs that were created. Multiple IDs are returned if the position was split across several orders. Yes
Risk Amount The calculated monetary risk amount for the trade, based on the final position size and stop loss distance. No
Risk Pips The calculated risk distance in pips between the entry price and the stop loss. No
Risk Quantity The calculated position size that was determined by the risk calculation. No
Stop Loss Price The calculated stop loss price that was applied to the trade. No
Updated Trade(s) Details of the trade or trades that were updated with risk management orders. Yes

Tips

For consistent risk management across your strategy, use the Amount risk type and set a fixed monetary amount you are willing to risk per trade. This ensures that regardless of the instrument's volatility or pip value, each trade risks the same dollar amount. Enable the Trailing option to automatically protect profits as the trade moves in your favour, and always set a sensible Max Quantity to prevent unexpectedly large positions in low-volatility instruments where the calculated size could be very large.

Was this helpful? Let us know