'Freqtrade Python Sell Sign

I am trying to create a sales order using the Freqtrade bot when:

The current price hits the entry price + ATR. I don't know how I can retrieve the entry price (The price I made the purchase). this is my code:

   def populate_sell_trend(self, dataframe: DataFrame, metadata: dict)
-> DataFrame:
        dataframe.loc[
            (
                ( dataframe['high']>= dataframe['atr'].shift(1) +  ??open_rate??   )
            ) ,
            'sell'] = 1
        return dataframe

what do I put in place of open_rate?



Solution 1:[1]

if you want the open_rate from the candle dataframe['open'] if you want the open_rate from the trade you have to use a CustomSell and import the trade and use trade.current_rate

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pjotr