# Position entry / exit settings

<figure><img src="https://996336407-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvSQbeA5D3PC0GX0QTFFZ%2Fuploads%2ForaoYdaiNFXl0nULuvut%2Fimage.png?alt=media&#x26;token=ce0cc27f-2a65-494e-b451-8a65baa51534" alt=""><figcaption></figcaption></figure>

**% Mode** — by default, percentage mode is enabled, allowing you to set bot parameters as percentages. In this mode, parameters automatically adapt to changes in the asset price.

If % Mode is disabled, parameters are fixed as absolute values and remain unchanged as the price fluctuates.

**Target Distance** — the distance from the IN order entry price to the level where the bot places a trigger. Once price reaches this trigger at the Target Distance, the bot places a stop-profit order at a distance of Min. Stop.

[Target Distance](https://www.youtube.com/watch?v=w3pZtxc1BDE)

**Min. Stop Profit** — the minimum distance from the trigger at which the bot locks in profit. When price reaches the Target Distance trigger, the bot places a stop-profit order at the Min. Stop distance. If price then retraces by the Min. Stop distance, the bot closes the IN order and realizes profit.

If Min. Stop Profit is not set, it is automatically set to 0.

With 0, the closing order is placed exactly at the trigger level and does not fill instantly — it fills only after price moves minimally beyond the stop level:

* Downwards for long positions
* Upwards for short positions

[Min. Stop Profit](https://www.youtube.com/watch?v=dOlG0zWvGcc)

Max. Stop Profit — after the trigger fires, if there is an unfilled stop-profit, it is combined with the next one under the rule that when the stop-profit executes, the actual profit of each individual IN order equals the profit of the combined position. Max. Stop works like a trailing stop and can increase realized profit by moving the combined stop upward. The combined stop-profit cannot deviate from the current price by more than the Max. Stop value. Once the price delta reaches the Max. Stop value, the combined stop-profit follows the price as a trailing stop. With Max. Stop enabled, each subsequent IN order can be closed with increasing profit.

If Max. Stop is not set, it is automatically set to 0 and does not affect the bot.

[Max. Stop Profit](https://www.youtube.com/watch?v=b1HqPCEeOXk)

After you fill in all fields, the bot shows an estimated profit per deal:

**Expected profit per deal = Order Size × (Close Price − Open Price) − \[(Order Size × Open Price × Taker Fee) + (Order Size × Close Price × Taker Fee)]**

Where:

* Open Price is the current asset price at the moment of calculation
* Close Price is the current price + (Target Distance − Min. Stop)

When IN orders are combined into an Out Stop, some orders may close at a loss, but due to combining, the average closing price across all orders will be higher.

If the asset price changes significantly, the estimated profit per deal may become negative. In that case, the bot may switch to “Failed” status. To restore normal operation, you need to revise and adjust Target Distance and Min. Stop to fit the new market conditions.

#### Out by Average Price

Out by Average Price is a position-closing mode that locks profit based on the average entry price of all open orders placed by the bot. Instead of closing each order individually, the bot places a single trigger at the specified distance (Target Distance) from the average entry price.

Out by Average Price is available for all bot types and can be enabled or disabled at any time.

Example

Assume the bot buys SOL with a $10 step below $100, with a 5% target:

1. 1 SOL at $100
2. 1 SOL at $90
3. 1 SOL at $80
4. 1 SOL at $70

   Average entry price: $85

   Exit price: $89.25 (5% above the average entry).

Important: once the trigger is reached (Target Distance away from the average entry), the bot stops opening new IN orders until it closes the formed Out stop.

This setting is especially useful if:

* You want the bot to close positions only above the average entry.
* You want to optimize averaging to improve the exit point.
* You plan to use a strategy similar to exchange “Futures Martingale,” but with extended controls.

[Out by Average Price](https://www.youtube.com/watch?v=R5Umd5xBphs)

#### Do not worsen entry price

When enabled, the bot will not create new IN orders above the average entry price for long, or below the average entry price for short.

With Do not worsen entry price enabled, the bot continues managing existing orders and closing positions under the defined rules, but it stops opening new IN orders if the current price would worsen the average entry.

You should monitor the average price in the summary statistics. In Dynamic Auto, the average is calculated separately for each side.

This feature is available only for bot types: Default, Dynamic, and Indicator Grid.

[Disable IN by AVG price](https://www.youtube.com/watch?v=90FVQQ0tAgg)

#### In Stop

In Stop is a parameter that lets you control when the bot opens IN orders based on price deviation.

[In Stop](https://www.youtube.com/watch?v=_df-eC0BglQ)

How it works:

* If In Stop > 0, the bot opens IN orders only after the current price deviation exceeds the In Stop value.
* When the price direction changes (e.g., moves into loss), all active IN orders are merged into one combined order with a single trigger, improving efficiency.

Example (Long bot):

When price rises:

* The bot creates IN orders with the Grid Step, and for each one it tracks price deviation by the In Stop value.
* The first order is created only after price deviates by In Stop.
* Grid Step stays the same; all subsequent orders open according to the grid settings as usual.

When price falls:

* The bot does not open the first order immediately on the way down. It waits until the decline stops and price reverses.
* The IN order opens only when price rises by the In Stop value after the reversal from the local low.

When price drops with no pullbacks:

* If price falls straight down and passes multiple Grid Step levels, the bot will not open separate IN orders at each level.
* Instead, after a reversal upward by In Stop, it opens one combined order equal to the sum of all skipped IN orders and places a single trigger at the Target Distance.

Benefits:

* In Stop helps improve entries by opening orders only after a direction change, capturing better entry points.
* Especially useful during sharp market moves where you want to wait for a reversal before entering.
* By trailing the entry, you can increase potential profit by syncing entries more precisely with the market.

Important:

* In Stop delays the first order until price changes by the In Stop value.
* In Stop is available only for DEFAULT and DYNAMIC bot strategies.

Using In Stop enables more flexible reaction to market changes, avoids entries at unfavorable points, and improves positioning during strong price moves.
