Arbitrage Algorithm Setup Guide
Last updated
Was this helpful?
Last updated
Was this helpful?
The Arbitrage Algorithm is deigned to take advantage of the volatility of cryptocurrency. It can be tuned to generate a cash yield, accumulate cryptocurrency, sell off an existing position, or a blend of all three.
Once you've completed the , you can start building an instance of the Arbitrage Algorithm by ensuring that only the Arbitrage Algorithm is visible. Click the the settings icon to begin changing parameters.
The Arbitrage Algorithm can be used whether you have funded your Gemini account with cryptocurrency or cash.
If you have funded your Gemini account with cash or stablecoins, set your start date to point in the near future when you are setting up an instance.
If you have funded your Gemini account with Bitcoin or another cryptocurrency and do not have cash in your Gemini account, set your start date to a point in the past (~1 year is generally sufficient). This will allow the algorithm to sell cryptocurrency that has not been acquired through the algorithm.
Beginning with our pre-built recipes is the fast way to start trading with the Arbitrage Algorithm.
Clicking the gear icon next to the Arbitrage Algorithm’s name access its settings menu. Here you can make changes to the algorithm and see in real time its effects on your performance.
In the example settings above, when Bitcoin closes down 2.5%, the algorithm will execute a buy order of $580. When Bitcoin closes up 2.1%, the algorithm will execute a sell order of $260
Note: Changing the timeframe of the chart effects the algorithm’s results.
Arbitrage Algorithm Settings
Inputs
Enable Long Threshold - Toggle the ability for the algorithm to buy cryptocurrency on/off
Long Threshold (%) - The percent decrease on candle close required to trigger a buy order.
Enable Exit Threshold - Toggle the ability for the algorithm to sell cryptocurrency on/off
Exit Threshold (%) - The percent increase on candle close required to trigger sell order.
Sell Above Cost Basis - Toggle the algorithm to only execute a sell order when close price is above cost basis.
Show On Chart - Toggle a visual representation of cost basis over time.
Average Price Mode - Select "Auto" for costs basis to be generated by the algorithm. Select "Manual" to enter a cost basis manually (Helpful when looking to sell a pre-existing position).
Base Cost (Manual) - When Average Price Mode is "Manual", enter your the average position cost.
Base Quantity (Manual) - When Average Price Mode is "Manual", enter your the average position quantity.
Entry Trade Size ($) - The dollar value of each buy order.
Exit Trade Size ($) - The dollar value of each sell order.
Start Date / Time - The start date of the data backtest.
End Date - The end date of the data backtest. A far future date is required when setting up an instance.
Number of Bars - The number of bars to load into the chart. 10,000 is recommended.
Exit Full Position on Last Historical Bar - If there are any open trades during the backtest, checking this box will close out those trades on the last closed bar which allows you to include open trades in performance calculations.
Limit to Available Capital - For backtesting purposes, checking this box will limit the amount of available capital the algorithm can execute buy order from based on the initial capital + realized profits. This feature is useful in helping you determine how much capital you will need in your Gemini account to execute your desired parameters.
IMPORTANT NOTES - Arbitrage Algorithm Setup
Exit Full Position on Last Historical Bar - When setting up an instance, DO NOT have this item checked.
Limit to Available Capital - When setting up an instance, DO NOT have this item checked.
Properties
Initial Capital - The dollar value of your starting capital.
Pyramiding - Maximum number of successive entries allowed. A high number is recommended.
Commission - Fees paid for each entry and exit. Through our partnership with Gemini, all orders placed using Arch Public algorithms are subject to a flat 0.4% transaction fee.
All other settings in the Properties are irrelevant to the Arbitrage Algorithm.
TradingView’s Strategy Tester is a powerful performance analysis tool that adjusts realtime to changes made to your algorithm’s settings. This allows you to intelligently hone in on your preferred settings.
Upon changing settings for any algorithm, you will see the chart and Strategy Tester immediately update to reflect those changes.
The four main tabs of Strategy Tester are:
Overview
Performance Summary
List of Trades
Properties
Once you’ve honed in on settings you like, you will need to direct The Bitcoin Algorithm to execute your trades automatically. To do that, you will create an instance. Instances allow you to stack multiple versions of Arch Public algorithms on your Gemini account, creating a comprehensive, sophisticated, and personalized cryptocurrency strategy designed to meet your goals.
On the right hand side of TradingView, click Alerts (clock icon) > Create Alerts.
To create an instance, first change the Condition to the algorithm you would like to set up for this instance. At the top of the window, check to make sure the timeframe is the correct one you want. If it is not, simply change it on the chart and click on alerts again.
Give the alert any name you wish.
In the TradingView message section, you will need to copy/paste the Webhook message generated in your Arch Public account.
IMPORTANT NOTE - Instance Expiration
The TradingView Essential membership limits the maximum lifespan of an alert to 60 days. This means that your instance will expire after 60 days and you will need to restart it. Upgrading to the TradingView Premium membership enables you to have open-ended alerts which means your instance will function in perpetuity.
Now click the notifications tab. You will need to check Webhook URL and copy/paste the URL found in your Arch Public Account. All other checkboxes are optional.
Click Create and your instance will be live.
You will see your instance appear in the Alerts section on TradingView.
When an instance executes an order you may receive an alert depend on the notification settings you checked during the instance setup above. To verify that your order successfully executed on your Gemini account, go to Portfolio and scroll down to find Transaction history. A successfully executed order will appear in your Transaction History.
If you would like to cease order execution of any instance, simply find the instance in your TradingView Alerts tab and click Pause. You are also able to delete the instance from this section.
Clicking the gear icon of an instance will allow you to edit the webhook and notification parameters of the instance.
If you wish to change the trading parameters of the instance, for example, you would like to increase the dollar amount traded, you will need to delete the instance instead. After deletion, make changes to the algorithm’s trading settings and create a new instance.
When we release a new version of the algorithms, you will see a purple icon next to the aglorithm's name. Click the icon to update.
You will need to update any live instances by creating a new instance using the updated algorithm with the same settings from the previous instance.
Once you have copied the recipe settings, you will need to in order to trade live.
First, go to the Webhooks section through your Arch Public Client Portal. You will find the TradingView Alerts section. For instances to successfully trigger orders on your Gemini account, you must have already completed the steps outlined in .