insidePitchfork
Draw a classic Pitchfork (Inside) using three anchors: a main pivot and two side points. It’s great for spotting trend paths, bounce zones, and where price might “walk” inside the three rails (upper, median, lower). Think of it as a guided channel with a centerline to keep you oriented.
Syntax
insidePitchfork(pivot, left, right, styles?)
Parameters
pivot: The main anchor of the pitchfork. Build it with
newPoint(time, price).left: The first side anchor. Also created with
newPoint(time, price).right: The second side anchor. Same builder:
newPoint(time, price).styles (optional) Visual options you can pass as an object:
Return Value
string — Unique drawing
idso you can later update or delete the pitchfork.
Example
This script draws one inside pitchfork every 24 candles to keep the chart tidy. We pick three meaningful pivots: a main pivot (older swing), and two side points (more recent swings). Lots of comments are included for clarity.
Result

Tips
Use obvious swing points for
pivot,left, andright. The cleaner the anchors, the more meaningful the fork.Try mixing high/low combinations that reflect the current trend direction (e.g., low→high→low in an uptrend).
If you want the fork to adjust over time without clutter, save the returned
idonce and callupdateDrawingById(id, [pivot, left, right])instead of creating new ones.
Warning
If any of your points are missing
timeorprice(for example, you passedNaN), nothing will be drawn.Extremely close anchors can produce near‑overlapping lines, making the fork hard to read.
Drawing too many forks too often (like
index % 1) will clutter the chart quickly.
Good Practice
Keep a consistent color scheme for pitchfork tools (e.g., aqua for Inside Pitchforks) so users recognize them instantly.
Space out creation (e.g.,
index % 24,index % 36) to avoid stacking many forks.Combine a pitchfork with a
horizontalRayortrendLineto mark key reactions along the median or outer rails.
Last updated