# Sell when price falls below value in stoploss column of taken buy signal.
if 'stop_loss' in trade_row:
if current_rate <= trade_row['stop_loss'] <trade.open_rate:
return 'stop_loss'
# Sell when price reaches value in take_profit column of taken buy signal.
if 'take_profit' in trade_row:
if trade.open_rate <trade_row['take_profit']<=current_rate:
return 'take_profit'
# Sell any positions at a loss if they are helpd for more than two days.
if current_profit <0and(current_time.replace(tzinfo=trade.open_date_utc.tzinfo)-trade.open_date_utc).days>= 1:
return 'unclog'
```
See [Custom stoploss using an indicator from dataframe example](strategy-customization.md#custom-stoploss-using-an-indicator-from-dataframe-example) for explanation on how to use `dataframe` parameter.
## Custom stoploss
The stoploss price can only ever move upwards - if the stoploss value returned from `custom_stoploss` would result in a lower stoploss price than was previously set, it will be ignored. The traditional `stoploss` value serves as an absolute lower level and will be instated as the initial stoploss.