Additional Programs - rapmd73/JackrabbitRelay GitHub Wiki
Additional Support Programs
This section details the additional program in the Extras sub-directory and how to use them with examples.
Getting your balances
This command retrieves and displays the current balances for various assets in a specified account of the specified exchange/broker. It provides information on the total balance and the available balance (excluding amounts held in limit orders) for each listed asset. This tool is essential for tracking and managing the current financial state of a trading account, aiding in decision-making for trading strategies and asset allocation.
Running the program
/home/JackrabbitRelay2/Extras/Balances oanda CherryBlossom
Example for forex
Balance 760.40960
EUR/USD 722.57004 short 14.58
Running the program (2)
/home/JackrabbitRelay2/Extras/Balances kraken MAIN
Example for cryptocurrency
DOT 0.00000012 0.00000012
EOS 0.00000120 0.00000120
TRX 0.00000046 0.00000046
ETH 0.00000001 0.00000001
BTC 0.00000000 0.00000000
USD 0.10620000 0.10620000
Running the program (3)
/home/JackrabbitRelay2/Extras/Balances binance Sandbox
Example for cryptocurrency (2)
ETH 1.00000000 1.00000000
BTC 1.00000000 1.00000000
LTC 6.00000000 6.00000000
BNB 2.00000000 2.00000000
USDT 10000.00000000 10000.00000000
TRX 4758.00000000 4758.00000000
XRP 802.00000000 802.00000000
Listing the markets
This command designed to retrieve information about available markets on an exchange or broker. The output includes details such as currency pairs, leverage, bid and ask prices, and the spread between them. This utility aids in obtaining a comprehensive overview of the supported markets, facilitating informed decision-making for trading activities.
Running the program
/home/JackrabbitRelay2/Extras/ListMarkets oanda CherryBlossom AUD
Parameters for forex
Example | Description |
---|---|
oanda | The exchange to map. Must be lower case. |
CherryBlossom | The account name from the cfg file of the exchange. Must be the exact case of the config file. |
AUD | Search field. This will list the pairs with the search patteren in the market list. Case will be folded as needed. |
Example for forex
Column | Description |
---|---|
Forex Pair | Represents the currency pair for the respective market. |
Margin | Denotes the margin or leverage associated with the pair. |
Bid Price | Current bid price indicating the maximum buyer's offer. |
Spread | Difference between the bid and ask prices. |
Ask Price | Current ask price indicating the minimum seller's offer. |
GBP/AUD 20:1 1.86559 0.00035 1.86524
AUD/JPY 20:1 96.08900 0.02200 96.06700
AUD/SGD 20:1 0.89824 0.00044 0.89780
AUD/HKD 10:1 5.29234 0.00115 5.29119
AUD/CHF 25:1 0.57457 0.00021 0.57436
AUD/NZD 33:1 1.08159 0.00038 1.08121
AUD/USD 33:1 0.67717 0.00012 0.67705
AUD/CAD 33:1 0.90126 0.00024 0.90102
EUR/AUD 33:1 1.61839 0.00033 1.61806
Running the program
/home/JackrabbitRelay2/Extras/ListMarkets kraken MAIN LTC
Parameters for forex
Example | Description |
---|---|
kraken | The exchange to map. Must be lower case. |
MAIN | The account name from the cfg file of the exchange. Must be the exact case of the config file. |
LTC | Search field. This will list the pairs with the search patteren in the market list. Case will be folded as needed. |
Example for cryptocurrency
Column | Description |
---|---|
Normalized Name | Provides a normalized name for the cryptocurrency pair, aiding strategy portability. |
Exchange/Internal Name | Represents the internal name or symbol used within the exchange for the cryptocurrency asset. |
Market Type | Indicates the market type for the asset; "spot" is implied if not explicitly mentioned. |
Bid Value | Current bid price indicating the maximum price a buyer is willing to pay. |
Spread | Difference between the bid and ask prices, offering insights into market liquidity. |
Ask Value | Current ask price indicating the minimum price a seller is willing to accept. |
LTC/AUD LTCAUD spot 108.79000000 0.26000000 108.53000000
LTC/ETH LTCETH spot 0.03104000 0.00005000 0.03099000
LTC/GBP LTCGBP spot 58.17412000 0.06143000 58.11269000
LTC/USDT LTCUSDT spot 73.40854000 0.02301000 73.38553000
LTC/BTC XLTCXXBT margin 0.00161800 0.00000200 0.00161600
LTC/EUR XLTCZEUR margin 67.03000000 0.02000000 67.01000000
LTC/JPY XLTCZJPY spot 10422.00000000 32.00000000 10390.00000000
LTC/USD XLTCZUSD margin 73.38000000 0.01000000 73.37000000
Analyzing a signle asset
This command evaluates historical market data for a specified currency pair, providing insights into its price movements. The analysis includes details such as the highest timeframe, duration, maximum market high, minimum market low, highest market spread, market median, and average. Additionally, it calculates and presents statistics on price movements in terms of percentage changes. The command concludes with the total number of data points analyzed, the percentage of data points above average, and related metrics. This analysis can bew done on both forex and cryptocurrency pairs.
Running the program
/home/JackrabbitRelay2/Extras/AnalyzeAsset oanda CherryBlossom HKD/JPY
Parameters
Example | Description |
---|---|
oanda | The exchange to map. Must be lower case. |
CherryBlosom | The account name from the cfg file of the exchange. Must be the exact case of the config file. |
HDK/JPY | Search field. This will list the pairs with the search patteren in the market list. Case will be folded as needed. |
Example
Highest timeframe for HKD/JPY is M
Timeframe duration: 19 years, 7 months, 0 days
Maximum market high: 19.4566
Minimum market low: 7.1510
Highest market spread: 12.3056
Market median: 13.3038
Market average: 13.8057
Maximum M movement: 5.4650 (28.09%)
Average M movement: 0.5986 (3.08%)
Total Ms analyzed: 236
Ms above average: 86 (36.44%)
Understanding the output
Output Component | Description |
---|---|
Highest Timeframe | Indicates the highest timeframe for the analyzed currency pair (e.g., M for month, 2w for 2 weeks, or the highest timeframe of the exchange) |
Timeframe Duration | Specifies the duration of historical data analyzed in years, months, and days. |
Maximum Market High | Represents the highest recorded market high for the currency pair. |
Minimum Market Low | Denotes the lowest recorded market low for the currency pair. |
Highest Market Spread | Presents the highest observed spread between bid and ask prices. |
Market Median | Shows the median value of market prices during the analyzed period. |
Market Average | Represents the average value of market prices during the analyzed period. |
Maximum M Movement | Indicates the maximum movement in M units with corresponding percentage. |
Average M Movement | Represents the average movement in M units with corresponding percentage. |
Total Ms Analyzed | Specifies the total number of data points (Ms) analyzed based on the highest timeframe of the exchange or broker. |
Ms Above Average | Indicates the number and percentage of data points above the average based on the highest timeframe of the exchange or broker. |
Analyzing an entire market
This command is a versatile tool that combines the functionalities of ListMarket and AnalyzeAsset to provide a comprehensive analysis of multiple trading pairs within a specific market or exchange.
Running the program
/home/JackrabbitRelay2/Extras/AnalyzeMarket kraken MAIN LTC
Parameters
Example | Description |
---|---|
kraken | The exchange to map. Must be lower case. |
MAIN | The account name from the cfg file of the exchange. Must be the exact case of the config file. |
LTC | Search field. This will list the pairs with the search patteren in the market list. Case will be folded as needed. |
Example
Asset TF Max High Max Low Max Spread Market Median Market Average Max Movement % Max Avg Movement % Avg Tot >AV Duration
LTC/AUD 2w 525.00000000 53.00000000 472.00000000 289.00000000 150.12873563 255.47000000 48.66% 46.70954023 8.90% 87 34 3y 6m 12d
LTC/ETH 2w 0.23439000 0.03023000 0.20416000 0.13231000 0.07620174 0.10023000 42.76% 0.01578067 6.73% 90 29 3y 7m 26d
LTC/GBP 2w 294.64538000 25.38484000 269.26054000 160.01511000 80.09542348 138.36016000 46.96% 25.69340867 8.72% 90 33 3y 7m 26d
LTC/USDT 2w 412.98999000 30.00000000 382.98999000 221.49499500 104.75510604 199.23999000 48.24% 35.36503344 8.56% 90 30 3y 7m 26d
LTC/BTC 2w 0.02498000 0.00158600 0.02339400 0.01328300 0.00692784 0.01500000 60.05% 0.00192475 7.71% 182 27 7y 5m 6d
LTC/EUR 2w 340.00000000 1.00000000 339.00000000 170.50000000 54.90136786 233.95000000 68.81% 19.59282869 5.76% 251 30 10y 3m 7d
LTC/JPY 2w 44920.00000000 5479.00000000 39441.00000000 25199.50000000 13723.08974359 20896.00000000 46.52% 4034.89743590 8.98% 78 37 3y 1m 29d
LTC/USD 2w 413.47000000 1.25000000 412.22000000 207.36000000 63.75329301 278.90000000 67.45% 23.38814516 5.66% 248 29 10y 1m 22d
Understanding the output
Column | Description |
---|---|
Asset | Represents the trading pair or asset under analysis |
Timeframe | Indicates the highest timeframe used for the analysis, e.g., "2w" for 2 weeks |
Max High | Specifies the maximum recorded high price for the asset during the analyzed period |
Max Low | Denotes the minimum recorded low price for the asset during the analyzed period |
Max Spread | Presents the highest observed spread between bid and ask prices |
Market Median | Represents the median value of market prices during the analyzed period |
Market Average | Specifies the average value of market prices during the analyzed period |
Max Movement | Indicates the maximum movement in the highest timeframe units with corresponding percentage |
% Max | Represents the percentage of maximum movement relative to the analyzed data |
Avg Movement | Represents the average movement in the highest timeframe units with corresponding percentage |
% Avg | Represents the percentage of average movement relative to the analyzed data |
Tot >AV | Indicates the total number of data points (Ms) above the average |
Duration | Specifies the duration of the analysis in years, months, and days |
Building exchange profiles with public access
This command create a new config or appends to an existing config file any exchanges that have a public API interface. The program will not create duplicate listings. You must provide the port number of your local Jackrabbit Relay.
IMPORTANT: Be sure you check your port. Fixing 100+ typos is a real pain.
Running the program
/home/JackrabbitRelay2/Extras/AppendPublicConfig 1234
Example output
blofin
coinmetro
htx
huobi
indodax
Building exchange profiles For Mimic to use public data sources
This command create a new config or appends to an existing config file for MIMIC for using public API interface. The program will not create duplicate listings. You must provide the port number of your local Jackrabbit Relay.
IMPORTANT: Be sure you check your port. Fixing 100+ typos is a real pain.
Running the program
/home/JackrabbitRelay2/Extras/AppendMimicConfig 1234
Example output
blofin
coinmetro
htx
huobi
indodax
Charting a heatmap
Correlation and inverse correlation are two related concepts in trading that measure the degree of statistical relationship between two or more assets.
Correlation refers to the degree to which the prices of two or more assets move in tandem with each other. When two assets are positively correlated, they tend to move in the same direction at the same time, while assets with negative correlation tend to move in opposite directions. For example, if the price of a stock and the price of a related commodity such as oil are positively correlated, a rise in the price of oil would likely result in a rise in the price of the stock. Conversely, if the price of a stock and the price of a related currency such as the US dollar are negatively correlated, a rise in the value of the US dollar would likely result in a fall in the price of the stock.
Inverse correlation, on the other hand, refers to the degree to which the prices of two or more assets move in opposite directions. When two assets are inversely correlated, they tend to move in opposite directions at the same time. For example, if the price of a stock and the price of a related commodity such as gold are inversely correlated, a rise in the price of gold would likely result in a fall in the price of the stock.
While correlation and inverse correlation are similar in that they both measure the degree of statistical relationship between two or more assets, they differ in terms of the direction of the relationship. Correlation measures the degree of relationship between assets that move in the same direction, while inverse correlation measures the degree of relationship between assets that move in opposite directions.
Both concepts are important in trading because they can be used to identify patterns and relationships between different assets in order to make more informed investment decisions. Traders use correlation and inverse correlation analysis to assess the risk of their portfolios and to identify opportunities for diversification. For example, if a trader notices that two assets in their portfolio are highly positively correlated, they may consider diversifying the portfolio by adding assets that have low or negative correlation with the existing assets.
It's important to note that correlation and inverse correlation are not always constant and can change over time due to various factors such as market conditions, economic events, and changes in investor sentiment. Therefore, it's important for traders to regularly monitor the correlation and inverse correlation between assets in their portfolio and adjust their strategies accordingly.
The below chart shows different Forex pairs on a normalized percentage change scale. Correlated pair will be those that trend similar in price action, whereas inverse correlated pairs will be those that trend in opposite directions of each other. For example, USD/TRY and EUR/TRY are highly correlated in price movement as they both move in the same direction quite consistently. However, EUR/USD and USD/DKK are highly inverse correlated as price movement tend to move in opposite directions quite consistently.
Hedging is an important risk management strategy that is commonly used by Forex traders to protect themselves against potential losses. When trading Forex, there may be instances where traders cannot short an asset. In such cases, traders can use correlation and inverse correlation to hedge their positions.
Correlation refers to the degree to which two assets move in the same direction. When two assets are positively correlated, they move in the same direction. Conversely, when two assets are negatively correlated or inversely correlated, they move in opposite directions.
In hedging, traders can use two different assets that are inversely correlated against each other as a hedge to help mitigate risks. For example, if a trader is holding a long position in a currency pair that cannot be shorted, they can look for another currency pair that is inversely correlated to it. By going long on the inversely correlated currency pair, the trader can hedge their position and potentially reduce their overall risk exposure.
When hedging with correlation and inverse correlation, it's crucial to note that the relationship between the two assets may vary over time. Thus, traders must consistently monitor the correlation between the assets and adjust their hedging strategies as necessary. Utilizing correlation and inverse correlation not only helps mitigate risks but also holds the potential for profits. As one asset's price drops, the second asset (inversely correlated) may increase, leading to gains for the trader.
A heatmap displays the correlation or inverse correlstion of the basis of color. Correlated pairs will be above 0, with an identical correlation resulting in 1 (bright green). Inverse correlated pairs will be completely opposite of each other resulting is a -1 (bright red). 0 is considered neutral. Using your mouse, you can zoom in on section of the heatmap to get a better view of each pair correlation. Clicking on the white space of the chart will bring up a menu in the upper right corner that will all panning and zooming in/out of the heatmap.
Running the program
/home/JackrabbitRelay2/Extras/ChartHeatmap I oanda CherryBlossom
Parameters
Example | Description |
---|---|
I | Save an image of the chart. Using H will save an interactive HTML file. |
oanda | The exchange to map. |
CherryBlossom | The account name from the cfg file of the exchange. |