PINE LIBRARY

PubLibCandleTrend

Library "PubLibCandleTrend"
candle trend, multi-part candle trend, multi-part green/red candle trend, double candle trend and multi-part double candle trend conditions for indicator and strategy development

chh()
  candle higher high condition
  Returns: bool

chl()
  candle higher low condition
  Returns: bool

clh()
  candle lower high condition
  Returns: bool

cll()
  candle lower low condition
  Returns: bool

cdt()
  candle double top condition
  Returns: bool

cdb()
  candle double bottom condition
  Returns: bool

gc()
  green candle condition
  Returns: bool

gchh()
  green candle higher high condition
  Returns: bool

gchl()
  green candle higher low condition
  Returns: bool

gclh()
  green candle lower high condition
  Returns: bool

gcll()
  green candle lower low condition
  Returns: bool

gcdt()
  green candle double top condition
  Returns: bool

gcdb()
  green candle double bottom condition
  Returns: bool

rc()
  red candle condition
  Returns: bool

rchh()
  red candle higher high condition
  Returns: bool

rchl()
  red candle higher low condition
  Returns: bool

rclh()
  red candle lower high condition
  Returns: bool

rcll()
  red candle lower low condition
  Returns: bool

rcdt()
  red candle double top condition
  Returns: bool

rcdb()
  red candle double bottom condition
  Returns: bool

chh_1p()
  1-part candle higher high condition
  Returns: bool

chh_2p()
  2-part candle higher high condition
  Returns: bool

chh_3p()
  3-part candle higher high condition
  Returns: bool

chh_4p()
  4-part candle higher high condition
  Returns: bool

chh_5p()
  5-part candle higher high condition
  Returns: bool

chh_6p()
  6-part candle higher high condition
  Returns: bool

chh_7p()
  7-part candle higher high condition
  Returns: bool

chh_8p()
  8-part candle higher high condition
  Returns: bool

chh_9p()
  9-part candle higher high condition
  Returns: bool

chh_10p()
  10-part candle higher high condition
  Returns: bool

chh_11p()
  11-part candle higher high condition
  Returns: bool

chh_12p()
  12-part candle higher high condition
  Returns: bool

chh_13p()
  13-part candle higher high condition
  Returns: bool

chh_14p()
  14-part candle higher high condition
  Returns: bool

chh_15p()
  15-part candle higher high condition
  Returns: bool

chh_16p()
  16-part candle higher high condition
  Returns: bool

chh_17p()
  17-part candle higher high condition
  Returns: bool

chh_18p()
  18-part candle higher high condition
  Returns: bool

chh_19p()
  19-part candle higher high condition
  Returns: bool

chh_20p()
  20-part candle higher high condition
  Returns: bool

chh_21p()
  21-part candle higher high condition
  Returns: bool

chh_22p()
  22-part candle higher high condition
  Returns: bool

chh_23p()
  23-part candle higher high condition
  Returns: bool

chh_24p()
  24-part candle higher high condition
  Returns: bool

chh_25p()
  25-part candle higher high condition
  Returns: bool

chh_26p()
  26-part candle higher high condition
  Returns: bool

chh_27p()
  27-part candle higher high condition
  Returns: bool

chh_28p()
  28-part candle higher high condition
  Returns: bool

chh_29p()
  29-part candle higher high condition
  Returns: bool

chh_30p()
  30-part candle higher high condition
  Returns: bool

chl_1p()
  1-part candle higher low condition
  Returns: bool

chl_2p()
  2-part candle higher low condition
  Returns: bool

chl_3p()
  3-part candle higher low condition
  Returns: bool

chl_4p()
  4-part candle higher low condition
  Returns: bool

chl_5p()
  5-part candle higher low condition
  Returns: bool

chl_6p()
  6-part candle higher low condition
  Returns: bool

chl_7p()
  7-part candle higher low condition
  Returns: bool

chl_8p()
  8-part candle higher low condition
  Returns: bool

chl_9p()
  9-part candle higher low condition
  Returns: bool

chl_10p()
  10-part candle higher low condition
  Returns: bool

chl_11p()
  11-part candle higher low condition
  Returns: bool

chl_12p()
  12-part candle higher low condition
  Returns: bool

chl_13p()
  13-part candle higher low condition
  Returns: bool

chl_14p()
  14-part candle higher low condition
  Returns: bool

chl_15p()
  15-part candle higher low condition
  Returns: bool

chl_16p()
  16-part candle higher low condition
  Returns: bool

