

How to buy support and sell resistance automatically on a DEX
Support and resistance are the first levels most traders learn to draw, and they’re still the most watched levels on any chart. This guide covers how to spot them, why they work, how traders trade them, and how to trade them automatically onchain.
What support and resistance look like
Support is a level where buyers keep stepping in. Price drops into it, holds, and bounces. Resistance is the opposite: price rallies into it and gets rejected.
When price chops between the two for a while, you get a trading range, also called a rectangle, or a channel when the levels slope. The more times a level gets tested and holds, the stronger traders consider it.

Traders treat these levels as zones, not exact prices. Wicks often poke through a level before price closes back inside the range.
What makes a level strong
Not every level is equal. Traders usually judge a level by four things:
Number of tests.
A level that has held three times carries more weight than one that has held once. Each bounce or rejection adds to the market’s memory of that price.Volume.
A bounce or rejection on heavy volume shows real buying or selling at that level. A move on thin volume is easier to break.Round numbers.
Prices like $2,000 for ETH or $100,000 for Bitcoin act as psychological anchors. Traders tend to cluster buy orders, sell orders and take-profits around them.Timeframe.
A level on the weekly chart carries more weight than one on the 15-minute chart, because it reflects more traders and more money over a longer period.
When several of these line up at the same price, traders call it confluence. Those are the levels most worth watching.
Why support and resistance work
Support and resistance work because traders remember prices.
Say ETH bounced hard off $2,100 last time. Traders who missed that bounce want another chance to buy there, so they set bids at $2,100. Others see it as a good price simply because it held before. When price comes back down, all those buy orders soak up the selling, and price bounces again.
Resistance works the same way in reverse. Traders who bought near $2,500 last time watched the price drop and are now underwater. When the price gets back to $2,500, many sell just to break even. Others take profit where the price got rejected before. All that selling caps the rally.
The more traders watch a level, the stronger it gets. When enough of them expect a reaction at $2,100 and place orders there, a reaction becomes more likely.
When levels break
No level holds forever. Eventually price breaks through, and when it does, the level often switches roles.
When price breaks above resistance, the sellers who were defending it have sold out, and the old ceiling often becomes the new floor. It works in reverse too: broken support often becomes new resistance. Traders call this an S/R flip. When price comes back to test the old level from the other side, that’s the retest.
Not every break is real. Price sometimes pushes through a level, then snaps back inside. Traders call this a fakeout, which is why many wait for a candle to close beyond the level, ideally on strong volume, before trusting a breakout.

Bitcoin’s $69,000 level is a real example. It was Bitcoin’s 2021 all-time high, and it capped the market for more than two years. Bitcoin broke above it in March 2024, but for months the price fought around $69,000, getting rejected on the way up and testing it from above on the way down, before Bitcoin finally broke away from it later that year.
How to trade it onchain
Traders usually play these levels one of two ways. Range traders buy near support and sell near resistance while the range holds. Breakout traders wait for a level to break, then buy the breakout or the retest. Both can be done onchain, but how well depends on the tool.
Option 1: Watch the chart and swap
On most DEXs, a trade is a swap at the current market price. There's no pre-set order waiting to fill when the price reaches your level. Trading support and resistance means doing it manually trade by trade: you mark $2,100 and $2,500 on the chart, set price alerts, and swap when price gets there.

