Frequency Weighted OrderBook Analysis
Frequency Weighted OrderBook Analysis (FWOBA)
This is a collection programs that download and analyze orderbook data in near real-time and is a full working example of orderbook analysis built on top of the Jackrabbit Relay framework.
Please be sure to watch this video on how to use this software.
Programs/Files
| Name | Description | | --- | --- | | fwoba.cfg | The config file for the collector and analysis program | | LaunchCollector | BASH script suitable for launching in a crontab at reboot | | fwoba.collector | The actual collection program that stores the ticker data | | fwoba | This is the main interactive analysis program that displays orderbook information in relation to a weighted frequency count. |
Example Screens
This screen shot shows BTC/USDT being analyzed and monitored by FWOBA.

This screen shot shows ETH/USDT being analyzed and monitored by FWOBA.

This screen shot shows TRX/USD being analyzed and monitored by FWOBA.

This screen shot shows XRP/USD being analyzed and monitored by FWOBA.

This screen shot shows EUR/USD being analyzed by frequency weight.

This screen shot shows EUR/USD being analyzed by frequency count.

This screen shot shows EUR/USD being analyzed by volume.

Installing
Start with these shell commands
mkdir -p /home/GitHub
cd /home/GitHub
git clone https://github.com/rapmd73/fwoba
You now have a copy of the FWOBA repository. Now its time to install everything.
cd /home/GitHub/fwoba
./install
fwoba.cfg
Configuration File Description
The configuration file provided here plays a pivotal role in defining the behavior and parameters of the program responsible for collecting and analyzing order book data from various exchanges. This file is instrumental in ensuring the program operates effectively and efficiently. Here's a breakdown of the key elements within the configuration file:
- Exchange: This field specifies the source of the order book data. It can take one of two values: "OANDA" or one of the 100+ different
- Account: The "Account" field serves as a reference to the account information within the Jackrabbit Relay exchange file. When using exchanges like
- Asset: The "Asset" field designates the trading instrument or asset for which order book data will be collected. It should align with the
- Precision: This field controls the number of decimal places used in calculations for range, support, and resistance levels based on the order book
- History: The "History" field defines the duration for which bid and ask data is stored on disk. It's a crucial parameter that balances historical
- Diagnostics: The "Diagnostics" field serves as a visual reference. When set to "No," it indicates that no additional diagnostic information will
Importance of Historical Data and Storage Requirements
The "History" parameter is particularly significant in this configuration file, as it directly impacts the quality of analysis and storage requirements. Here's why historical data and its careful management are critical:
- Data Quality: The historical data duration, defined by the "History" field, influences the quality of the analysis. Inadequate historical data,
- Storage Balancing: On the other hand, storing excessive historical data unnecessarily can lead to substantial storage requirements. This can be
- Informed Decision-Making: Historical data is the foundation for informed decision-making in trading. It allows traders to understand past market
- Backtesting Strategies: Historical data is essential for backtesting trading strategies. Traders can evaluate how their strategies would have
LaunchCollector
Installing "LaunchCollector" in Cron
To ensure that the "fwoba.collector" program runs continuously and automatically at system reboot, you can add the "LaunchCollector" script to the cron tab for the root user. Follow these steps:
- Edit the Crontab Configuration:
- Open the cron configuration for the root user using the terminal:
sudo crontab -e
- Add a Cron Job Entry:
- In the text editor that opens, add a new cron job entry. This entry specifies when and how often the script should run. To run the "LaunchCollector"
@reboot directive.
- Example entry:
@reboot /bin/bash /home/fwoba/LaunchCollector
- Save and Exit:
- Save the changes to the crontab file and exit the text editor. The method for saving and exiting depends on the text editor you're using. For example,
Ctrl + O to save and Ctrl + X to exit.
- Verification:
- You can verify that the cron job has been added successfully by listing the root user's crontab:
sudo crontab -l
This command should display the cron job entry you just added.
Now, the "LaunchCollector" script will be executed automatically at system reboot as the root user, ensuring that the "fwoba.collector" program runs continuously even after system restarts.
fwoba.collector
Overview
The Ticker Data Collector is a software tool designed to gather and manage real-time price information, known as ticker data, from various cryptocurrency exchanges. This tool is typically used as part of a larger trading system, such as the Jackrabbit Relay, to ensure that traders have access to up-to-date and accurate pricing information for different cryptocurrency trading pairs.
Key Features
- Data Collection: The primary function of this tool is to collect and maintain ticker data. Ticker data represents the current prices (bid and
- Configuration: The tool is configurable through a settings file. This file contains information about which trading pairs to monitor, the
- Concurrency: To efficiently manage multiple trading pairs, the tool can run multiple processes simultaneously. This allows it to gather data for
- Diagnostics: For users interested in monitoring changes in ticker data, the tool offers a diagnostics option. This feature helps identify when
Purpose
The primary purpose of the Ticker Data Collector is to provide traders with accurate and real-time pricing information. This information is essential for making informed decisions when buying or selling cryptocurrencies. By continuously collecting and updating ticker data, the tool supports traders in executing their trading strategies effectively.
Usage
Traders typically integrate the Ticker Data Collector into their trading systems. They configure the tool to monitor the specific trading pairs they are interested in and set it to run continuously. Importantly, it is designed to run automatically from cron at server reboot. As the tool collects and updates ticker data, it becomes a crucial resource for traders to monitor market conditions and make timely trading decisions.
fwoba
Overview
The Order Book Analyzer is a powerful tool designed for experienced traders and programmers seeking in-depth insights into order book dynamics on various cryptocurrency exchanges. This tool is part of the Jackrabbit Relay project, providing real-time trading data analysis capabilities.
Features
- Exchange Agnostic: Supports multiple cryptocurrency exchanges, providing a unified analysis platform.
- Custom Precision: Adjust the precision level to control the number of decimal places in the analysis, enabling tailored data views.
- Real-time Data: Access real-time ticker and order book data to make informed trading decisions.
- Educational: Use it for learning purposes to explore order book mechanics, market depth, and trading strategies.
- Curses-based UI: Utilizes the curses library to create a user-friendly, terminal-based interface for displaying data.
Usage
Run the Script: Execute the script with the following command, replacing <exchange>, <account>, <asset>, and <direction> with your trading parameters:
./fwoba <exchange> <account> <asset> <direction>
The Frequency Weighted OrderBook Analyzer (FWOBA) is a powerful tool designed for experienced traders and programmers seeking in-depth insights into order book dynamics on various cryptocurrency exchanges and provides a snapshot of the order book for a given asset, which is updated in near real-time with a specified time interval. It consists of several columns, each containing essential information for analyzing the order book and making trading decisions. Here is a list of the keys and their purpose in the program:
- q or Q. Gracefully quit the program and return to the command prompt.
- 1 to 8. Digits after the decimal for vireing and correlating different zonwes and regions in the orderbook.
- Space Bar. Cycle through the various displays highlight by frequency weight, frequeny, and volume.
- w or W. Switch to the frequency weighted table.
- f or F. Switch to the frequency counting table.
- v or v. Switch to the volume table.
Columns
- FreqWeight: Represents the weighted value associated with each data point.
- Frequency: Indicates the frequency count for each data point.
- Volume: Specifies the trading volume associated with each data point.
- Buy: Displays buy values on the bid side of the order book.
- Spread: Represents the spread between buy and sell values.
- Sell: Displays sell values on the ask side of the order book.
Significance
- Support and Resistance Levels. The data is instrumental in identifying support and resistance levels within the asset's market. Support levels are
- Liquidity Analysis. Order book data allows traders to assess market liquidity. By examining the depth of the order book and the volume of buy and
- Market Sentiment. The distribution of buy and sell orders in the order book provides insights into market sentiment. For example, a lopsided order
- Order Flow Analysis. Order book data allows for order flow analysis, which involves tracking the sequence of trades and orders in real-time. Traders
- Price Discovery. The order book plays a crucial role in price discovery. As new buy and sell orders are placed and executed, they contribute to price
- Stop Loss and Take Profit Levels. Apart from support and resistance, order book data can help traders determine appropriate stop loss and take profit
- Market Health Assessment. By assessing the stability and consistency of the order book over time, traders can gauge the overall health of the market.
- High-Frequency Trading (HFT) Detection. Order book data is vital for detecting and monitoring high-frequency trading (HFT) activities. Rapid order
- Risk Management. Traders can use order book data to implement risk management strategies. For example, by identifying potential price levels with
- Algorithmic Trading Strategies. Quantitative traders and algorithmic trading systems can use order book data as input for developing and fine-tuning
Real-Time Updates
The dataset's near real-time nature, with updates at regular intervals, makes it valuable for traders to stay current with market dynamics. This allows for timely decision-making based on shifts in the order book, offering a competitive advantage in the asset's market.
Analysis and Decision-Making
- Volume Analysis: Market manipulation may involve unusual volume spikes at specific price levels. For instance, if there's an abrupt and excessive
Example: A sudden surge in buy volume, as seen in the order book data, is followed by an immediate and substantial sell-off, creating a false impression of strong buying interest.
- Spread Manipulation: Market manipulators may intentionally widen the spread to create panic or confusion among traders. This can be observed as
Example: The spread between buy and sell orders rapidly widens to an extreme level, causing traders to panic and make hasty decisions.
- Spoofing: Market manipulators may place and then quickly cancel large buy or sell orders to create a false impression of market sentiment. This
Example: Large buy orders appear at a key support level but are canceled within seconds, leading traders to believe that significant buying interest exists.
Exposing Market Manipulation
Identifying market manipulation through order book data requires vigilance and a keen eye for unusual patterns. Traders and regulators should be cautious of sudden, anomalous trading behavior that doesn't align with typical market dynamics. Reporting suspicious activity is essential to maintain market integrity.
Example 1: Pump and Dump
Scenario: A group of manipulators artificially inflates the price of an asset by executing a series of large buy orders, creating the illusion of strong demand. Detection: Traders should be cautious if they observe a rapid and significant increase in both volume and price, especially if it deviates from historical trends. It's essential to verify whether the increased buying activity is backed by genuine market sentiment.
Example 2: Spread Manipulation
Scenario: Market manipulators intentionally widen the spread between buy and sell orders to discourage trading or create panic. Detection: Traders can spot spread manipulation by monitoring the spread's behavior during normal market conditions. Abrupt and exaggerated spread widening that doesn't align with news or events should raise suspicion.
Example 3: Spoofing
Scenario: A manipulator places a large sell order at a key resistance level to create the impression of impending price decline, only to cancel it before execution. Detection: Traders should be wary of frequent order cancellations, especially if they occur immediately after substantial orders are placed. This suggests an attempt to manipulate market sentiment.
Exposing Market Manipulation
Identifying market manipulation through order book data requires vigilance and a keen eye for unusual patterns. Traders and regulators should be cautious of sudden, anomalous trading behavior that doesn't align with typical market dynamics. Reporting suspicious activity is essential to maintain market integrity.
Utilization
This program is intended for learning purposes and can be employed to develop trading strategies, conduct technical analysis, and enhance trading education materials. Additionally, it plays a crucial role in maintaining market transparency and fairness by aiding in the detection of market manipulation.