chl_17p()
  17-part candle higher low condition
  Returns: bool

chl_18p()
  18-part candle higher low condition
  Returns: bool

chl_19p()
  19-part candle higher low condition
  Returns: bool

chl_20p()
  20-part candle higher low condition
  Returns: bool

chl_21p()
  21-part candle higher low condition
  Returns: bool

chl_22p()
  22-part candle higher low condition
  Returns: bool

chl_23p()
  23-part candle higher low condition
  Returns: bool

chl_24p()
  24-part candle higher low condition
  Returns: bool

chl_25p()
  25-part candle higher low condition
  Returns: bool

chl_26p()
  26-part candle higher low condition
  Returns: bool

chl_27p()
  27-part candle higher low condition
  Returns: bool

chl_28p()
  28-part candle higher low condition
  Returns: bool

chl_29p()
  29-part candle higher low condition
  Returns: bool

chl_30p()
  30-part candle higher low condition
  Returns: bool

clh_1p()
  1-part candle lower high condition
  Returns: bool

clh_2p()
  2-part candle lower high condition
  Returns: bool

clh_3p()
  3-part candle lower high condition
  Returns: bool

clh_4p()
  4-part candle lower high condition
  Returns: bool

clh_5p()
  5-part candle lower high condition
  Returns: bool

clh_6p()
  6-part candle lower high condition
  Returns: bool

clh_7p()
  7-part candle lower high condition
  Returns: bool

clh_8p()
  8-part candle lower high condition
  Returns: bool

clh_9p()
  9-part candle lower high condition
  Returns: bool

clh_10p()
  10-part candle lower high condition
  Returns: bool

clh_11p()
  11-part candle lower high condition
  Returns: bool

clh_12p()
  12-part candle lower high condition
  Returns: bool

clh_13p()
  13-part candle lower high condition
  Returns: bool

clh_14p()
  14-part candle lower high condition
  Returns: bool

clh_15p()
  15-part candle lower high condition
  Returns: bool

clh_16p()
  16-part candle lower high condition
  Returns: bool

clh_17p()
  17-part candle lower high condition
  Returns: bool

clh_18p()
  18-part candle lower high condition
  Returns: bool

clh_19p()
  19-part candle lower high condition
  Returns: bool

clh_20p()
  20-part candle lower high condition
  Returns: bool

clh_21p()
  21-part candle lower high condition
  Returns: bool

clh_22p()
  22-part candle lower high condition
  Returns: bool

clh_23p()
  23-part candle lower high condition
  Returns: bool

clh_24p()
  24-part candle lower high condition
  Returns: bool

clh_25p()
  25-part candle lower high condition
  Returns: bool

clh_26p()
  26-part candle lower high condition
  Returns: bool

clh_27p()
  27-part candle lower high condition
  Returns: bool

clh_28p()
  28-part candle lower high condition
  Returns: bool

clh_29p()
  29-part candle lower high condition
  Returns: bool

clh_30p()
  30-part candle lower high condition
  Returns: bool

cll_1p()
  1-part candle lower low condition
  Returns: bool

cll_2p()
  2-part candle lower low condition
  Returns: bool

cll_3p()
  3-part candle lower low condition
  Returns: bool

cll_4p()
  4-part candle lower low condition
  Returns: bool

cll_5p()
  5-part candle lower low condition
  Returns: bool

cll_6p()
  6-part candle lower low condition
  Returns: bool

cll_7p()
  7-part candle lower low condition
  Returns: bool

cll_8p()
  8-part candle lower low condition
  Returns: bool

cll_9p()
  9-part candle lower low condition
  Returns: bool

cll_10p()
  10-part candle lower low condition
  Returns: bool

cll_11p()
  11-part candle lower low condition
  Returns: bool

cll_12p()
  12-part candle lower low condition
  Returns: bool

cll_13p()
  13-part candle lower low condition
  Returns: bool

cll_14p()
  14-part candle lower low condition
  Returns: bool

cll_15p()
  15-part candle lower low condition
  Returns: bool

cll_16p()
  16-part candle lower low condition
  Returns: bool

cll_17p()
  17-part candle lower low condition
  Returns: bool

cll_18p()
  18-part candle lower low condition
  Returns: bool

cll_19p()
  19-part candle lower low condition
  Returns: bool

cll_20p()
  20-part candle lower low condition
  Returns: bool

cll_21p()
  21-part candle lower low condition
  Returns: bool

cll_22p()
  22-part candle lower low condition
  Returns: bool

cll_23p()
  23-part candle lower low condition
  Returns: bool

