Fib Thirds - Price Scale Only

238
The script draws four price levels that split a move into three equal parts, and it shows them only on the price scale, not on the chart body.

1. Inputs

Anchor points: p1 and p2 are two prices, the top and bottom of your move. They default to 22,922.45 and 22,411.30 from your screenshot, and you can change them in Settings (the crosshair icon lets you click the chart).
Style: There is a normal level colour, a highlight colour, and a switch to turn highlighting on or off.

2. Level calculation

It takes the higher of the two prices as hi and the lower as lo, so it doesn’t matter which point you set first.
step is one third of the distance between them.
The four levels are: l0 = top, l1 = top minus one step, l2 = top minus two steps, and l3 = bottom. These match your Fib levels 0, 0.3333, 0.6667 and 1.

3. Where the price is

zone is a number from 1 to 3:
1: price is in the top third.
2: price is in the middle third.
3: price is in the bottom third.
It uses the current bar’s close to decide.

4. Colours

If highlighting is on, the two levels bounding the third that contains the current price use the highlight colour. All other levels use the normal colour.
Example: if price is in the middle third, l1 and l2 are highlighted, and l0 and l3 are not.

5. Plotting

Each level is drawn with plot() using display=display.price_scale. That setting hides the line on the chart and keeps only the coloured value label on the right-hand price axis.
This is why your chart stays clean while you can still see where each level sits.

What it doesn’t do

It doesn’t draw boxes, fills or lines on the chart, unlike your Fib drawing with its black, grey and green bands.
The levels are fixed horizontal values. They won’t move unless you change the two input prices.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.