If you are an institution, click below to learn more about our offerings for RIAs, Hedge Funds, Compliance Officers and more.

Intro to the Accumulate/Distribute Algo Webinar Notes


Welcome to today's webinar in which we will discuss the use of IB's Accumulate/Distribute algorithm – an order type that can be used across products including stocks, options, futures, futures options, forex, bonds, warrants and CFDs. In its simplest form, Accumulate/ Distribute allows customers to discreetly enter large volume orders and execute trades over time with minimal market impact and lesser risk of detection by market participants. In more sophisticated forms, the simple configuration process can restrict order entry to specified price ranges or be determined by the distance between two moving averages on the same product or even non-related contracts such as an index ETF. The Accumulate/ Distribute algo can therefore be used by investors wanting to add a technical flavor to their execution by acting only when specific conditions arise. In addition, the algo uses IB's Smartrouter to help ensure orders will be routed to the best exchange venue in accordance with best execution.

For information on how to use the algo, look under the Trading menu on the IB website and select the Order Types and Algos section to see all order types. This page lists in alphabetical order all available order types and the products associated with each. Note that each is hyperlinked. Simply click on the first line to learn more. You will find more detailed information in the IB Users' Guide available within TWS or accessible from the User Documentation area of the Education menu from the IB homepage. You can also use the Search box to type in keywords related to many subjects or remember also to use the Knowledge Base available from the Help and Contacts menu located next to the search box at the top of the page.

Finding information on the Accumulate/Distribute algo from IB website

Intro to Accumulate Distribute Algo

Locating Accumulate/Distribute algorithm

Customers can access the algo in a variety of ways within TWS. It is possible to add the Accumulate/ Distribute icon to the top of your platform by accessing and adding from the arrow dropdown on the main page. Alternatively users can simply click-right on a ticker symbol and access the algorithm from the Trading Tools menu. Upon opening the algorithm you will be faced with plenty of choices. As the name suggests, the algo allows investors to create an order to Accumulate an instrument in which case you would select Buy from the dropdown. Alternatively, orders to Distribute shares, futures or options etc., require selection of Sell from the dropdown menu.

Intro to Accumulate Distribute Algo

The order ticket is broken into four areas. Beneath the Quote Panel is an area to define the algo, which includes buy or sell, total order of shares, and the amount to be submitted at each specified time period over the life of the order. In this area users may also define the Order Type as either Relative, Market or Limit. The interesting Order Type is Relative, which means that the instruction to buy or accumulate must be pegged to something such as the prevailing bid or ask, which we can further adjust by a number of pennies. We can also make the instruction relative to a moving average, weighted or exponential moving average, volume weighted average price (VWAP), moving VWAP or relative to the overall size of the order or with respect to the size of the order.

When using the Relative order type for a buy type, your order will remain the bid and will not lift orders to sell. If the bid/ask spread for a security is typically wide, you can set the order price to your bid +/- an amount. For example you could add a penny to your bid to be a little more aggressive in an illiquid stock while preserving anonymity. You can further specify that your bid will not be higher than the VWAP or a host of alternatives listed earlier. You can see these from the drop down menu. If you select the VWAP for example, you can see that you can tailor this variable by a +/- offset if you choose. When you add a variable, its value is displayed next to or below the field for reference. Note that at the end of this row there is an AND button, which creates further criteria if you want to be even more stringent. The more conditions, the more difficult it will be for your order to fill.

Intro to Accumulate Distribute Algo

As each order is released the complexity of the algorithm and prevailing market conditions, namely price, will determine whether each increment is filled before the next order is released. The algo definition area also asks us whether or not we want to wait for each order to fill before the next order is submitted. If left unchecked unfilled orders will accumulate and perhaps increasing the risk of showing your hand to other market participants, which is precisely what the algo is designed to avoid. Selecting the box will suppress future orders until the outstanding order is filled but runs the risk of falling behind in achieving the full order. By checking the Catch up in Time box, the algo will not wait the time period before submitting the next order after each has been filled.