cll_24p()
  24-part candle lower low condition
  Returns: bool

cll_25p()
  25-part candle lower low condition
  Returns: bool

cll_26p()
  26-part candle lower low condition
  Returns: bool

cll_27p()
  27-part candle lower low condition
  Returns: bool

cll_28p()
  28-part candle lower low condition
  Returns: bool

cll_29p()
  29-part candle lower low condition
  Returns: bool

cll_30p()
  30-part candle lower low condition
  Returns: bool

gc_1p()
  1-part green candle condition
  Returns: bool

gc_2p()
  2-part green candle condition
  Returns: bool

gc_3p()
  3-part green candle condition
  Returns: bool

gc_4p()
  4-part green candle condition
  Returns: bool

gc_5p()
  5-part green candle condition
  Returns: bool

gc_6p()
  6-part green candle condition
  Returns: bool

gc_7p()
  7-part green candle condition
  Returns: bool

gc_8p()
  8-part green candle condition
  Returns: bool

gc_9p()
  9-part green candle condition
  Returns: bool

gc_10p()
  10-part green candle condition
  Returns: bool

gc_11p()
  11-part green candle condition
  Returns: bool

gc_12p()
  12-part green candle condition
  Returns: bool

gc_13p()
  13-part green candle condition
  Returns: bool

gc_14p()
  14-part green candle condition
  Returns: bool

gc_15p()
  15-part green candle condition
  Returns: bool

gc_16p()
  16-part green candle condition
  Returns: bool

gc_17p()
  17-part green candle condition
  Returns: bool

gc_18p()
  18-part green candle condition
  Returns: bool

gc_19p()
  19-part green candle condition
  Returns: bool

gc_20p()
  20-part green candle condition
  Returns: bool

gc_21p()
  21-part green candle condition
  Returns: bool

gc_22p()
  22-part green candle condition
  Returns: bool

gc_23p()
  23-part green candle condition
  Returns: bool

gc_24p()
  24-part green candle condition
  Returns: bool

gc_25p()
  25-part green candle condition
  Returns: bool

gc_26p()
  26-part green candle condition
  Returns: bool

gc_27p()
  27-part green candle condition
  Returns: bool

gc_28p()
  28-part green candle condition
  Returns: bool

gc_29p()
  29-part green candle condition
  Returns: bool

gc_30p()
  30-part green candle condition
  Returns: bool

rc_1p()
  1-part red candle condition
  Returns: bool

rc_2p()
  2-part red candle condition
  Returns: bool

rc_3p()
  3-part red candle condition
  Returns: bool

rc_4p()
  4-part red candle condition
  Returns: bool

rc_5p()
  5-part red candle condition
  Returns: bool

rc_6p()
  6-part red candle condition
  Returns: bool

rc_7p()
  7-part red candle condition
  Returns: bool

rc_8p()
  8-part red candle condition
  Returns: bool

rc_9p()
  9-part red candle condition
  Returns: bool

rc_10p()
  10-part red candle condition
  Returns: bool

rc_11p()
  11-part red candle condition
  Returns: bool

rc_12p()
  12-part red candle condition
  Returns: bool

rc_13p()
  13-part red candle condition
  Returns: bool

rc_14p()
  14-part red candle condition
  Returns: bool

rc_15p()
  15-part red candle condition
  Returns: bool

rc_16p()
  16-part red candle condition
  Returns: bool

rc_17p()
  17-part red candle condition
  Returns: bool

rc_18p()
  18-part red candle condition
  Returns: bool

rc_19p()
  19-part red candle condition
  Returns: bool

rc_20p()
  20-part red candle condition
  Returns: bool

rc_21p()
  21-part red candle condition
  Returns: bool

rc_22p()
  22-part red candle condition
  Returns: bool

rc_23p()
  23-part red candle condition
  Returns: bool

rc_24p()
  24-part red candle condition
  Returns: bool

rc_25p()
  25-part red candle condition
  Returns: bool

rc_26p()
  26-part red candle condition
  Returns: bool

rc_27p()
  27-part red candle condition
  Returns: bool

rc_28p()
  28-part red candle condition
  Returns: bool

rc_29p()
  29-part red candle condition
  Returns: bool

rc_30p()
  30-part red candle condition
  Returns: bool

cdut()
  candle double uptrend condition
  Returns: bool

cddt()
  candle double downtrend condition
  Returns: bool

cdut_1p()
  1-part candle double uptrend condition
  Returns: bool

cdut_2p()
  2-part candle double uptrend condition
  Returns: bool

