Nado Grid Strategy
Nado grid: percentage spacing, TWAP filter, market order then take-profit limit
Who is this for?
This workflow is for traders who want to run a simple grid-style strategy on Nado: place market orders in one direction (buy or sell), then automatically hang a take-profit limit order at a set percentage away. It suits users who prefer a single trading pair, configurable grid and take-profit spacing in percentage terms, and a filter that avoids trading on short-lived price spikes by comparing the current price to a recent average (TWAP).
What problem is this workflow solving? / Use case
- You want to grid-trade one pair on Nado with clear rules: when to open (market) and when to take profit (limit at a fixed % from fill).
- You want to avoid opening at spikes: only buy when price is below a recent average, only sell when price is above it.
- You want to control how often new orders can be placed (minimum time since the nearest open order) and how many open take-profit orders are allowed.
This workflow automates that: it checks your open orders and the market on a fixed interval, and when conditions are met it places a market order, waits for fill, then places a take-profit limit order at your chosen percentage.
What this workflow does
After you submit the configuration, the workflow runs automatically every 1 minutes and keeps running until the workflow is stopped or removed.
Each run:
-
Fetch open orders and current price
It loads your open orders for the symbol and the current ticker price.
-
Decide if it should try to place a new order
- It only cares about orders in the “take-profit” side: if your direction is Buy, it looks at your open Sell (limit) orders; if your direction is Sell, it looks at your open Buy (limit) orders.
- If you have no such orders, it will try to place a new market order (subject to the TWAP filter and other checks).
- If you do have such orders, it finds the one “nearest” to the current price. It will try to place a new order only if:
- The time since that nearest order was placed is at least your configured minimum interval (minutes), and
- The distance between that order’s price and the current price is greater than your grid spacing plus take-profit spacing (both in percentage terms).
- It also never places a new order if you already have as many open take-profit orders as your “max open orders” setting.
-
TWAP filter (avoid spikes)
When it does try to place an order, it fetches recent candles (K-lines) for the symbol. You choose the candle length (e.g. 1 minute, 5 minutes) and how many candles to use. It computes an average price from those candles (using the typical price: high, low, and close).
- If your direction is Buy: it only places the market buy when the current price is below that average (to avoid buying at a spike).
- If your direction is Sell: it only places the market sell when the current price is above that average (to avoid selling at a dip).
If the condition is not met, it skips placing an order this run.
-
Place market order and then take-profit limit
If the TWAP filter passes, it places a market order in your chosen direction and size. After the order fills, it places a take-profit limit order on the opposite side: the limit price is your fill price plus (for a buy) or minus (for a sell) your take-profit spacing percentage. The size of the take-profit order matches the filled amount.
All price and percentage calculations use precise decimal handling so that grid spacing, take-profit spacing, and TWAP behave consistently.
When it runs / stops
- Runs: Every 2 minutes after you submit the config, with no fixed end.
- Stops: Only when the workflow engine restarts or the workflow is disabled, removed, or redeployed.
Setup
-
Nado credentials (required)
In the config, connect your Nado account (account address, sub-account name, and signer key). The workflow needs this to fetch orders and place market and limit orders.
-
Required trading parameters
- Symbol: The pair to trade (e.g.
BTC/USDT, ETH/USDT).
- Amount: Size per market order (e.g.
0.002 for 0.002 of the base asset).
- Grid spacing (%): The minimum price move (as a percentage) used to decide when the “nearest” order is far enough to allow a new one (e.g.
0.08 for 0.08%).
- Take-profit spacing (%): The percentage above (for buys) or below (for sells) the fill price at which the take-profit limit order is placed (e.g.
0.08 for 0.08%).
-
Optional parameters
- Direction: Buy or Sell. Buy means: place buy market orders and sell limit take-profits; Sell means the opposite.
- Max open orders: Maximum number of open take-profit (limit) orders allowed in that direction. New market orders are not placed if you already have this many.
- Min interval (minutes): When you already have open take-profit orders, a new order is only considered if the nearest such order was placed at least this many minutes ago.
- TWAP K-line interval: The length of each candle used for the average price (e.g.
1m, 5m, 15m, 1h). Shorter intervals react to recent price; longer ones smooth over more time.
- TWAP K-line count: How many of those candles to use for the average. More candles give a smoother average; fewer make the filter more reactive.
-
Start
Submit the config once. The workflow will then run every 2 minutes: check orders and price, apply the grid and time rules, then the TWAP filter, and when appropriate place the market order and then the take-profit limit order.
Tips
- Use a smaller grid and take-profit spacing (e.g. 0.05%–0.1%) for tighter grids and more frequent trades; use larger values for fewer, wider-spaced levels.
- For the TWAP filter, 1m candles with 10 bars give a 10-minute window; 5m with 10 bars give 50 minutes. Adjust to your preferred “recent” window.
Key Features
- Percentage-based spacing: Grid and take-profit distances are set as percentages, so they scale with price.
- Configurable TWAP window: You choose the K-line period and number of candles for the average used to avoid trading on spikes.
- Spike filter: Only buys when price is below the average, only sells when above, to reduce trading at temporary extremes.
- Controlled frequency: Minimum interval between new orders and a cap on open take-profit orders to avoid over-trading.
- Precise calculations: All price and percentage math is done with high precision for consistency.
- Automatic take-profit: After each market fill, a limit order is placed at the configured take-profit percentage.
Nodes in Use
- User configuration: Collects symbol, amount, grid and take-profit percentages, direction, limits, TWAP settings, and Nado credentials.
- Nado:
- Get your current open orders for the symbol
- Get the latest price
- Get historical candles for the symbol and interval (used to compute average price for the TWAP filter)
- Place the market order and, after it fills, the take-profit limit order
- Check the market order status until filled so the take-profit limit can be based on the actual fill price
Reference