Position management node

1. Node overview

Position management is central to strategy execution. It controls capital allocation, entry size, and take-profit and stop-loss settings, directly shaping the strategy's risk-and-return profile.

Position in the data flow
Data sourceData processingAI modelStrategy typePosition managementRisk controlTrading engine
Normal mode

Enters at a fixed ratio to control risk per trade

Supports fixed take-profit/stop-loss and trailing stops

Available for timing and instrument-selection strategies

Grid mode

Adds to positions in layers to average the cost basis

Supports oscillation and trend modes

Available only for timing strategies

2. Interactive configuration

The panel below is the actual position-management configuration. Use it to explore every setting directly.

Simulated connected strategy type:

💡 Position-management settings adapt automatically to the connected strategy type. Timing strategies support grid mode; instrument-selection strategies have additional multi-instrument controls.

Position management configuration

(Target position: 10%)

Closes at fixed ratios; suited to oscillating markets.

(Close at 5% profit)

(Close at 2% loss)

(Total limit across assets: 100%)

3. Position-management modes

Choose normal mode, available for timing and selection strategies, or grid mode, available only for timing strategies. Normal is the default. Grid mode has two strategy modes: oscillation and trend.

3.1 Normal mode

For timing and instrument-selection strategies; controls risk with fixed-size entries and exits.
ParameterDefaultDescription
Per-symbol entry ratio0.1Target share of total capital for each entry. 0.1 means a 10% target position; for an account value of 10,000, the target is 1,000.
Take-profit/stop-loss modeFixed take-profit and stop-lossChoose Fixed or Trailing. Fixed mode calculates exit prices from the entry price. A trailing stop moves upward as the price rises.
Per-symbol take profit0.05Closes the position when profit reaches this ratio. 0.05 means 5%; an entry at 100 exits at 105.
Per-symbol stop loss0.02Closes the position when loss reaches this ratio. 0.02 means 2%; an entry at 100 exits at 98.
Position limit1Maximum sum of all order positions. For an account of 10,000, 1 means 100% fully invested; 2 means 200% exposure, or two-times leverage.
Fixed take-profit/stop-loss
Calculates fixed exit levels from entry price and executes when touched. Suitable for volatile markets requiring strict risk control.

Entry 100, take profit 5%, stop loss 2%

Take-profit price = 100 × (1 + 0.05) = 105

Stop-loss price = 100 × (1 - 0.02) = 98

Trailing stop
Moves the stop upward as price rises, locking in part of the gain. Suitable for capturing larger moves in trending markets.

Entry 100, stop distance 2%

Initial stop = 100 × (1 - 0.02) = 98

Price rises to 110 → stop = 110 × 0.98 = 107.8

Trailing-stop illustration
11010510098Time →EntryHighRaiseRaiseStop triggered2% pullbackLocked-in profit
Price path
Trailing stop
Entry
Stop
Price path

Entry: 100 → high: 110 → 2% pullback → stop triggered

Core mechanism

• Price rises → stop rises

• Price falls → stop stays fixed

• Price touches stop → automatic exit

Advantages

• Hold while the trend continues

• Exit on reversal and lock in profit

• Avoid exiting too early at a fixed target

3.2 Grid mode

For timing strategies only; buys low and sells high through layered entries and grid exits.
Important: Grid mode supports timing strategies only, not instrument-selection strategies. Ensure the upstream node is a timing-strategy node.
Entry and exit logic: Open-long/open-short conditions create the first grid layer only when no position is open. Once a grid holds a position, further same-direction entry signals are suppressed to prevent duplicate grids. A close-long/close-short condition matching the active direction closes every layer and exits the grid. The grid still performs its configured adds, take profits, and stop losses. Entry or exit conditions may be blank: a blank entry never starts a new grid, and a blank exit never causes a signal-based close.
Oscillation-mode characteristics

Designed for range-bound markets. It adds layers as price falls to reduce the average cost and takes profit layer by layer as each layer rebounds. A fixed stop loss limits maximum drawdown.

Base parameters

ParameterDefaultDescription
Initial position0.1Capital ratio used for the first layer. 0.1 means 10%; with an account value of 10,000, the initial entry is 1,000.
Layer multiplier1Each layer amount = previous layer × multiplier. The default value of 1 gives every layer the same capital amount.
Number of layers10Maximum number of grid layers. More layers withstand a larger decline but require more capital.
Initial interval0.01Price distance between layers 1 and 2. 0.01 means 1%; from an entry price of 100, layer 2 triggers at 99.
Interval multiplier1Multiplier applied to each successive interval. 1 gives equal spacing; above 1 gives deeper layers wider spacing, which is suitable for sharp market declines.

Risk assessment (calculated automatically)

Current assessment
Changes with the parameters
Use the live result shown in the actual interactive configuration panel above.
Before live trading
Backtest required
Validate the current configuration with backtests before using it in live trading.

Take-profit/stop-loss parameters

ParameterDefaultDescription
Take-profit modePer-layer take profitChoose per-layer or full-grid take profit. Per-layer exits each profitable layer independently; full-grid waits for the overall grid to become profitable and closes all layers together.
Per-layer take profitInitial interval × 1.5The target is the layer entry price plus or minus 1.5 times that layer's interval. Only the layer that reaches its target closes.
Full-grid take profit10%Combines profit and loss across every layer. When the total gain reaches 10%, all layers close. Suitable for larger swings and a higher return per cycle.
Full-grid stop-loss ratio20%Combines losses across all layers. At a 20% overall loss, every layer is forcibly closed to prevent a larger loss.
Per-layer take profit

Each layer has an independent target; only the layer that reaches it closes.

Use cases:

• High-frequency range-bound markets

• Taking profit layer by layer

• Reducing holding-time risk

Full-grid take profit