cdut_3p()
  3-part candle double uptrend condition
  Returns: bool

cdut_4p()
  4-part candle double uptrend condition
  Returns: bool

cdut_5p()
  5-part candle double uptrend condition
  Returns: bool

cdut_6p()
  6-part candle double uptrend condition
  Returns: bool

cdut_7p()
  7-part candle double uptrend condition
  Returns: bool

cdut_8p()
  8-part candle double uptrend condition
  Returns: bool

cdut_9p()
  9-part candle double uptrend condition
  Returns: bool

cdut_10p()
  10-part candle double uptrend condition
  Returns: bool

cdut_11p()
  11-part candle double uptrend condition
  Returns: bool

cdut_12p()
  12-part candle double uptrend condition
  Returns: bool

cdut_13p()
  13-part candle double uptrend condition
  Returns: bool

cdut_14p()
  14-part candle double uptrend condition
  Returns: bool

cdut_15p()
  15-part candle double uptrend condition
  Returns: bool

cdut_16p()
  16-part candle double uptrend condition
  Returns: bool

cdut_17p()
  17-part candle double uptrend condition
  Returns: bool

cdut_18p()
  18-part candle double uptrend condition
  Returns: bool

cdut_19p()
  19-part candle double uptrend condition
  Returns: bool

cdut_20p()
  20-part candle double uptrend condition
  Returns: bool

cdut_21p()
  21-part candle double uptrend condition
  Returns: bool

cdut_22p()
  22-part candle double uptrend condition
  Returns: bool

cdut_23p()
  23-part candle double uptrend condition
  Returns: bool

cdut_24p()
  24-part candle double uptrend condition
  Returns: bool

cdut_25p()
  25-part candle double uptrend condition
  Returns: bool

cdut_26p()
  26-part candle double uptrend condition
  Returns: bool

cdut_27p()
  27-part candle double uptrend condition
  Returns: bool

cdut_28p()
  28-part candle double uptrend condition
  Returns: bool

cdut_29p()
  29-part candle double uptrend condition
  Returns: bool

cdut_30p()
  30-part candle double uptrend condition
  Returns: bool

cddt_1p()
  1-part candle double downtrend condition
  Returns: bool

cddt_2p()
  2-part candle double downtrend condition
  Returns: bool

cddt_3p()
  3-part candle double downtrend condition
  Returns: bool

cddt_4p()
  4-part candle double downtrend condition
  Returns: bool

cddt_5p()
  5-part candle double downtrend condition
  Returns: bool

cddt_6p()
  6-part candle double downtrend condition
  Returns: bool

cddt_7p()
  7-part candle double downtrend condition
  Returns: bool

cddt_8p()
  8-part candle double downtrend condition
  Returns: bool

cddt_9p()
  9-part candle double downtrend condition
  Returns: bool

cddt_10p()
  10-part candle double downtrend condition
  Returns: bool

cddt_11p()
  11-part candle double downtrend condition
  Returns: bool

cddt_12p()
  12-part candle double downtrend condition
  Returns: bool

cddt_13p()
  13-part candle double downtrend condition
  Returns: bool

cddt_14p()
  14-part candle double downtrend condition
  Returns: bool

cddt_15p()
  15-part candle double downtrend condition
  Returns: bool

cddt_16p()
  16-part candle double downtrend condition
  Returns: bool

cddt_17p()
  17-part candle double downtrend condition
  Returns: bool

cddt_18p()
  18-part candle double downtrend condition
  Returns: bool

cddt_19p()
  19-part candle double downtrend condition
  Returns: bool

cddt_20p()
  20-part candle double downtrend condition
  Returns: bool

cddt_21p()
  21-part candle double downtrend condition
  Returns: bool

cddt_22p()
  22-part candle double downtrend condition
  Returns: bool

cddt_23p()
  23-part candle double downtrend condition
  Returns: bool

cddt_24p()
  24-part candle double downtrend condition
  Returns: bool

cddt_25p()
  25-part candle double downtrend condition
  Returns: bool

cddt_26p()
  26-part candle double downtrend condition
  Returns: bool

cddt_27p()
  27-part candle double downtrend condition
  Returns: bool

cddt_28p()
  28-part candle double downtrend condition
  Returns: bool

cddt_29p()
  29-part candle double downtrend condition
  Returns: bool

cddt_30p()
  30-part candle double downtrend condition
  Returns: bool
statisticsstrategiestechindicator

Pine library

In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in a publication is governed by House rules.

Disclaimer