The "OBOnly" strategy is designed for backtesting trading strategies on a website. Here's a short description of what this strategy does:
The strategy uses the Freqtrade library and implements the "IStrategy" interface. It defines a minimal return on investment (ROI) for different time periods.
The stop loss is disabled in this strategy.
The timeframe for analysis is set to 1 hour.
The strategy requires a startup candle count of 50 before producing valid signals. It defines several variables related to order book analysis, such as history, delta bid/ask, ratio, blend, and log. The "confirm_trade_entry" function is called to determine whether to enter a trade. It retrieves the order book data, calculates bid and ask cut-off prices based on the mid-price, and calculates bid and ask side volumes. If certain conditions are met, the function returns True to initiate a trade. The "populate_indicators" function is empty and does not populate any additional indicators. The "populate_buy_trend" function sets a "buy" flag to 1 in the DataFrame, indicating a buy signal. The "populate_sell_trend" function sets a "sell" flag to 0 in the DataFrame, indicating no sell signal. Overall, the strategy focuses on analyzing the order book and initiating trades based on specific conditions related to bid/ask volumes and historical ratios. It provides minimal ROI targets for different time periods and sets up the necessary indicators for backtesting.