Skip to content

Build your own candlestick pattern without code and backtest it on Binance or Bybit history

How to build your own candlestick pattern in Tradepit without code and backtest it on Binance or Bybit candle history right in the browser.

Updated

Patterns and Backtest in Tradepit

In Tradepit you define your own candlestick pattern in numbers, without code. For a candle you set its colour, the size of the body and the wicks as a percentage of the opening price, the ratio of wick length to body size and the ratio of its body to the previous candle's body. You can also require the candle to close above the previous candle's high or below its low. You build the pattern in the Patterns section with buttons, drop-down lists and number fields and backtest it in the Backtest section on Binance or Bybit candle history, Futures or Spot, as well as OKX, Bitget and KuCoin. The calculation runs right in your browser. A result on history does not promise the same result in the future.

The Tradepit backtest runs your candlestick pattern over the exchange's candle history and shows what would have happened to a starting balance if trades were opened on the pattern's signals. The Limitations section explains which signals are skipped. A result on history does not promise the same result in the future.

Supported exchanges are Binance, Bybit, OKX, Bitget, and KuCoin. You select the exchange and the Futures or Spot market in the pattern itself. The backtest loads candles from that exchange.

Tradepit works in the browser, with nothing to install.

The “Candlestick pattern backtest without code” guide compares how other tools define and test patterns.

How to create a pattern

In the Patterns section you create your own candlestick patterns. There are no ready-made shapes here, you build the pattern yourself, from conditions or from candles on a chart.

  1. Press “+ Create pattern” and give the pattern a name.
  2. Add elements to the board with “+ Candle”, “+ Series” and “+ Confirmation”. A candle describes one candle, a series describes several candles in a row with shared conditions, a confirmation describes the candle on which the price reaches the confirmation target.
  3. Click an element and set only the conditions that matter to you. The rest stays “Any”. Conditions are set with buttons, drop-down lists and number fields, there is no code to write.
  4. In the “Where to look” block pick the exchange and the pairs. Without an exchange the pattern is not saved.
  5. Press “Save pattern”, and the pattern goes to your account.

On any Tradepit chart a pattern is created right from the candles. You can select up to 60 candles in a row on timeframes of 5m and longer, on any chart type except Renko, Kagi, Line break and Point & figure. The candles open as a new pattern in the Patterns section with the exchange, the timeframe and the shape of every candle already filled in, and all that is left is to check the conditions and save the pattern.

Notifications for your patterns come through the Tradepit scanner. Scanner, Radar and Patterns tell you in Telegram when they fire.

Example. A two-candle pattern

The first candle is falling. The second is rising and comes right after it, its body is at least twice the first candle's body, its lower wick is at least one and a half times as long as its body, and it closes above the first candle's high. In Tradepit these are five conditions on two consecutive candles.

  1. Press “+ Candle” and in the “Colour and sizes” group pick the colour “Falling”.
  2. Press “+ Candle” again. Between the candles leave “Right after the previous”, and set the second candle's colour to “Rising”.
  3. On the second candle, in the “Against the previous candle” group, set “Body to previous body” from 2 and “Close” to “Above the previous high”.
  4. In the “Proportions and volume” group set “Lower wick to body” from 1.5.
  5. In the “Where to look” block pick Binance or Bybit and the pairs, press “Save pattern” and open the pattern in the Backtest section.

How to run a backtest

You pick the pattern, the side of the trade, up to 50 pairs, a period from a day to a month, the starting balance, the trade size, SL and TP in percent. The backtest shows PnL and the return on the balance, win rate, maximum drawdown, the longest losing streak, the result of each pair and a table of all trades. A result on history does not promise the same result in the future.

  1. You pick the pattern and the pairs. The list holds saved patterns only. The pairs are picked in Backtest itself, up to 50, and all of them trade from one balance.
  2. You pick the trade side, Long or Short. The side is set by hand, the pattern is looked for as it is, and trades open that way.
  3. You pick the history period. It is a day, 3 days, 7 days, 14 days or a month up to the moment of the run.
  4. You set the balance, the size, SL and TP. The balance and the size are in USDT, SL and TP in percent of the entry price.
  5. You run the backtest and read the result. The button is “Run the backtest”. A saved pattern in the Patterns section has a button that opens Backtest with this pattern already picked.

What you set and what you see

For a candle you set the colour, the size of the whole candle, the body and the wicks in percent of the open price or in average candles, the ratios of wick lengths to body size, the body's share of the whole candle, and the volume relative to its usual level or in the quote currency.

Against the previous candle you set a flush open or a gap, a close above its high or below its low, a body inside its body or engulfing it, the ratio of the candle's body to the previous candle's body, and a sweep. Context conditions include a high or low over a period, with a breakout, a touch, a close beyond the level, a false breakout or a distance from the level, as well as an SMA or EMA moving average.

Every element has its own timeframe, from 5m to 1M. Between elements you put “Right after the previous” or “Any candles between”, optionally with a “no sooner than” and a “no later than” wait.

Besides the total, the result shows the ratio of total gains to total losses, expectancy, the number of signals, skipped signals, trades closed by TP and by SL, trades still open, the highest and the lowest trade result, the average duration of winning and losing trades, and the fees paid. A result on history does not promise the same result in the future.

You can open any backtest trade on its pair's chart. It shows the pattern candles, the entry, the SL and TP levels and the exit.

With fewer than 30 closed trades, a warning under the total says the sample is too small to judge the pattern by.

Limitations

The exchange fee for the entry and for the exit is taken from every trade. If one candle touched both SL and TP, it counts as SL. Slippage, spread, funding and leverage are not counted. A result on history does not promise the same result in the future.

The entry is at the close of the pattern's last candle, the moment it closes. SL and TP are checked from the next candle of the pattern's shortest timeframe.

The trade size is fixed and does not grow with the balance. A pair holds one trade at a time. A signal is skipped if the pair already has an open trade or the balance not held by open trades is smaller than the trade size.

The fee is the exchange's fixed market order rate, your personal fee tier is not taken into account.

Dates cannot be picked, the period always ends at the moment of the run, so the same run later may give other numbers. The result is not kept and is gone after a page reload or a change in the form. The browser keeps the loaded candles, and a repeat run asks the exchange only for the missing ones.

Spot has no Short trades, for a Short pick a Futures exchange in the pattern. The pattern's rule about the age of a listing is not applied in the backtest. A rule that looks back over more than 5000 candles keeps the backtest from starting. If a run needs too many candles, the backtest does not start and asks you to shorten the period or take fewer pairs.

The backtest follows a “By time” schedule of the pattern. A schedule by the Asia, London and New York hours is not applied, and signals are then looked for round the clock.

A pattern is a description of a candle shape, not a forecast and not advice.