The "OrderBook" strategy is designed for backtesting trading strategies on a website. Here is a brief description of what the strategy does:
The strategy uses the order book data to calculate aggregated order book bids and asks. It determines the average ask and bid prices from the aggregated order book data.
It sets a threshold for detecting sell pressure and buy pressure based on the average ask and bid prices.
If the current price is within a certain range of the ask prices and the ask volume exceeds the sell pressure threshold, an alert is triggered indicating "SELL PRESSURE" with the volume and price.
If the current price is within a certain range of the bid prices and the bid volume exceeds the buy pressure threshold, an alert is triggered indicating "BUY PRESSURE" with the volume and price. The strategy also uses the "beepy" library to play a sound alert when an alert is triggered. The strategy sets a minimal return on investment (ROI) target of 10% and a stop loss of -99%. The strategy operates on a 1-hour timeframe. Please note that this description is a summary and may not include all the intricacies and details of the strategy. It's important to refer to the code and consult the strategy's documentation for a comprehensive understanding.