Fib Thirds - Clean

298
This script keeps the price-scale labels from the earlier version and adds three optional, faint extras: short lines, a shaded zone, and a small label. All of them can be switched off in Settings.

1. Inputs

Anchor points: p1 and p2 are the top and bottom prices of your move, set the same way as before.
Colours: A normal level colour, a highlight colour, and a switch for highlighting.
Chart lines: Choose Off, Short at right, or Full width. You can also set the length of the short lines, the style (solid, dashed or dotted), and the transparency.
Zone: Switches for the shaded third and the label, plus the shade transparency.

2. Level calculation

It takes the higher price as hi and the lower as lo, then divides the range into three equal steps.
This gives four levels: top, one third down, two thirds down, and bottom. They match your Fib 0, 0.3333, 0.6667 and 1.

3. Where the price is

zone is 1 for the upper third, 2 for the middle and 3 for the lower third, based on the current close.
pct is the close as a percentage of the range, where 0% is the bottom level and 100% is the top. A value below 0 or above 100 means price is outside your two points.

4. Colours

With highlighting on, the two levels around the third holding the current price use the highlight colour. The others use the normal colour.

5. Price scale labels

Four plot() calls with display=display.price_scale put coloured value labels on the right axis, with nothing drawn on the chart. This part is always on.

6. Drawings on the last bar only

Lines: By default, faint dotted lines run across the last 30 bars to the right edge. Full width extends them across the whole chart.
Shaded zone: A light box covers only the third where price currently sits. It isn’t drawn across history, so older candles stay clean.
Label: A small label at the right edge shows something like “Middle third | 47%”.
Old drawings are deleted and redrawn on each update, so they don’t pile up on the chart.

Quietest and strongest setups

Quietest: Set Chart lines to Off and turn off the shade. You get only the price-scale labels, plus the label if you keep it.
Strongest: Use Full width lines with a lower transparency value.

The lines, box and label only appear on the latest bar, so they won’t show on historical bars if you use Bar Replay.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.