A post shared a trading bot prompt that said, “Keep maximum drawdown within 15%, and check the shutdown button before every order.” What does that 15% mean for each trade—how much should you risk losing, and how large should your position be? First, break it down into a per-trade risk percentage, then work backward from the stop-loss distance to calculate position size: nominal position value = current equity × per-trade risk % ÷ stop-loss distance %.
The per-trade risk percentage determines how many consecutive losses you can withstand. Assuming each trade loses a fixed proportion r of current equity, the drawdown after n consecutive losses = 1-(1-r)^n.
At 1% risk per trade: 16 consecutive losses result in a 14.85% drawdown; the 17th brings it to 15.71%, crossing the limit.
At 2% risk per trade: 8 consecutive losses result in a 14.92% drawdown; the 9th brings it to 16.63%.
At 3% risk per trade: 5 consecutive losses result in a 14.13% drawdown; the 6th brings it to 16.70%.
Increasing per-trade risk from 1% to 3% is only a two-percentage-point change, but it cuts the number of consecutive losses you can withstand before crossing the limit from 16 to 5.
Now consider position size. Suppose your equity is 10,000 USDT and your per-trade risk is 1%, so you can lose at most 100 USDT per trade. With a stop-loss at 4%, your position size is 2,500 USDT; with a stop-loss at 2%, it is 5,000 USDT. Many people think that setting a closer stop-loss is safer. According to this formula, the distance to the stop-loss only determines position size; the per-trade risk percentage still determines how many consecutive losses it takes to reach a 15% drawdown. However, the closer the stop-loss, the more likely it is to be hit, so consecutive losses may come faster.
It’s also important to understand how the shutdown threshold is calculated. Most risk controls measure drawdown from the account’s equity peak: if the account rises to 12,000 USDT and then falls back to 10,200, you should stop—even though the account has not yet lost 15% of its initial capital. So whenever equity reaches a new high, the shutdown threshold should be raised accordingly.
To apply this to your own account, first write down how many consecutive losses you can tolerate, denoted by n, then work backward to find r using 1-(1-r)^n ≤ 15%. For example, if you want to withstand 10 consecutive losses, r should not exceed about 1.61%. Then calculate the nominal position size based on each trade’s stop-loss distance and check it before placing the order. If you use AlgoRover Live, you can change the per-trade risk to 1% in the conversation and save it as a separate version, keeping the original strategy intact. Then check the orders, positions, and risk status in the paper-trading account to confirm that each position size matches your calculation.
(The examples above are hypothetical calculations. They do not account for slippage, fees, gaps through stop-losses, or liquidation due to leverage, so actual losses per trade may exceed the set amount. These are not backtest or live trading results and do not constitute investment advice.)
#量化交易 #风险管理 #algorover
The per-trade risk percentage determines how many consecutive losses you can withstand. Assuming each trade loses a fixed proportion r of current equity, the drawdown after n consecutive losses = 1-(1-r)^n.
At 1% risk per trade: 16 consecutive losses result in a 14.85% drawdown; the 17th brings it to 15.71%, crossing the limit.
At 2% risk per trade: 8 consecutive losses result in a 14.92% drawdown; the 9th brings it to 16.63%.
At 3% risk per trade: 5 consecutive losses result in a 14.13% drawdown; the 6th brings it to 16.70%.
Increasing per-trade risk from 1% to 3% is only a two-percentage-point change, but it cuts the number of consecutive losses you can withstand before crossing the limit from 16 to 5.
Now consider position size. Suppose your equity is 10,000 USDT and your per-trade risk is 1%, so you can lose at most 100 USDT per trade. With a stop-loss at 4%, your position size is 2,500 USDT; with a stop-loss at 2%, it is 5,000 USDT. Many people think that setting a closer stop-loss is safer. According to this formula, the distance to the stop-loss only determines position size; the per-trade risk percentage still determines how many consecutive losses it takes to reach a 15% drawdown. However, the closer the stop-loss, the more likely it is to be hit, so consecutive losses may come faster.
It’s also important to understand how the shutdown threshold is calculated. Most risk controls measure drawdown from the account’s equity peak: if the account rises to 12,000 USDT and then falls back to 10,200, you should stop—even though the account has not yet lost 15% of its initial capital. So whenever equity reaches a new high, the shutdown threshold should be raised accordingly.
To apply this to your own account, first write down how many consecutive losses you can tolerate, denoted by n, then work backward to find r using 1-(1-r)^n ≤ 15%. For example, if you want to withstand 10 consecutive losses, r should not exceed about 1.61%. Then calculate the nominal position size based on each trade’s stop-loss distance and check it before placing the order. If you use AlgoRover Live, you can change the per-trade risk to 1% in the conversation and save it as a separate version, keeping the original strategy intact. Then check the orders, positions, and risk status in the paper-trading account to confirm that each position size matches your calculation.
(The examples above are hypothetical calculations. They do not account for slippage, fees, gaps through stop-losses, or liquidation due to leverage, so actual losses per trade may exceed the set amount. These are not backtest or live trading results and do not constitute investment advice.)
#量化交易 #风险管理 #algorover

