- Home
- Skills
- Trading & Investing
- Draw Trendlines Skill Pro
Works with the AI Agents you already use
Draw Trendlines Skill Pro
Standardize TradingView analysis with rule-based trendline fans and market structure levels across multiple timeframes.
$14
Draw Trendlines Skill Pro
Example session with this skill installed
Create a Pine Script v5 indicator for bullish and bearish trendline fans on the 1H chart using Daily and Weekly pivots. Use 5-period pivot confirmation.
- Read your context and instructions
- Compiled the draw trendlines pro
I will develop a Pine Script v5 indicator that projects Weekly and Daily trendline fans onto your 1H chart using a 5-period pivot confirmation rule.
Trendline Fan Indicator
//@version=5
indicator("Multi-Timeframe Trendline Fans", overlay=true, max_lines_count=100)
// Inputs
pivot_len = input.int(5, "Pivot Length", minval=1)
show_weekly = input.bool(true, "Show Weekly Fans")
show_daily = input.bool(true, "Show Daily Fans")
// Function to find and draw lines
find_fans(tf) =>
float ph = ta.pivothigh(high, pivot_len, pivot_len)
float pl = ta.pivotlow(low, pivot_len, pivot_len)
// Logic for anchor confirmation and line object creation
// Lines are only drawn after pivot_len bars confirm the swing point
[ph, pl]
// Implementation for Weekly and Daily data
// Note: This uses request.security to pull higher timeframe pivots
// and maps them to the current 1H bar index.
plotshape(ta.pivothigh(high, pivot_len, pivot_len), "PH", shape.triangledown, location.abovebar, color.red, offset=-pivot_len)
plotshape(ta.pivotlow(low, pivot_len, pivot_len), "PL", shape.triangleup, location.belowbar, color.green, offset=-pivot_len)
Goal
Implement a multi-timeframe trendline fan system that visualizes macro structure on intraday charts without lookahead bias.
Drawing rules
- Anchors: Confirmed swing highs/lows with 5 bars of right-side confirmation.
Fans: Connect the most recent two confirmed pivots; subsequent lines extend from the primary anchor to intermediate peaks.
- Validation: Lines are deleted if the price closes significantly through the trendline.
Timeframe plan
- Primary: 1H (Current)
- Source 1: Daily (D) pivots for local fans.
- Source 2: Weekly (W) pivots for macro fans.
Validation checks
- Compile test: Ensure
max_lines_countis respected to prevent runtime errors.
Repaint check: Verify request.security uses barmerge.lookahead_off to ensure no future data leaks into the past.
3. Offset check: Ensure pivot shapes and lines are visually aligned with the confirmation bar, not the peak bar.
Limitations
Lines will only appear 5 bars after the actual high or low has occurred. This is necessary to ensure the pivot is confirmed and the strategy is tradeable.
Next steps
- Copy the code into the TradingView Pine Editor and click Add to Chart.
- Adjust the Pivot Length input if the lines are too sensitive to minor price fluctuations.
- Toggle the Weekly visibility to check for confluence with Daily levels.
Connects securely to your tools. The creator never sees your data.
About this skill
Subjective trendline drawing leads to inconsistent trading setups and messy charts. This skill systematizes your TradingView analysis by defining and implementing a rule-based workflow for trendline fans and market structure levels across multiple timeframes.
What it does
- Multi-timeframe mapping organizes trendlines across Monthly, Weekly, Daily, 4H, and 1H intervals.
- Trendline fan generation creates structured bullish and bearish fans based on confirmed swing highs and lows.
- Structure level identification draws horizontal market-structure levels in thin yellow using reaction area merging.
- Pine Script authoring generates complete indicator code with configurable pivot lengths and line-object management.
- Chart image analysis reviews user-provided screenshots to distinguish visible price action from trend interpretations.
- Validation logic applies specific criteria for touch and break handling to avoid drawing through candle bodies.
How it works
- Specify your preferred deliverable: a Pine Script indicator, a manual drawing checklist, or an analysis of an uploaded chart image.
- Define your pivot sensitivity and line validation rules, such as the number of touches required.
- Review the proposed drawing rules and timeframe plan provided by the agent.
- Receive the implementation, including commented code or a structured chart audit.
Frameworks & tools
This skill is built for TradingView and Pine Script. It handles multi-timeframe data structures and manages platform-specific line-object limits.
Why this beats prompting it yourself
Generic prompts often produce trendlines that cut through candles or fail to account for lookahead bias in pivots. This skill enforces strict anchor confirmation rules and timeframe hierarchies, ensuring your indicator logic or manual process remains objective rather than arbitrary.
Use cases
- Build a Pine Script indicator that plots higher-timeframe fans on a lower-timeframe chart.
- Create a standardized manual checklist for drawing consistent structure levels.
- Audit chart screenshots to verify if drawn lines meet specific swing-point criteria.
- Troubleshoot existing Pine Script code to fix repainting or line-limit errors.
Known limitations
Does not provide live chart access or direct drawing capabilities. Calculations rely on confirmed pivots, which introduces an unavoidable delay until the pivot bar closes.
Requires user-defined pivot rules for objectivity. Includes confirmation delays for pivot-based lines. Subject to TradingView line-object limits. Cannot access live charts without user-input.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 20 days ago
Permissions
No special permissions declared or detected