TradingCharts

What it does

Candle anatomy and simple two-bar pattern helpers for your own scripts. Each function works on every bar and returns a number or true/false.

bodyPct(): candle body as a percentage of the full high-low range.

upperWickPct() and lowerWickPct(): wick size as a percentage of the range.

bullEngulf() and bearEngulf(): true when the candle fully engulfs the previous one in that direction.

insideBar(): true when the bar's range sits inside the previous bar's range.

How to use:

import g_T9PHE3Z1/CandleTools/1 as ct

body = ct.bodyPct()

bull = ct.bullEngulf()

inside = ct.insideBar()

Call each function once per bar at the top level of your script (not inside if or for). Check the candle rules against your own definition before trading on them.

How to use it

  • Open the charts and go to Indicators › My scripts › Shared with me (or search the Community library) and press Add to chart.
  • Open it in the ChartScript Editor to read the code; Create a copy makes your own editable version.

Version history

  • v1 — 21 Nov, 10:44 am · compiler 0.3.69

#library#candlestick#engulfing#inside-bar#wick#price-action#helpers