Fibonacci Zone

My first attempt in Pine.
It is a Donchian Channel, but in stead of the median line I added the four Fibonacci lines and colored three of the five ensuing zones in suggestive colors.
The blue zone is up trend zone
The gray zone is ranging zone
The orange zone is down trend zone.
The white zones are 'in betweens'
For the fibs to function properly it needs to be a 20 - 30 period channel.
Release Notes: Periods now adaptable in the inputs, corrected the calculation of the Highest Fibonacci Line
Gave the borders a title and added better remarks in the script code.

Enjoy, Eykpunter.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


very interesting indicator. how does your strategies for long and shorts look like?
+12 Svara
eykpunter martinweb
@martinweb, I only pick stocks and take position in stocks which are rising. I use a multi time frame setup of a daily and a 3 hourly chart.

Stocks that move in the blue zone in both frames are candidates for picking. I also look in the weekly chart to check that the Fibonacci lines do not give resistance.
If I take position in a stock I use the low border of the 3 hourly as a stop-loss. Every week I move the stops to the new position of the 3 hourly low border. After a month the stop should close in profit.
I keep the stock until the stop triggers. Usually this method gives profit in around 70 percent of positions taken, while the losses of positions closed with a loss are below a few percent. This keeps the risk low.
Overall this method is profitable and it ensures that you only invest in stock which are rising.

For short positions I advice to chose stocks in the red zones and put the stop at the high border of the 3 hourly channel.
+1 Svara
martinweb eykpunter
@eykpunter, thank you so much for sharing. This reminds me to the following strategy mentioned here:
How to trade
- Best to use in ranging market conditions
- Place on two different time frames eg. 15 and 55 min.
- Take trades off either short or long term chart.
- Best trades occur when both charts show same trigger/condition.
- Trades are short term reversals in direction of major trend on longer term chart unless you expect a trend reversal.
- Determine which band is the limiting band for the volatility of the instrument.
- When the market closes outside of the limiting band then returns inside, take a long/short one tick above/below the high/low of the previous bar.
- Place stop below/above the low/high of the the recent swing low/high.
- Set targets at opposite band of chart
martinweb eykpunter
@eykpunter, "If I take position in a stock I use the low border of the 3 hourly as a stop-loss" which of the 3 bands bottom border?
eykpunter martinweb
@martinweb, I mean the low line with the title "low border"
I saw that I made a mistake, the high fib should be calculated as hl-dist*0.236.
+11 Svara
geo.stan88 eykpunter
@eykpunter,Amazing! thanks!
+5 Svara
How to use Fibonacci Zone ?
+9 Svara
eykpunter hanzhongwei
@hanzhongwei, Fibonacci lines / zones act either as supports of resistance. If you find that these act as supports you can assume that quotes are trending up. If these act as resistance quotes are trending down.
Is there a minimum number of bars you wouldn't use like 10-15?
+6 Svara