OPEN-SOURCE SCRIPT
Auto Fib Extension Targets A-B-C MartenBG

Auto Fib Extension Targets A-B-C is a Pine v6 indicator that projects Fibonacci extension targets from the most recent validated A-B-C swing. It works in both directions and is designed for trend continuation planning and take-profit placement.
How it works:
Detects pivots with user-defined left and right bars.
Builds bullish swings from L-H-L and bearish swings from H-L-H.
Validates C by a retracement filter (min to max, relative to AB) and an optional HL or LH condition.
Projects targets from point C using C + r*(B − A) for uptrends and C − r*(A − B) for downtrends.
Draws levels 1.000, 1.272, 1.382, 1.618, optional 2.000, plus an optional 1.272-1.382 target zone.
Optionally shows dotted A-B and B-C segments for quick visual context.
Key settings:
Pivot sensitivity: leftBars and rightBars.
Correction validation: minRetr and maxRetr, HL or LH requirement toggle.
Level visibility: enable or disable each ratio and the target zone.
Extension length: horizontal extension in bars.
Visuals: toggle A-B-C segment display.
Why use it:
Fast projection of realistic continuation targets.
Clear confluence when extensions align with prior highs, liquidity pools, or S/R.
Works on any symbol and timeframe once pivots are confirmed.
Notes:
Pivots confirm after rightBars bars, so targets appear only once a swing is confirmed. This reduces repaint-like behavior typical for unfinished pivots.
No alerts are included by design. If you want alerts or manual A-B-C locking and click-to-select anchors, ask and I will add them.
How it works:
Detects pivots with user-defined left and right bars.
Builds bullish swings from L-H-L and bearish swings from H-L-H.
Validates C by a retracement filter (min to max, relative to AB) and an optional HL or LH condition.
Projects targets from point C using C + r*(B − A) for uptrends and C − r*(A − B) for downtrends.
Draws levels 1.000, 1.272, 1.382, 1.618, optional 2.000, plus an optional 1.272-1.382 target zone.
Optionally shows dotted A-B and B-C segments for quick visual context.
Key settings:
Pivot sensitivity: leftBars and rightBars.
Correction validation: minRetr and maxRetr, HL or LH requirement toggle.
Level visibility: enable or disable each ratio and the target zone.
Extension length: horizontal extension in bars.
Visuals: toggle A-B-C segment display.
Why use it:
Fast projection of realistic continuation targets.
Clear confluence when extensions align with prior highs, liquidity pools, or S/R.
Works on any symbol and timeframe once pivots are confirmed.
Notes:
Pivots confirm after rightBars bars, so targets appear only once a swing is confirmed. This reduces repaint-like behavior typical for unfinished pivots.
No alerts are included by design. If you want alerts or manual A-B-C locking and click-to-select anchors, ask and I will add them.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.