# Candles Trend Indicator

> Candle Trend Indicator counts consecutive same-color candles to confirm impulse strength and generate entry or exit signals in Veles bots.

**Candle Trend Indicator** is a simple and intuitive filter on the Veles platform that tracks the strength of the current impulse through a sequence of candles of the same color (direction).  
It counts how many consecutive green or red candles have closed and generates an entry signal once the specified number is reached.

The indicator is especially useful in trend-following strategies and on the crypto market, where strong impulsive moves are often accompanied by series of unidirectional candles.

## How the Candle Trend Works

- **For long entry** — counts consecutive **green** candles (close > open).  
- **For short entry** — counts consecutive **red** candles (close < open).

Example of long signals for a filter with period 4:

**If the [Reverse signal](https://help.veles.finance/en/filters/general/#reverse-signal) option is enabled:**

- Long — signal is generated after a series of **red** candles (anticipating an upward reversal after a downward impulse).  
- Short — signal appears after a series of **green** candles (anticipating a downward reversal after an upward impulse).

This turns the indicator into a counter-trend tool — catching pullbacks after a strong move.

**Important calculation features:**

Empty candles (close = open, no price change) are **not counted** in the sequence and do not reset the counter.  
The counter resets as soon as an opposite-color candle appears.

## Indicator Settings in Veles

- **Period** (number of consecutive candles) — from 2 to 100. The higher the value, the rarer but stronger and more reliable the signals.  
- **Reverse signal** — on / off (off by default — trend mode).  
- **Timeframe** — any available timeframe.

It is recommended to use with calculation type “At bar closing”.  
Calculation [“Once per minute”](https://help.veles.finance/en/filters/general/#2-once-per-minute) may produce false signals.

## Usage Examples

**Trend-following strategy:**

- Period: 5 candles  
- Reverse filter: off  
- Timeframe: 15 minutes  

The bot enters long after 5 consecutive green candles — a signal of a strong bullish impulse.

**Counter-trend strategy (with reverse filter):**

- Period: 7–8 candles  
- Reverse filter: on  
- Timeframe: 5–15 minutes  

Long after 7–8 consecutive red candles — expecting sellers to exhaust and an upward reversal.

**Combinations with other filters:**

- Candle Trend 4 + RSI < 30 (long in oversold after a downward impulse).  
- Candle Trend 6 + ATR% > 1.5% (entries only during high-volatility moments).  
- Candle Trend 5 + EMA 100 filter on higher timeframe (entries only in the global uptrend).

## Display on TradingView

The indicator **is not visually drawn** on the TradingView chart (no lines, arrows, labels, or background).

When clicking “Calculate” in the bot configurator, TradingView displays entry labels (bot signals).

## Using in Veles Bots (Flexible Indicator)

Available settings:

- Period - the number of candles for calculation. Range: 2–100, default 3.
- Interval - the candle timeframe.
- Method - the calculation type. By bar close (only on the selected interval) or by minute (once per minute for any interval).
- Shift - shifts the requested indicator value back by the specified number of candles.
- Direction - "Buy" or "Sell". Here you can determine direct or reverse logic for the filter.

## Why Candle Trend Is Useful in Crypto Trading

The crypto market often produces clear impulses — sequences of 4–8–10 candles in one direction regularly occur before pullbacks or trend continuations.  
The indicator helps:

- Enter strong trends on impulse confirmation (standard mode).  
- Catch reversals after excessive one-sided moves (Reverse signal option).  
- Filter out flat periods where candles alternate frequently and sequences do not build up.

The **Candle Trend Indicator** is one of the simplest yet most effective ways to filter weak moves and catch real impulses or reversals in crypto.
It suits both beginners (due to its straightforward logic) and experienced traders for fine-tuning aggressive or conservative strategies.

## Limitations

- On choppy or low-volatility markets, the required sequence rarely forms, reducing signal frequency.
- A high period value (8–10 candles) produces very rare signals — backtest thoroughly before using.
- The indicator only reflects price direction, not momentum strength — pairing with ATR or volume is recommended.

## Summary

The Candle Trend Indicator is a straightforward yet powerful impulse filter for Veles bots. Its Reverse signal mode adds versatility for mean-reversion strategies, and it pairs naturally with RSI, ATR%, or EMA trend filters to build well-rounded automated setups.