Profit and loss are combined; all layers close together when the total target is reached.

Use cases:

• Larger market swings

• Seeking higher return per cycle

• Able to tolerate a longer holding period

Oscillation-mode take-profit examples
Custom example settings (not defaults)
Initial position: 0.01 (1%)
Layer multiplier: 2
Initial interval: 0.01 (1%)
Per-layer target: 0.01 (1%)
Per-layer example
10110099981: 1002: 993: Layer 2 TP4: Layer 1 TP 101

1. Open layer 1 at 100 with 1% capital = 100.

2. A 1% decline starts layer 2 at 99: 100 × 2 = 200.

3. Layer 2 rises 1% to 99.99: close layer 2 only.

4. Layer 1 rises 1% to 101: close layer 1 only.

Each layer is independent, recycling capital quickly.

Full-grid example — target 0.05 (5%)
1041009998971: 1002: 993: 984: Full TP 103.49Cost basis ≈ 98.57

1-3. Open three layers at 100, 99, and 98: 100 + 200 + 400 = 700.

Capital-weighted average price = 700 / (100 / 100 + 200 / 99 + 400 / 98) ≈ 98.57.

Full-grid target price = 98.57 × (1 + 5%) ≈ 103.49.

4. At 103.49 the total gain is 5%, so all layers close.

Waits for aggregate profit to seek a larger return.

Full-grid stop loss, common to both take-profit modes: when aggregate unrealized loss reaches the full-grid stop ratio, 0.2 or 20% by default, every layer is forcibly closed.
Trend-mode characteristics

Designed for trending markets. It replaces a fixed stop with a trailing stop, holds while the trend continues, and protects profit with a pullback threshold when the trend reverses.

Base parameters

ParameterDefaultDescription
Initial position0.1Capital ratio used for the first layer. 0.1 means 10%; with an account value of 10,000, the initial entry is 1,000.
Layer multiplier1Each layer amount = previous layer × multiplier. The default value of 1 gives every layer the same capital amount.
Number of layers10Maximum number of grid layers. More layers withstand a larger decline but require more capital.
Initial interval0.01Price distance between layers 1 and 2. 0.01 means 1%; from an entry price of 100, layer 2 triggers at 99.
Interval multiplier1Multiplier applied to each successive interval. 1 gives equal spacing; above 1 gives deeper layers wider spacing, which is suitable for sharp market declines.

Risk assessment (calculated automatically)

Current assessment
Changes with the parameters
Use the live result shown in the actual interactive configuration panel above.
Before live trading
Backtest required
Validate the current configuration with backtests before using it in live trading.

Trailing-stop parameters

ParameterDefaultDescription
First-layer pullback threshold0.1Stop distance when only layer 1 is held. 0.1 means 10%; from a highest price of 100, a decline to 90 triggers the stop.
Full-grid pullback threshold0.03Stop distance when all layers are filled. 0.03 means 3%; a fully loaded position uses a smaller tolerance to exit quickly and protect profit.
First-layer threshold (0.1 = 10%)
With only layer 1 held, a 10% pullback from the highest price closes the grid. The light position receives more room, avoiding frequent stops.
Full-grid threshold (0.03 = 3%)
With every layer filled, a 3% pullback from the highest price closes the grid. A heavily loaded position receives less room so profit is protected quickly.
Linear interpolation formula
Current threshold = first-layer threshold - (first-layer threshold - full-grid threshold) × (current layer count - 1) / (total layer count - 1)

For the default ten layers, a first-layer threshold of 10%, and a full-grid threshold of 3%:

Layer 1
10.0%
Layer 2
9.2%
Layer 3
8.4%
Layer 4
7.7%
Layer 5
6.9%
Layer 6
6.1%
Layer 7
5.3%
Layer 8
4.6%
Layer 9
3.8%
Layer 10
3.0%
Trend-mode trailing-stop illustration
1201101009590Time →EntryAddHighRaiseRaiseRaisePullback thresholdStop triggeredLocked-in profit
Price path
Trailing stop
Entry / add
Stop
How it works

• A new price high moves the stop upward.

• A price pullback leaves the stop unchanged.

• Touching the stop closes every layer.

Dynamic threshold

• Layer 1 only: a 10% pullback triggers.

• Fully filled: a 3% pullback triggers.

• Intermediate layers: threshold is linearly interpolated.

Illustrative path: open → add layers → new high → trailing stop rises → pullback reaches threshold → stop triggers and accumulated profit is locked in.

4. FAQ

Q: How should I choose between normal and grid mode?

Normal mode suits clearly trending markets and uses fixed-size entries and exits for stable risk control. Grid mode suits range-bound markets and averages cost with layered entries, but needs more capital reserves. Instrument-selection strategies support normal mode only.

Q: How do oscillation and trend grid modes differ?

Oscillation: uses a fixed stop for buying low and selling high in a range; closes when aggregate loss reaches the full-grid stop ratio.

Trend: uses a trailing stop to capture a trend; dynamically adjusts the stop through pullback thresholds and holds longer while the trend continues.

Q: What do full-grid leverage ratio and decline/pullback to zero mean?

Full-grid leverage ratio: total position value as a share of account capital after every layer has filled. Above 100% requires leverage.

Decline/pullback to zero: the adverse price decline or pullback required to reduce account equity to zero. “Does not reach zero” means the model retains positive equity within the price domain.

Q: How should I set the number of layers and layer multiplier?

More layers and a larger multiplier increase full-grid capital needs. Adjust them using the risk assessment:

  • • Conservative: 3-5 layers, multiplier 1.5-2
  • • Aggressive: 6-8 layers, multiplier 2-3
  • • Keep the full-grid leverage ratio within your acceptable range, preferably no more than 100%.
    BeeQuant - AI Quantitative Trading Platform