It works, but a few questions come up.
What happens if I’m unavailable when the price gets there?
Crypto is 24/7, and an alert only helps if you can act on it. Levels get hit at 3 a.m., on weekends, and in the middle of your day. If you’re not able to act when an alert goes off, you’re unable to make the trade.What if it's just a wick?
Price often pokes into a level and snaps back within minutes. By the time you swap, the bounce may already be over.How many times can you do this?
A range can get tested again and again. Every bounce and every rejection means another alert, another swap and another fee.Will the price still be at your level?
By the time you've seen the alert, opened the app and confirmed, the price may have moved away from your level. The price you get may be well off your target.How much slippage are you accepting?
Slippage is the gap between the price you see when you hit swap and the price you actually get. Every swap carries a slippage tolerance: how far the price can move from your quoted price before the swap fails. For more on what a swap really costs, see How One Decision Saved This Trader Thousands.Is your swap exposed to a sandwich attack?
In a sandwich attack, an MEV bot spots your swap before it's confirmed, buys just ahead of you to push the price up, then sells right after you. Your swap fills at the worse price, up to your slippage tolerance. For more, see Understanding MEV Sandwich Attacks.
Most DEXs were built for swapping at the current price, not for placing orders at the prices you choose. This brings us to Option 2.
Option 2: Carbon DeFi
On Carbon DeFi, you don't chase price with swaps. You're the maker: you set the price, and let the market come to you.
Let’s revisit the same questions from Option 1:
What happens if I’m unavailable when the price gets there?
You don't need to be. You pre-set your orders. They’re live onchain, ready to be filled at your levels, 24/7. Whether you’re at your computer ready to make a trade or not is irrelevant.What if it's just a wick?
Your order is already sitting at your level, ready to fill the moment the market demands. To help ensure efficient order fulfillment, Carbon DeFi’s built-in solver system integrates all major DEXs chainwide - pulling liquidity to fill Carbon DeFi orders.How many times can you do this?
It can be a discrete, single-use limit order, or it can trade back and forth as many times as the range allows. A recurring order keeps trading test after test, without another transaction from you. As the sell order fills, newly acquired tokens automatically fund the buy order, and vice versa.Will the price still be at your level?
Each order fills at exactly the price you set, and makers pay no protocol fees on filled orders.How much slippage are you accepting?
None. Orders on Carbon DeFi have zero slippage.Is your swap exposed to a sandwich attack?
No. Thanks to the irreversible nature of orders on Carbon DeFi, MEV sandwich attacks are impossible to execute. For more, see How to Gain Immunity From MEV Sandwich Attacks.
What makes this possible is Carbon DeFi’s asymmetric design: your buy and sell orders are separate, and each one only trades at the price you set. Orders are irreversible on execution, just like a limit order on a centralized exchange. Some DEXs offer "limit orders" that aren't. Many are built on concentrated liquidity positions that reverse when price moves back through them, or rely on offchain systems to execute. For more, see True DEX Limit Orders: Carbon DeFi vs. Existing Solutions and True DEX Range Orders: Carbon DeFi vs. Existing Solutions.
Carbon DeFi's limit, range and recurring orders also run fully onchain, with no third-party dependencies, including oracles, hooks and keepers. Your orders sit onchain at the prices you choose until the market reaches them.
Before the examples, a quick note on order types, since "range" means two different things here. A trading range is the space between support and resistance on the chart. A Range Order is a Carbon DeFi order type. Instead of buying or selling at one exact price, like a Limit Order, a Range Order buys or sells gradually across a span of prices you set. Since support and resistance are zones rather than exact prices, Range Orders are a natural fit. For more, see How to Scale In/Out Using Range Orders on Carbon DeFi.
With that in mind, there are three ways to trade support and resistance.
1. Trade the range with a recurring order. A Recurring Order links a buy order to a sell order, so the strategy buys support and sells resistance on repeat. For ETH/USDT ranging between $2,100 and $2,500:
Buy order: a Range Order buying from $2,200 down to $2,100, into support.
Sell order: a Range Order selling from $2,400 up to $2,500, into resistance.
As the sell order fills, the USDT funds the buy order, and the other way around. The strategy keeps cycling as long as the range holds.

Note: you can run this strategy through the Carbon DeFi Simulator using up to 365 days of historical ETH/USDT price data. For more, see Unveiling the Carbon DeFi Simulator.
2. Trade the breaks with two separate orders. Some traders would rather not trade inside the range at all. They place a buy order below support, to catch a breakdown at a lower price or a fakeout wick, and a separate sell order above resistance, to take profit into a breakout. For example:
Buy order: a Range Order buying from $1,950 down to $1,850.
Sell order: a Range Order selling from $2,650 up to $2,750.
Each order only fills if price breaks out of the range.

3. Combine them. Run the recurring order inside the range and keep the two outer orders beyond it. If the range holds, the recurring order does the work. If support breaks, a buy order is already waiting lower. If resistance breaks, a sell order is already waiting higher.

When the range moves
Ranges don’t last forever. Say ETH breaks above $2,500. Your recurring order’s sell side fills on the way up, and the strategy now holds USDT, while its buy order still sits back at $2,100, waiting for a price that may not come back.
On Carbon DeFi, strategies are adjustable. You can change the prices of your orders, add or withdraw funds, or even change the strategy type, all without canceling the strategy, withdrawing your funds and starting over.
Since broken resistance often flips to support, one option is to move the buy range up to the old resistance for the retest, and the sell range up to a new target. If you’re confident the old resistance will hold, you might price the buy range right at $2,500. If you’re not convinced, you might price it just below, to leave room for a deeper dip.
The point is, when the range moves, your strategy can move with it.
About Carbon DeFi

Carbon DeFi is created by Bancor, which has been developing DeFi technology since 2017. That year, Bancor launched the first automated market maker (AMM) on the blockchain, introducing the technology underpinning the constant product model, along with Smart Tokens, now known as LP tokens, that much of DeFi still runs on today. In 2020, Bancor introduced Amplified Liquidity, the idea now widely known as concentrated liquidity.
AMMs made onchain trading possible. Anyone could swap any token, at any time, without waiting for a buyer or seller to show up. As DeFi grew, so did what traders asked of it. They wanted to set their own prices, trade without slippage, avoid MEV sandwich attacks, and automate their strategies without bots or third-party dependencies.
Carbon DeFi was developed to meet those needs. In 2022, Bancor unveiled Asymmetric Liquidity and Adjustable Bonding Curves, which form the core of Carbon DeFi. Each strategy has two distinct bonding curves, one for buying and one for selling. That's what makes true limit, range and recurring orders possible fully onchain, with no hooks, oracles or keepers.
Bancor's Arb Fast Lane, built into Carbon DeFi, can use any source of liquidity on the chain to help fill orders and keep strategies actively trading.

For more on Bancor's history, see Technology with Purpose: Revolutionizing Blockchain Beyond Bitcoin, Part 5.
Note
Chart patterns describe what has often happened, not what will happen. Nothing in this post is financial advice.



