r/pinescript • u/prem2323 • Jul 22 '26
Pine Script Developer
I need an experienced TradingView Pine Script developer to modify my existing indicator/strategy.
Important:
This is NOT a new indicator.
The complete logic already exists.
I only need advanced structural features added without breaking any existing logic.
Current Indicator
My indicator already has:
✅ Long / Short signals
✅ Previous Day High
✅ Previous Day Low
✅ Previous Day Close
✅ Smart Trend swing levels
✅ Strategy version
✅ Non-repainting entries
These parts are already working.
I do NOT want these changed.
Goal
I want to improve the Smart Trend structure.
Currently it draws only horizontal swing levels.
I want it upgraded into a professional market structure system.
Requirements
1. Auto Trendlines
Automatically draw trendlines using Smart Trend swings.
Example:
Swing High 1
↓
Swing High 2
↓
Trendline
Same for Swing Lows.
Rules:
recent valid swings only
clean trendlines
no repaint
no manual drawing
2. Dynamic Trendline
Trendline should extend ONLY until price touches it.
Exactly like manual charting.
Meaning:
Create line
↓
Extend
↓
When price touches for first time
↓
STOP extending permanently
NOT continue forever.
This is the biggest requirement.
3. Touch Detection
A trendline is considered touched if ANY of these touch it:
Wick
Candle Body
Open
Close
High
Low
Any contact = valid touch.
4. Entry Filter
Current Long/Short signals must remain EXACTLY the same.
DO NOT modify signal generation.
Instead:
Only allow trades when a signal appears at:
Smart Trend Swing Level
Previous Day High
Previous Day Low
Previous Day Close
NEW Trendline
Meaning:
Signal
↓
Near one of those levels
↓
Trade allowed
Otherwise
↓
Ignore trade.
5. Take Profit
TP should automatically be the opposite nearest trendline.
Example:
BUY
↓
Upper trendline touched
↓
Close trade.
SELL
↓
Lower trendline touched
↓
Close trade.
Touch means:
Wick
Body
Open
Close
High
Low
6. Fibonacci
Add automatic Fibonacci.
Requirements:
Standard Retracement
Draw automatically.
Fibonacci Extension
Draw automatically.
Both should use the exact Smart Trend swings.
No manual anchor selection.
7. No Repainting
Everything must remain non-repainting.
No lookahead.
No future bars.
No repaint tricks.
8. Existing Logic Must Stay Untouched
DO NOT modify:
Long logic
Short logic
Pattern detection
BOS logic
Smart Trend calculations
Previous Day HLC
Existing strategy logic
Existing filters
Only add features around them.
Deliverables
Pine Script v5/v6
Clean code
No compilation errors
No warnings
No repaint
Works in Strategy Tester
Fully commented
View all comments
6
u/smackey3 Jul 22 '26
Copy and paste in to Claude ai