The algo can avoid showing its hand to other market participants by randomizing both time and order size. Orders can be released with a 20% variance to the required release by checking the box. The order size can be varied by 55%, which will also help hide tracks from anyone trying to spot large orders in the market. Note also that there is a box to check if you want to complete your order in the event that a large amount of stock becomes available. For stock sales or when using the Distribute version of the algorithm you would be willing to sell if a bid appeared for a substantial amount of stock as long as it did not exceed your full order size. Again, you can specify where the price is above or below for this condition to become operative.

Note that you can also define the time period throughout the day that you want your order to work. If you create, load and transmit an order using the algo before the market opens, it will start at the market open, which might not be desirable. You might decide to start the algo at 10am ET by entering the desired time in the Start Time field. We'll look at additional conditions in a moment, but once your algo definition has been entered you could Save or Transmit an order. If I Save the order I will also have to hit the Start button to begin execution.

Enter basic order to raidly purchase large amount of stock


You may have added enough stringency to your algo definition, but you can add to the complexity of the order using the Conditions area of the algo ticket. Note that you can make all possible conditions disappear from the screen or reappear at the click of the link at the top of the Conditions area. The idea of adding conditionality to your order means that the algo will only work should those choices be satisfied. You are immediately faced with a choice of permanently abandoning the trade if any condition is unsatisfied, or pausing until all conditions are once again satisfied. Click the appropriate button.


You can enter a price range for when you want the algo to operate. As an investor you may be very familiar with how a stock ranges in price and wish to limit your activity to specific ranges.


You can maintain discretion by limiting your submission not to exceed a specified percentage of the trading volume. This may not be necessary for liquid stocks.


If your TWS is subscribed to any newsfeeds the algo will not operate if you check the news box in the last number of minutes specified. This is obviously so that you can digest any news articles that appear and determine whether it might change your mind on the order.

Moving Averages

The algo can be given a technical flavor by comparing two values in the row shown as Moving Averages for this Contract. Click on the drop down box to view the selection of variables. Choose Last for example and then select a time frame. We could compare the last price against the moving Average over the last 5 minutes, for example. Note that as you make each selection, the latest value appears beneath the box.

Conditions – Many choices

Intro to Accumulate Distribute Algo

So you may, for example, want to create a condition where the Last Price is lower than the 5-minute moving average by a specified amount. You can see what the calculated current value is and you can determine how much lower or higher you want to set your input value. Note that when a condition becomes invalid, the area surrounding the rogue condition will turn yellow indicating that an unmet condition has caused the algo to stop working. When the condition is met again, the yellow border will disappear and the algo will restart. To remove a condition, click on the red X at the end of the row.

Moving Averages for this contract

In the next field you can create a condition using the same ticker symbol or to compare conditions between related or unrelated tickers. Because the permutations and choices are vast, I suggest you play around with these conditions to get a sense of the algo's capabilities. You could, for example, create a price condition between two related companies in the same industry as the ticker you're creating the algo for. Alternatively you could stick to the single choice of ticker and make a condition such as the 3-hour moving VWAP is greater than/less than its 3-day moving VWAP.

You may want to further create a condition that ensures that the algo will only work if the stock you are trading is under-or-over-performing a specified benchmark. For this we can use sector or benchmark ETFs. As you populate these final fields, your choice in the upper field is copied automatically to the lower field.

Using the chosen ticker we could specify that the relationship between its current price and a longer moving average (such as its 5-day moving average) might be greater than that for the S&P 500 index using the ETF known as SPY. One reason we might target this condition is because we could be specifying that such relative performance reassures us that we are buying a stock when its short-term performance is weaker than the broad market. The difference between our selected ticker and the SPY is calculated and we need to create a rule by entering an appropriate numeric value in the box. The algo will now only work when the condition is true. Once again there are many combinations to choose from and you should spend time looking at the relationships and how they might suit your trading.

Chart – Creating a comparative condition

Intro to Accumulate Distribute Algo

