CandleTools
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.