You can make the algorithm as complicated as you want or you can keep it simple. The algo allows you to buy into weakness and sell into strength by selecting appropriate variables from the drop down menus. Although the algo is designed to limit your market impact, there is no reason why you cannot set up both BUY and SELL algos side-by-side. I have demonstrated how you can limit such orders to specific price ranges. That means that you could be a buyer at a low price range and a seller at a higher range. Of course that ability is subject to capital and liquidity constraints.

Summary Box

You can monitor the progress of your order using the Summary box in the middle-right of the screen. The Summary box uses a color-coded feature to display the portion of your completed order. The share values are also displayed numerically and show how many shares have been submitted along with how many have been sold/bought. Remaining shares are also shown. The Summary box also displays the price of the last trade, which allows you to quickly see whether the next execution is likely or not depending on where the current share price is and what conditions you have requested from the algorithm. The average price is also displayed.

Intro to Accumulate Distribute Algo


Once your Accumulate/ Distribute order is finished, the order ticket you may have spent time creating will disappear. To help avoid losing data and in order to save time in the future, TWS allows you to create order templates, which can be loaded quickly and applied to tickers of your choosing. You may notice that when you reload certain algos, they are missing ticker data. That is a safety feature designed to avoid overtrading a higher-price ticker symbol. The templates are for condition-use rather than ticker-use. You may need to do some tailoring to loaded templates but major elements will be preserved as you open them.

To save your work click on the Template dropdown menu to the upper-right of the algorithm and select Save Template. Give it a unique name, and in the future you can select Load Template from the Template dropdown menu and choose your previously built algo order. Notice too that at the top left of the page you will find a Summary page with all resting or open orders submitted using the algo.

Intro to Accumulate Distribute Algo


I noted earlier how you could add a technical element to your algo order building process and so I should show you some salient charting features too.

VWAP on bar is available through Chart Settings and selecting from the Chart Parameters box. You should be aware that the VWAP displayed on the chart is the volume weighted average price for the selected period. So if you change your chart settings from daily to hourly, the VWAP value will change.

Simple and weighted moving averages along with exponential moving averages are available within the Studies tab from Chart Settings. To add two-or-more moving averages, just add the appropriate number by clicking on the indicator and then clicking on Add to the Applied Studies box. To change the Periodicity for each average use the Edit function on the middle of the page to type in your desired length of study and then click OK.

You can also add completed trade markers to your chart by clicking on the View dropdown menu from any chart and selecting the Completed Trade Markers button. Don't forget that if you make many trades within a day you should reduce the time frame of your chart to view these markers. Being familiar with adding a range of varieties of averages and VWAPs to your chart may prompt you to better utilize the Accumulate/ Distribute algo in your trading decisions.

Intro to Accumulate Distribute Algo


The Accumulate/ Distribute algorithm is an advanced order entry tool that can help investors buy or sell large blocks of stock without being detected by other investors monitoring a stock. In its simplest form the algo allows buyers to remain on the bid or sellers to remain on the offer as their orders complete. Adding a variety of sophistication to the conditions process allows investors to aim for VWAP pricing throughout the day or to restrict order entry until specific technical conditions are reached. That completes today's presentation and I'd be happy to take any questions on the topic.

The risk of loss in online trading of stocks, options, futures, currencies, foreign equities, and fixed income can be substantial. Options are not suitable for all investors. For more information read the "Characteristics and Risks of Standardized Options". For a copy click here.

Your capital is at risk and your losses may exceed the value of your original investment.

Interactive Brokers (U.K.) Limited is authorised and regulated by the Financial Conduct Authority. FCA Reference Number 208159.

Interactive Brokers LLC is regulated by the US SEC and CFTC and is a member of the SIPC (www.sipc.org) compensation scheme;
products are only covered by the UK FSCS in limited circumstances.

Before trading, customers must read the relevant risk disclosure statements on our Warnings and Disclaimers page.

For a list of IBG memberships worldwide, click here.